/* ===========================================
   CSS VARIABLES & COLOR PALETTE
   =========================================== */
   :root {
    --metal-1: #f5f7fa;
    --metal-2: #e2e6ea;
    --metal-3: #c9ced4;
    --metal-4: #9aa3ad;
    --metal-5: #6f7780;
    --metal-dark: #2c3e50;
    --metal-darker: #1a2633;
    --metal-accent: #3498db;
    --metal-highlight: #5dade2;
}

/* ===========================================
   BASE STYLES & RESET
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: transparent; /* Changed from #000000 to transparent */
    color: #e5e5e5;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Space Grotesk", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
    letter-spacing: 0.01em;
    font-weight: 600;
}

/* ===========================================
   LAYOUT & SECTION STYLES
   =========================================== */
section {
    background-color: rgba(0, 0, 0, 0.7); /* Changed from #000000 to semi-transparent */
    border-bottom: 1px solid rgba(154, 163, 173, 0.1);
    position: relative;
}

footer {
    background-color: rgba(0, 0, 0, 0.7); /* Changed from #000000 to semi-transparent */
    border-top: 1px solid rgba(154, 163, 173, 0.1);
    position: relative;
}

/* ===========================================
   IRIDESCENT BACKGROUND
   =========================================== */
#iridescent-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.7;
}

#iridescent-bg canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===========================================
   METALLIC TEXT EFFECTS
   =========================================== */
.metallic-text {
    background-image: linear-gradient(
        90deg,
        var(--metal-1) 0%,
        var(--metal-3) 20%,
        var(--metal-2) 40%,
        var(--metal-4) 60%,
        var(--metal-1) 80%,
        var(--metal-3) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.08));
    transition: background-position 0.6s ease, filter 0.2s ease;
}

.metallic-text:hover {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 14px rgba(255,255,255,0.16));
}

/* ===========================================
   BUTTON STYLES
   =========================================== */
.btn-metallic {
    font-size: clamp(0.95rem, 1.05vw, 1.15rem);
    padding: clamp(0.9rem, 1vw, 1.1rem) clamp(1.1rem, 1.4vw, 1.6rem);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.8), rgba(26, 38, 51, 0.8));
    color: #e5e7eb;
    border: 1px solid rgba(154, 163, 173, 0.3);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 18px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-metallic::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: 
        linear-gradient(180deg, rgba(255,255,255,0.15), rgba(255,255,255,0) 35%, rgba(0,0,0,0.2) 80%),
        linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 35%, rgba(255,255,255,0) 65%);
    mix-blend-mode: screen;
    transform: translateX(-120%);
    transition: transform 0.9s ease;
    opacity: 0;
    pointer-events: none;
}

.btn-metallic:hover {
    border-color: rgba(201, 206, 212, 0.5);
    filter: brightness(1.1);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 12px 26px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-metallic:hover::before {
    transform: translateX(120%);
    opacity: 1;
}

.btn-metallic:active {
    transform: translateY(1px);
    filter: brightness(0.98);
}

/* ===========================================
   CARD STYLES
   =========================================== */
.card {
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.7), rgba(26, 38, 51, 0.7));
    border: 1px solid rgba(154, 163, 173, 0.2);
    border-radius: 12px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(201, 206, 212, 0.3);
}

/* ===========================================
   FORM STYLES
   =========================================== */
.form-input {
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.7), rgba(26, 38, 51, 0.7));
    border: 1px solid rgba(154, 163, 173, 0.3);
    color: #e5e7eb;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-input:focus {
    border-color: var(--metal-3);
    box-shadow: 
        0 0 0 2px rgba(201, 206, 212, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    outline: none;
}

/* ===========================================
   SKILL BAR STYLES
   =========================================== */
.skill-bar {
    height: 10px;
    width: 100%;
    background: linear-gradient(90deg, rgba(42, 52, 65, 0.5), rgba(26, 38, 51, 0.5));
    border-radius: 6px;
    margin: 10px 0;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(154, 163, 173, 0.2);
}

.skill-progress {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--metal-3), var(--metal-1));
    width: 0;
    transition: width 1.5s ease-in-out;
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===========================================
   PROJECT CARD FLIP STYLES
   =========================================== */
.project-card {
    perspective: 1000px;
    height: 24rem;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
}

.card-flip {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    will-change: transform;
    transform: translateZ(0);
}

.project-card.flipped .card-flip {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.7), rgba(26, 38, 51, 0.7));
    border: 1px solid rgba(154, 163, 173, 0.2);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    will-change: transform;
    transform: translateZ(0);
}

.card-front::after, .card-back::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 35%, rgba(255,255,255,0) 65%);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.6s ease;
    transform: translateX(-120%);
    pointer-events: none;
    z-index: 1;
}

.project-card:not(.flipped):hover .card-front::after,
.project-card.flipped:hover .card-back::after {
    opacity: 1;
    transform: translateX(120%);
}

.card-back {
    transform: rotateY(180deg);
}

.card-back .btn-metallic:hover {
    border-color: rgba(154, 163, 173, 0.3);
    filter: brightness(1);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 8px 18px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(0);
}

.card-back .btn-metallic:hover::before {
    transform: translateX(-120%);
    opacity: 0;
}

.card-back .btn-metallic {
    position: relative;
    z-index: 10;
    transform: translateZ(10px);
    will-change: transform;
    pointer-events: auto;
}

.project-card.flipped .card-back .btn-metallic:hover {
    transform: translateZ(10px);
}

.project-card.flipped .card-back {
    pointer-events: auto;
}

.project-card.flipped .card-back .btn-metallic {
    pointer-events: auto;
    transition: none !important;
}

.project-card.flipped:hover .card-back {
    transform: rotateY(180deg);
}

/* Flip hint */
.flip-hint {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card.flipped .flip-hint {
    opacity: 0;
}

/* Project Card Back Layout Adjustment */
.card-back {
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* Add space for the absolutely positioned button */
}

.card-back .btn-metallic {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: auto !important;
    padding-left: 24px;
    padding-right: 24px;
}

/* Adjust the content area to take full height */
.card-back > div:last-child {
    margin-top: auto;
}

/* ===========================================
   ICON STYLES
   =========================================== */
.icon-lg {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--metal-2), var(--metal-4));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.1));
}

.project-icon {
    font-size: 6rem;
    background: linear-gradient(135deg, var(--metal-2), var(--metal-4));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.15));
}

/* ===========================================
   NAVIGATION STYLES
   =========================================== */
   nav {
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.7), rgba(26, 38, 51, 0.7));
    backdrop-filter: blur(12px) saturate(1.8);
    border-bottom: 1px solid rgba(91, 157, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 100;
    overflow: hidden;
    padding: 12px 16px;
}

nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(91, 157, 255, 0.1) 0%, rgba(91, 157, 255, 0.05) 50%, rgba(91, 157, 255, 0) 100%);
    z-index: -1;
}

nav::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(91, 157, 255, 0.15) 0%, rgba(91, 157, 255, 0.05) 20%, transparent 50%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav:hover::after {
    opacity: 1;
}

.nav-container {
    position: relative;
    z-index: 2;
    max-width: 7xl;
    margin: 0 auto;
    height: 40px; /* Fixed height to contain the absolutely positioned elements */
}

.nav-name {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Space Grotesk", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
    font-weight: 600;
    font-size: 1.125rem;
    letter-spacing: 0.01em;
    background-image: linear-gradient(
        90deg,
        var(--metal-1) 0%,
        var(--metal-3) 20%,
        var(--metal-2) 40%,
        var(--metal-4) 60%,
        var(--metal-1) 80%,
        var(--metal-3) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.08));
    transition: background-position 0.6s ease, filter 0.2s ease;
    z-index: 2;
}

.nav-name:hover {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 14px rgba(255,255,255,0.16));
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.nav-links a {
    color: #e5e5e5;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
}

/* ===========================================
   COMPONENT-SPECIFIC STYLES
   =========================================== */
/* Hero Title */
.hero-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background-image: linear-gradient(
        90deg,
        var(--metal-1) 0%,
        var(--metal-3) 20%,
        var(--metal-2) 40%,
        var(--metal-4) 60%,
        var(--metal-1) 80%,
        var(--metal-3) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.15));
    transition: all 0.6s ease;
    text-transform: uppercase;
}

.hero-title:hover {
    background-position: 100% 50%;
    filter: drop-shadow(0 0 20px rgba(255,255,255,0.25));
    transform: scale(1.02);
}

/* ===========================================
   ANIMATION STYLES
   =========================================== */
/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Glow Effect */
.glow {
    position: relative;
}

.glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.glow:hover::after {
    opacity: 1;
}

/* ===========================================
   SCROLLBAR STYLES
   =========================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--metal-4), var(--metal-3));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--metal-3), var(--metal-2));
}

/* ===========================================
   RESPONSIVE STYLES
   =========================================== */
@media (max-width: 768px) {
    .project-card {
        height: auto;
    }
    
    .project-card .card-flip {
        position: relative;
        height: auto;
        transform-style: preserve-3d;
    }
    
    .project-card .card-front,
    .project-card .card-back {
        position: relative;
        height: auto;
        backface-visibility: visible;
    }
    
    .project-card .card-back {
        display: none;
    }
    
    .project-card.flipped .card-front {
        display: none;
    }
    
    .project-card.flipped .card-back {
        display: flex;
    }
}

/* ===========================================
   LOADING SCREEN STYLES
   =========================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader-text {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 300;
    letter-spacing: 0.3rem;
    font-family: "Space Grotesk", "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
    text-align: center;
    line-height: 1.5;
}

.loader-text span {
    display: inline-block;
    animation: pulse 1.5s ease-in-out infinite;
    color: var(--metal-2);
}

/* Animation delays for each letter */
.loader-text span:nth-child(1) { animation-delay: 0.05s; }  /* J */
.loader-text span:nth-child(2) { animation-delay: 0.1s; }   /* U */
.loader-text span:nth-child(3) { animation-delay: 0.15s; }  /* L */
.loader-text span:nth-child(4) { animation-delay: 0.2s; }   /* I */
.loader-text span:nth-child(5) { animation-delay: 0.25s; }  /* U */
.loader-text span:nth-child(6) { animation-delay: 0.3s; }   /* S */
.loader-text span:nth-child(7) { animation-delay: 0.35s; }  /* [space] */
.loader-text span:nth-child(8) { animation-delay: 0.4s; }   /* G */
.loader-text span:nth-child(9) { animation-delay: 0.45s; }  /* U */
.loader-text span:nth-child(10) { animation-delay: 0.5s; }  /* Y */
.loader-text span:nth-child(11) { animation-delay: 0.55s; } /* - */
.loader-text span:nth-child(12) { animation-delay: 0.6s; }  /* J */
.loader-text span:nth-child(13) { animation-delay: 0.65s; } /* A */
.loader-text span:nth-child(14) { animation-delay: 0.7s; }  /* M */
.loader-text span:nth-child(15) { animation-delay: 0.75s; } /* E */
.loader-text span:nth-child(16) { animation-delay: 0.8s; }  /* S */

@keyframes pulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: scale(1);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.05);
    }
}
/* Ensure no element has a solid black background */

/* Then restore the backgrounds we want */
body {
    background-color: transparent !important;
}

nav {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)) !important;
}

.card {
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.7), rgba(26, 38, 51, 0.7)) !important;
}

.form-input {
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.7), rgba(26, 38, 51, 0.7)) !important;
}

.name-badge {
    background: linear-gradient(135deg, rgba(42, 52, 65, 0.8), rgba(26, 38, 51, 0.8)) !important;
}
