/* ========================================
   Variables & Reset
   ======================================== */
:root {
    --bg-primary: #050508;
    --bg-secondary: #0a0a10;
    --bg-card: #0f0f18;
    --bg-card-hover: #14141f;
    --bg-code: #0d1117;
    --accent-primary: #22d3ee;
    --accent-secondary: #0e7490;
    --accent-tertiary: #14324b;
    --accent-glow: rgba(34, 211, 238, 0.15);
    --accent-glow-strong: rgba(34, 211, 238, 0.3);
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(34, 211, 238, 0.2);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light theme overrides */
body.light {
    --bg-primary: #fafafa;
    --bg-secondary: #f0f0f2;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f5f7;
    --bg-code: #1e1e2e;
    --accent-primary: #0e7490;
    --accent-secondary: #065f73;
    --accent-tertiary: #a5e0f0;
    --accent-glow: rgba(14, 116, 144, 0.1);
    --accent-glow-strong: rgba(14, 116, 144, 0.2);
    --text-primary: #111118;
    --text-secondary: #555566;
    --text-muted: #888899;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(14, 116, 144, 0.25);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

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

body * {
    transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========================================
   Cursor Glow
   ======================================== */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover .cursor-glow {
    opacity: 1;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-bracket {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent-primary);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 40%, transparent 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
    font-size: clamp(2.5rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
}

.hero-accent {
    background: linear-gradient(135deg, var(--accent-primary), #67e8f9, var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 480px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.typed-text {
    color: var(--accent-primary);
    font-weight: 500;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: var(--accent-primary);
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow), 0 0 60px rgba(34, 211, 238, 0.08);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--accent-glow-strong), 0 0 80px rgba(34, 211, 238, 0.12);
}

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

.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--accent-glow);
}

.hero-scroll {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.scroll-line {
    width: 40px;
    height: 1px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Hero Image */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-frame {
    position: relative;
    width: 340px;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    filter: contrast(1.05) saturate(1.05);
}

.image-glow {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow:
        0 0 60px var(--accent-glow-strong),
        inset 0 0 60px rgba(34, 211, 238, 0.05);
    z-index: 2;
    pointer-events: none;
}

.image-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-accent);
    pointer-events: none;
}

.image-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    z-index: 4;
    background: rgba(10, 10, 16, 0.85);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-accent);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Hero Stats */
.hero-stats {
    max-width: 1200px;
    margin: 4rem auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
    color: var(--accent-primary);
    letter-spacing: -0.02em;
}

.stat-suffix {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.25rem;
}

/* ========================================
   Marquee
   ======================================== */
.marquee-section {
    overflow: hidden;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.marquee-track {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    animation: marquee 25s linear infinite;
    width: max-content;
}

.marquee-track span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.marquee-track .dot {
    color: var(--accent-primary);
    font-size: 0.6rem;
}

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

/* ========================================
   Sections Common
   ======================================== */
.section {
    padding: 8rem 2rem;
    position: relative;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.section-title .accent {
    color: var(--accent-primary);
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* ========================================
   About Section
   ======================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-headline {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.about-headline .accent {
    color: var(--accent-primary);
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.about-text p strong {
    color: var(--text-primary);
}

.about-text p em {
    color: var(--accent-primary);
    font-style: normal;
}

.about-highlights {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.highlight:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
}

.highlight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.highlight strong {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.15rem;
}

.highlight span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Code Window */
.about-code {
    position: sticky;
    top: 100px;
}

.code-window {
    background: var(--bg-code);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28c840; }

.code-filename {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.code-body {
    padding: 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.8;
    overflow-x: auto;
    color: var(--text-secondary);
}

.code-body .kw { color: #ff7b72; }
.code-body .cls { color: #d2a8ff; }
.code-body .fn { color: #79c0ff; }
.code-body .self { color: #ffa657; }
.code-body .str { color: #a5d6ff; }

/* ========================================
   Projects Section
   ======================================== */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.project-card:hover::before {
    opacity: 1;
}

.project-card.featured {
    background: linear-gradient(135deg, var(--bg-card), rgba(14, 116, 144, 0.08));
    border-color: var(--border-accent);
}

.project-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 0.3rem 0.75rem;
    border-radius: 100px;
    margin-bottom: 1.5rem;
}

.tag-star {
    color: #fbbf24;
}

.project-number {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
}

.project-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    max-width: 640px;
}

.project-details {
    margin-bottom: 1.5rem;
}

.project-details ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.project-details li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    padding-left: 0.25rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tech span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-primary);
    background: var(--accent-glow);
    padding: 0.3rem 0.65rem;
    border-radius: 100px;
    border: 1px solid var(--border-accent);
}

.project-links {
    display: flex;
    gap: 0.75rem;
}

.project-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.project-link:hover {
    color: var(--accent-primary);
    border-color: var(--border-accent);
    background: var(--accent-glow);
}

.projects-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ========================================
   Stack Section
   ======================================== */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stack-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.stack-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(34, 211, 238, 0.06);
}

.stack-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stack-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: var(--accent-glow);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-accent);
    flex-shrink: 0;
}

.stack-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.stack-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.stack-item {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: 100px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stack-item:hover {
    color: var(--accent-primary);
    border-color: var(--border-accent);
    background: var(--accent-glow);
}

/* ========================================
   Experience / Timeline
   ======================================== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 2px var(--accent-primary), 0 0 20px var(--accent-glow-strong);
    position: relative;
    z-index: 1;
}

.timeline-line {
    width: 2px;
    height: 100%;
    min-height: 120px;
    background: linear-gradient(180deg, var(--border-accent), transparent);
    margin-top: 4px;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: var(--transition);
}

.timeline-content:hover {
    border-color: var(--border-accent);
}

.timeline-date {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.timeline-role {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.timeline-company {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-wrapper {
    text-align: center;
}

.contact-headline {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
}

.contact-headline .accent {
    color: var(--accent-primary);
}

.contact-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-align: left;
}

.contact-card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.contact-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent-primary);
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.contact-card strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.contact-card span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-logo {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent-primary);
    margin-right: 0.75rem;
}

.footer-left {
    display: flex;
    align-items: center;
}

/* ========================================
   Scroll Animations
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    margin-left: 0.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border-accent);
    background: var(--accent-glow);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    position: absolute;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

body.light .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle:active svg {
    transform: scale(0.8);
}

/* Light theme specific tweaks */
body.light .hero-bg-grid {
    background-image:
        linear-gradient(rgba(14, 116, 144, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 116, 144, 0.06) 1px, transparent 1px);
}

body.light .cursor-glow {
    background: radial-gradient(circle, rgba(14, 116, 144, 0.08) 0%, transparent 70%);
    opacity: 0 !important;
}

body.light .project-card.featured {
    background: linear-gradient(135deg, var(--bg-card), rgba(14, 116, 144, 0.04));
}

body.light .stack-card:hover {
    box-shadow: 0 10px 40px rgba(14, 116, 144, 0.1);
}

body.light .nav.scrolled {
    background: rgba(250, 250, 250, 0.92);
}

body.light .nav-links.open {
    background: rgba(250, 250, 250, 0.98);
}

body.light .code-window {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Responsive: theme toggle in nav */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

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

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

    .hero-image {
        order: -1;
    }

    .image-frame {
        width: 260px;
        height: 320px;
    }

    .hero-stats {
        gap: 1rem;
    }

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

    .about-code {
        position: static;
    }

    .section-desc {
        margin-left: 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(5, 5, 8, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .section {
        padding: 5rem 1.5rem;
    }

    .project-card {
        padding: 1.75rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .timeline {
        padding-left: 1.5rem;
    }

    .timeline-marker {
        left: -1.5rem;
    }

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