/* Base Variables & Theme */
:root {
    /* Light Mode - Warm/Clean */
    --bg-color: #fcfbf9;
    --text-primary: #111111;
    --text-secondary: #555555;
    --accent: #1e3a2b; /* Subtle forest accent */
    --border: rgba(0,0,0,0.08);
    --card-bg: #ffffff;
    
    /* Typography */
    /* Playfair Display mimics CLIMAX / Avalone */
    --font-display: 'Playfair Display', serif;
    /* Syne handles the modern geometric vibe of Nulaye / Ronum */
    --font-heading: 'Syne', sans-serif;
    /* Inter as a clean readable body font */
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

[data-theme="dark"] {
    /* Dark Mode with Color Correction */
    /* Muted dark slate, not pure black, easier on eyes */
    --bg-color: #0c0e12;
    --text-primary: #f0f0f0;
    --text-secondary: #909090;
    /* Desaturated mint for dark mode accent */
    --accent: #a5dec0;
    --border: rgba(255,255,255,0.08);
    --card-bg: #14161a;
}

/* Color correction for dark mode images/media */
[data-theme="dark"] img {
    filter: brightness(0.9) contrast(1.1);
}

/* Keep the main profile photo vibrant in dark mode */
[data-theme="dark"] .profile-placeholder img {
    filter: brightness(1) contrast(1.05); /* less dimming */
}

/* Reset & Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto; /* Required for Lenis */
    font-size: 16px;
    overflow-x: hidden;
    overflow-y: scroll; /* Force vertical scroll space */
}

/* Hide native scrollbar for cleaner look */
::-webkit-scrollbar {
    display: none;
}
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

section {
    background: transparent !important;
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--text-primary);
    z-index: 10000;
    mix-blend-mode: difference;
    pointer-events: none;
}

/* Lenis.js Smoothing Adjustments */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Background Graphical Elements (Image 1 style) */
.bg-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--border);
    opacity: 0.6;
    transition: var(--transition);
}

.circle-1 {
    width: 50vw;
    height: 50vw;
    top: -10vw;
    right: -5vw;
}

.circle-2 {
    width: 35vw;
    height: 35vw;
    bottom: -10vw;
    left: -10vw;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    transition: var(--transition);
}

/* Typography Classes */
h1, h2, h3, h4 {
    font-weight: 400;
}

em {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

/* Utility */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

.section-padding {
    padding: 15vh 0;
}

@media (max-width: 1024px) {
    .section-padding {
        padding: 8vh 0;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 2.5rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 4px; /* Minimalist slightly rounded */
    font-weight: 500;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border: 1px solid var(--text-primary);
}

.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    color: var(--bg-color);
}
[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 15px 30px rgba(255,255,255,0.05);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.tags span {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 40px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tags span:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2000; /* High enough to be always on top */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 5vw;
    background-color: rgba(252, 251, 249, 0.8);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] nav.scrolled {
    background-color: rgba(12, 14, 18, 0.8);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 3rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

#theme-toggle {
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] #theme-toggle {
    background-color: rgba(255, 255, 255, 0.05);
}

#theme-toggle:hover {
    background-color: var(--text-primary);
    color: var(--bg-color);
    border-color: var(--text-primary);
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

[data-theme="dark"] #theme-toggle:hover {
    box-shadow: 0 10px 20px rgba(255,255,255,0.05);
}

#theme-toggle i {
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hero Section */
.gs-initial, .gs-reveal {
    opacity: 1;
    visibility: visible;
}

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    padding: 0 5vw;
    padding-top: 160px; /* Safe buffer to clear fixed navigation */
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 50;
    width: 100%;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.hero-subtitle::before, .hero-subtitle::after {
    content: '';
    height: 1px;
    width: 30px;
    background-color: var(--border);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(4rem, 7vw, 7.5rem);
    line-height: 1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-desc {
    font-family: var(--font-body);
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 5rem;
}

.hero-stats {
    display: flex;
    gap: 4rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

/* Hero Visual (Image 2 Inspired) */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    height: 100%;
    min-height: 500px;
}

.profile-container {
    position: relative;
    width: clamp(250px, 25vw, 400px);
    height: clamp(250px, 25vw, 400px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-ring {
    position: absolute;
    width: 140%;
    height: 140%;
    border: 1px solid var(--border);
    border-radius: 24px;
    animation: rotate 40s linear infinite;
}

/* A second ring for depth */
.profile-ring::after {
    content: '';
    position: absolute;
    top: -15%; left: -15%; right: -15%; bottom: -15%;
    border: 1px solid var(--border);
    border-radius: 24px;
    opacity: 0.5;
}

.profile-placeholder {
    width: 320px;
    height: 320px;
    background-color: var(--card-bg);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    z-index: 2;
    border: 8px solid var(--bg-color); /* Separates image from the ring lines */
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.profile-placeholder:hover {
    transform: scale(1.05);
}



.social-circle {
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    z-index: 3;
    pointer-events: none; /* Let clicks pass through except on links */
}

.social-circle a {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.25rem;
    pointer-events: auto;
}

/* Perfect circle positioning */
.social-circle a:nth-child(1) { top: -15px; left: 50%; transform: translateX(-50%); }
.social-circle a:nth-child(2) { bottom: -15px; left: 50%; transform: translateX(-50%); }
.social-circle a:nth-child(3) { top: 50%; left: -25px; transform: translateY(-50%); }

.social-circle a:hover {
    transform: scale(1.15) !important;
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-color);
}
.social-circle a:nth-child(1):hover { transform: translateX(-50%) scale(1.15) !important; }
.social-circle a:nth-child(2):hover { transform: translateX(-50%) scale(1.15) !important; }
.social-circle a:nth-child(3):hover { transform: translateY(-50%) scale(1.15) !important; }


/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.about-text p {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-family: var(--font-heading);
    line-height: 1.5;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 500;
}

.education {
    border-left: 1px solid var(--border);
    padding-left: 3rem;
}

.education h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.edu-item {
    margin-bottom: 3rem;
    position: relative;
}

/* Timeline dot for education */
.edu-item::before {
    content: '';
    position: absolute;
    left: -3rem; /* match padding-left */
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: var(--border);
    transform: translateX(-50%);
    transition: var(--transition);
}

.edu-item:hover::before {
    background-color: var(--text-primary);
    transform: translateX(-50%) scale(1.5);
}

.edu-item h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.edu-item p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

.edu-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    display: inline-block;
    margin-top: 1rem;
    font-family: var(--font-heading);
}

/* Experience Timeline */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 20px;
    width: 1px;
    height: 100%;
    background-color: var(--border);
    transform-origin: top;
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 5rem;
}

.timeline-dot {
    position: absolute;
    left: 16px;
    top: 5px;
    width: 11px;
    height: 11px;
    background-color: var(--bg-color);
    border: 2px solid var(--text-primary);
    border-radius: 50%;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--text-primary);
    transform: scale(1.3);
}

.timeline-date {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 1rem;
}

.timeline-item h3 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.timeline-item h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.timeline-item ul {
    list-style: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.timeline-item li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 2rem;
    font-weight: 300;
}

.timeline-item li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--border);
    transition: var(--transition);
}

.timeline-item:hover li::before {
    color: var(--text-primary);
}

/* Projects Horizontal Scroll */
.projects {
    padding-top: 15vh;
    padding-bottom: 5vh;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background-color: transparent;
}

/* The wrapper we pin and translate */
.projects-container {
    display: flex;
    overflow-x: hidden; /* Hide standard scrollbar */
}

.project-wrapper {
    display: flex;
    padding: 0 5vw;
    padding-bottom: 5vh;
    gap: 4vw;
    width: max-content; /* Critical for horizontal scroll logic to measure width correctly */
    min-height: 50vh;
}

.project-card {
    width: 450px;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    padding: 3.5rem;
    background-color: var(--card-bg); /* Use card-bg specifically for project cards to make them pop over the grid */
    border: 1px solid var(--border);
    backdrop-filter: blur(10px); /* Premium glassmorphism feel */
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border-radius: 4px;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 40px rgba(255,255,255,0.02);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-content h3 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tagline {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.card-number {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--border);
    align-self: flex-end;
    line-height: 1;
    margin-top: 2rem;
    transition: var(--transition);
}

.project-card:hover .card-number {
    color: var(--text-primary);
    opacity: 0.1;
}

.scroll-instruction {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 4rem;
}

.skill-category h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}
.skill-category h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border);
}

.skill-category .tags span {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
    background-color: var(--card-bg);
    border-color: var(--border);
}

/* Footer */
.footer {
    padding: 15vh 5vw 8vh 5vw;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 9rem);
    line-height: 0.9;
    margin-bottom: 3rem;
    letter-spacing: -0.04em;
}

.email-link {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 4rem; /* Reduced from 8rem for better compactness */
    position: relative;
    padding-bottom: 1rem;
}


.email-hint {
    font-size: 0.75rem;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    opacity: 0.4;
    transition: var(--transition);
}

.email-link:hover .email-hint {
    opacity: 1;
    color: var(--text-primary);
    transform: translateX(10px);
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--text-secondary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.email-link:hover {
    color: var(--text-primary);
}

.email-link:hover::after {
    background-color: var(--text-primary);
    transform: scaleX(1);
    transform-origin: left;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 300;
}

.social-links {
    display: flex;
    gap: 3rem;
}

.social-links a {
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    transition: var(--transition);
    position: relative;
}


.social-links a::after {
    content: '↘';
    position: absolute;
    top: -5px;
    right: -15px;
    font-size: 0.7rem;
    opacity: 0.5;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent);
}

.social-links a:hover::after {
    opacity: 1;
    color: var(--accent);
    transform: translate(3px, 3px);
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        padding-top: 15vh;
        gap: 6rem;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-visual {
        order: 1;
        justify-content: center;
        margin-bottom: 4rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .education {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 3rem;
    }
    
    .edu-item::before {
        display: none;
    }
    
    .project-card {
        width: 350px;
        min-width: 300px;
        padding: 2.5rem;
    }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none; /* Desktop hidden */
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 80vw;
    height: 100%;
    background-color: var(--bg-color);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    box-shadow: -20px 0 60px rgba(0,0,0,0.1);
    border-left: 1px solid var(--border);
}

.mobile-menu-overlay.active {
    transform: translateX(0);
}

.mobile-menu-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 10vh 10vw 5vh;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 3.5rem);
    text-transform: uppercase;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.mobile-menu-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.mobile-socials {
    display: flex;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.mobile-socials a {
    color: var(--text-primary);
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
        min-height: auto;
        padding-bottom: 5vh;
    }

    .project-wrapper {
        flex-direction: column;
        width: 100%;
        transform: none !important;
    }

    .project-card {
        width: 100%;
        min-width: 100%;
        margin-bottom: 2rem;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
        font-size: 0.8rem;
    }

    .hero-desc {
        font-size: 1.1rem;
        margin: 0 auto 2rem;
        max-width: 90%;
    }

    .hero-cta {
        justify-content: center;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .education {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 3rem;
    }

    .edu-item::before {
        left: -1rem;
    }
}

@media (max-width: 768px) {
    .email-link {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .email-hint {
        white-space: nowrap;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
        align-items: center;
    }

    .social-links {
        gap: 2rem;
    }

    .social-links a::after {
        display: none;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
    }

    .hero-desc {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }
}

/* ================================
   HI-TECH CUSTOM CURSOR & EFFECTS
   ================================ */
@media (min-width: 1024px) {
    body, a, button {
        cursor: none; /* Hide default mouse on desktop */
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    /* Mix blend mode for high-tech premium feel */
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 6px; 
    height: 6px;
    background-color: #fff; /* Pure white inverts cleanly */
}

.cursor-outline {
    width: 36px; 
    height: 36px;
    border: 1px solid #fff;
    transition: width 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                height 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                background-color 0.3s;
}

.cursor-hover {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Utilities for Text Effects */
.word-anim {
    display: inline-block;
}

/* Certifications Marquee */
.cert-marquee-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    padding: 4rem 0;
}

.cert-marquee-inner {
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
}

.cert-card {
    flex-shrink: 0;
    width: 320px;
    height: 240px;
    border-radius: 4px; /* Match project cards */
    overflow: hidden;
    cursor: zoom-in;
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    position: relative;
}

.cert-card:hover {
    transform: translateY(-8px);
    border-color: var(--text-primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    z-index: 2;
}

[data-theme="dark"] .cert-card:hover {
    box-shadow: 0 20px 40px rgba(255,255,255,0.02);
}

.cert-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.cert-card:hover img {
    transform: scale(1.1);
}

/* Lightbox Utility */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(12, 14, 18, 0.98); /* Deep theme match */
    z-index: 100000;
    display: none;
    opacity: 0;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    backdrop-filter: blur(20px);
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 50px 100px rgba(0,0,0,0.5);
    transform: translateY(30px);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.active .lightbox-content {
    transform: translateY(0);
}

.lightbox-close {
    position: absolute;
    top: 40px;
    right: 5vw;
    font-size: 1.5rem;
    font-family: var(--font-heading);
    letter-spacing: 0.2em;
    color: white;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lightbox-close:hover {
    opacity: 1;
    transform: translateX(-10px);
}

.lightbox-close::before {
    content: 'CLOSE';
    font-size: 0.7rem;
}

.word-wrapper {
    display: inline-block;
    overflow: hidden;
    margin-right: 0.3em;
    padding-bottom: 0.2em; /* prevent clipping descenders */
    vertical-align: top;
}

@media (max-width: 768px) {
    .cert-card {
        width: 260px;
        height: 190px;
    }
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2rem;
    }
    .cert-marquee-container {
        padding: 1.5rem 0;
    }
}

/* FINAL FOOTER PRIORITY RULE */
.footer-bottom {
    opacity: 1 !important;
    visibility: visible !important;
    color: var(--text-secondary);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .footer-bottom {
        font-size: 3vw !important; /* Fluid priority scaling */
        letter-spacing: 0.05em !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 5vw !important;
        white-space: nowrap !important;
        -webkit-text-size-adjust: none !important;
        text-size-adjust: none !important;
    }
}
