/* ============================================
   ELI YOUNG — Portfolio 2026
   Premium dark design with creative flair
   Inspired by Obys, Locomotive, Active Theory
   ============================================ */

/* ── Reset & Custom Properties ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Palette */
    --bg: #050505;
    --bg-elevated: #0c0c0c;
    --bg-card: #111111;
    --surface: #1a1a1a;
    --border: rgba(255,255,255,0.06);
    --text: #f0f0f0;
    --text-muted: #888;
    --text-dim: #555;
    --accent: #00ff66;
    --accent-dim: rgba(0,255,102,0.08);
    --accent-glow: rgba(0,255,102,0.25);

    /* Typography */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Spacing */
    --section-pad: clamp(80px, 12vh, 160px);
    --container: 1200px;

    /* Grain overlay */
    --grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
}

html[data-theme="light"],
body[data-theme="light"] {
    --bg: #f5f5f7;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --surface: #e5e5ea;
    --border: rgba(0,0,0,0.1);
    --text: #1d1d1f;
    --text-muted: #86868b;
    --text-dim: #98989d;
    --accent: #22c55e;
    --accent-dim: rgba(34,197,94,0.15);
    --accent-glow: rgba(34,197,94,0.25);
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Film grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: var(--grain);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.3;
    mix-blend-mode: overlay;
}
html[data-theme="light"] body::after,
body[data-theme="light"]::after {
    opacity: 0.08;
    mix-blend-mode: normal;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px);
}



/* ── CLI Boot Sequence ── */
.terminal-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}
.terminal-window {
    width: min(800px, 90vw);
    height: min(500px, 70vh);
    background: rgba(10,12,16,0.95);
    border: 1px solid rgba(0,255,102,0.2);
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0,255,102,0.1), inset 0 0 20px rgba(0,0,0,0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* CSS 3D base */
    transform-style: preserve-3d;
    will-change: transform, opacity;
}
.terminal-header {
    background: rgba(0,0,0,0.8);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,255,102,0.1);
}
.terminal-btns { display: flex; gap: 6px; }
.btn-dot { width: 12px; height: 12px; border-radius: 50%; }
.btn-dot.red { background: #ff5f56; }
.btn-dot.yellow { background: #ffbd2e; }
.btn-dot.green { background: #27c93f; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
}
.terminal-body {
    flex: 1;
    padding: 24px;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    color: var(--accent);
    overflow: hidden;
    text-shadow: 0 0 5px rgba(0,255,102,0.4);
}
.terminal-line { margin-bottom: 4px; }
.terminal-line .status { color: #f0f0f0; margin-right: 12px; }
.terminal-line .highlight { color: #fff; font-weight: 700; }
.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: var(--accent);
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.terminal-skip {
    position: absolute;
    bottom: clamp(16px, 4vh, 32px);
    right: clamp(16px, 4vw, 40px);
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100000;
}
.terminal-skip:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), #22d3ee);
    z-index: 10001;
    pointer-events: none;
    transition: width 60ms linear;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Navigation ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px clamp(20px, 4vw, 60px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(5,5,5,0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.16,1,0.3,1);
}
.nav.visible { transform: translateY(0); }
.nav-logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 32px; }
.nav-link {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    transition: color 0.3s;
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after { width: 100%; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { width: 100%; background: var(--accent); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-muted);
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
}
.theme-toggle .fa-sun {
    display: none;
}
html[data-theme="light"] .theme-toggle .fa-moon,
body[data-theme="light"] .theme-toggle .fa-moon {
    display: none;
}
html[data-theme="light"] .theme-toggle .fa-sun,
body[data-theme="light"] .theme-toggle .fa-sun {
    display: block;
}
html[data-theme="light"] .nav,
body[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}
html[data-theme="light"] .nav-link,
body[data-theme="light"] .nav-link {
    color: #475569;
}
html[data-theme="light"] .nav-link:hover,
body[data-theme="light"] .nav-link:hover {
    color: #0f172a;
}
html[data-theme="light"] .nav-logo,
body[data-theme="light"] .nav-logo {
    color: #16a34a;
}
html[data-theme="light"] .nav-resume,
body[data-theme="light"] .nav-resume {
    border-color: #16a34a;
    color: #15803d;
}
html[data-theme="light"] .nav-resume:hover,
body[data-theme="light"] .nav-resume:hover {
    background: #16a34a;
    color: #ffffff;
}
html[data-theme="light"] .theme-toggle,
body[data-theme="light"] .theme-toggle {
    border-color: rgba(15, 23, 42, 0.16);
    color: #334155;
}
html[data-theme="light"] .theme-toggle:hover,
body[data-theme="light"] .theme-toggle:hover {
    border-color: #16a34a;
    color: #15803d;
}

html[data-theme="light"] .terminal-loader,
body[data-theme="light"] .terminal-loader {
    background: #f3f4f6;
}
html[data-theme="light"] .terminal-window,
body[data-theme="light"] .terminal-window {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: 0 0 28px rgba(34, 197, 94, 0.12), inset 0 0 18px rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .terminal-header,
body[data-theme="light"] .terminal-header {
    background: rgba(245, 245, 247, 0.92);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .terminal-title,
body[data-theme="light"] .terminal-title {
    color: #5f6368;
}
html[data-theme="light"] .mobile-menu,
body[data-theme="light"] .mobile-menu {
    background: rgba(255, 255, 255, 0.95);
}

.nav-resume {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 20px;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    transition: all 0.3s ease;
}
.nav-resume:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 30px var(--accent-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ── Mobile Menu ── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(5,5,5,0.95);
    backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-link {
    font-family: var(--font-display);
    font-size: clamp(28px, 6vw, 48px);
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}
.mobile-link:hover { color: var(--accent); }

/* ── Section Foundations ── */
.section {
    padding: var(--section-pad) 0;
    position: relative;
    z-index: 1;
}
.section-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 24px;
}
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(40px, 7vw, 88px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 48px;
    color: var(--text);
}

/* ── HERO ── */
.hero {
    min-height: 190vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    padding-top: calc(72px + env(safe-area-inset-top, 0px));
    padding-bottom: clamp(40px, 8vh, 100px);
    box-sizing: border-box;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0,255,102,0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(0,100,255,0.04), transparent);
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container);
    padding: clamp(18px, 3vh, 32px) clamp(20px, 4vw, 60px) 0;
    width: 100%;
}
.hero-spacer {
    height: 100vh;
    width: 100%;
    pointer-events: none;
}
.intro-overlay-controls {
    position: absolute;
    top: clamp(88px, 12vh, 132px);
    left: 50%;
    transform: translateX(-50%);
    width: min(var(--container), calc(100vw - clamp(40px, 8vw, 120px)));
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    z-index: 6;
    pointer-events: none;
    transform-style: preserve-3d;
}
.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(20px);
}
.hero-distort-canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateY(16px);
}
.hero-description {
    max-width: 580px;
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(20px);
}
.hero-description strong { color: var(--text); font-weight: 500; }
.hero-description a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hero-description a:hover { text-decoration-color: transparent; }

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    opacity: 0;
    transform: translateY(20px);
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}
.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}
.btn-ghost {
    border-color: var(--border);
    color: var(--text);
    background: transparent;
}
.btn-ghost:hover {
    border-color: var(--text);
    background: rgba(255,255,255,0.04);
}

.hero-stats {
    display: flex;
    gap: 48px;
    opacity: 0;
    transform: translateY(20px);
}
.hero-stat-num {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.02em;
}
.hero-stat-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    margin-top: 4px;
}

.scroll-hint {
    position: absolute;
    bottom: calc(100vh - 58px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease infinite;
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}
.scroll-hint span {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-dim);
}

/* ── ABOUT ── */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: start;
}
.about-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.about-description strong { color: var(--text); font-weight: 600; }
.about-card-stack { display: flex; flex-direction: column; gap: 16px; }
.about-card {
    padding: 24px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}
.about-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-dim), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s;
}
.about-card:hover {
    border-color: rgba(0,255,102,0.15);
    transform: translateX(8px);
}
.about-card:hover::before { opacity: 1; }

/* ── Gradient Border Animation (Cards) ── */
@property --gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}
@keyframes gradient-rotate {
    0% { --gradient-angle: 0deg; }
    100% { --gradient-angle: 360deg; }
}
.project-card,
.about-card,
.leadership-card {
    animation: gradient-rotate 3s linear infinite paused;
}
.project-card:hover,
.about-card:hover,
.leadership-card:hover {
    animation-play-state: running;
    border-color: transparent;
    background-image: linear-gradient(var(--bg-card), var(--bg-card)),
                       conic-gradient(from var(--gradient-angle), var(--accent), #22d3ee, #a78bfa, var(--accent));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 0 20px rgba(0, 255, 102, 0.12), 0 0 40px rgba(34, 211, 238, 0.06);
}

.about-card-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.about-card h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
    position: relative;
    z-index: 1;
}
.about-card p {
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* Python Class & Gallery */
.floating-card { margin-bottom: 24px; }
.code-snippet {
    background: #1e1e1e;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 13px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.code-header {
    background: #2d2d2d;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }
.filename { margin-left: 10px; color: #aaa; font-size: 11px; }
.code-content { padding: 16px; line-height: 1.6; color: #d4d4d4; }
.keyword { color: #569cd6; }
.class-name { color: #4ec9b0; }
.function { color: #dcdcaa; }
.string { color: #ce9178; }

html[data-theme="light"] .code-snippet,
body[data-theme="light"] .code-snippet {
    background: #f4f5f7;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .code-header,
body[data-theme="light"] .code-header {
    background: #e9edf2;
    border-bottom-color: rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .filename,
body[data-theme="light"] .filename {
    color: #6b7280;
}
html[data-theme="light"] .code-content,
body[data-theme="light"] .code-content {
    color: #1f2937;
}

.about-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}
.image-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.4s ease;
}
.image-card:hover { transform: translateY(-5px); }
.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}
.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.image-card:hover .image-overlay { opacity: 1; }
.image-overlay h4 { color: #fff; margin-bottom: 5px; font-family: var(--font-display); font-size: 16px; }
.image-overlay p { color: #ccc; font-size: 12px; }


/* ── EXPERIENCE ── */
.exp-timeline {
    border-left: 1px solid var(--border);
    padding-left: 0;
}
.exp-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
    transition: background 0.4s;
    position: relative;
}
.exp-item::before {
    content: '';
    position: absolute;
    left: -1px; top: 50%;
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--bg);
    transform: translateX(-50%) translateY(-50%);
    z-index: 1;
    display: none;
}
.exp-date {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    padding-top: 4px;
}
.exp-header { margin-bottom: 10px; }
.exp-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.exp-company {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--accent);
    transition: opacity 0.3s;
}
a.exp-company:hover { opacity: 0.7; }
.exp-content p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.exp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.exp-tags span {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 12px;
    border: 1px solid rgba(0,255,102,0.2);
    border-radius: 4px;
    color: var(--accent);
    letter-spacing: 0.04em;
    background: var(--accent-dim);
}
.exp-content p.pub-notice {
    font-size: 11px;
    line-height: 1.6;
    color: var(--text-dim);
    margin: 4px 0 0;
}
.pub-notice a { color: inherit; text-decoration: underline; }

/* ── PROJECTS ── */
.project-featured {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
    position: relative;
}
.project-featured.reverse { grid-template-columns: 1fr 1.3fr; }
.project-featured.reverse .project-featured-media { order: 2; }
.project-featured.reverse .project-featured-info { order: 1; }

.project-featured-media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-card);
    /* Creative perspective tilt */
    transform: perspective(1200px) rotateY(-2deg) rotateX(1deg);
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), box-shadow 0.6s;
}
.project-featured.reverse .project-featured-media {
    transform: perspective(1200px) rotateY(2deg) rotateX(1deg);
}
.project-featured-media:hover {
    transform: perspective(1200px) rotateY(0) rotateX(0) scale(1.02);
    box-shadow: 0 30px 80px rgba(0,255,102,0.08), 0 0 0 1px rgba(0,255,102,0.1);
}
.project-featured-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.project-featured-media:hover img { transform: scale(1.04); }

.project-featured-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s;
}
.project-featured-media:hover .project-featured-overlay { opacity: 1; }
.project-featured-overlay span {
    font-family: var(--font-mono);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    padding: 12px 24px;
    border: 1px solid var(--accent);
    border-radius: 4px;
}

.project-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.project-featured-info h3 {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.project-featured-info p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.project-links {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
}
.project-links a {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.project-links a:hover { opacity: 0.7; }

/* Project Cards Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 24px;
    padding-top: 16px;
}
.project-card {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.project-card:hover {
    border-color: rgba(0,255,102,0.15);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.project-card:hover::before { opacity: 1; }

.project-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.project-card-top > i {
    font-size: 20px;
    color: var(--accent);
}
.project-card-links a {
    color: var(--text-muted);
    font-size: 18px;
    transition: color 0.3s;
}
.project-card-links a:hover { color: var(--accent); }

.project-card h4 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}
.project-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* ── SKILLS MARQUEE ── */
.marquee-wrapper {
    padding: 40px 0;
    overflow: hidden;
    position: relative;
}
.marquee-wrapper::before,
.marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}
.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, var(--bg), transparent);
}
.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(-90deg, var(--bg), transparent);
}

.marquee {
    display: flex;
    width: max-content;
    animation: marqueeScroll 40s linear infinite;
}
.marquee.reverse { animation-direction: reverse; }
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-content {
    display: flex;
    gap: 20px;
    padding: 0 10px;
}
.marquee-item {
    font-family: var(--font-display);
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 50px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(0,255,102,0.15);
    white-space: nowrap;
    transition: all 0.3s;
}
.marquee-item:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 30px var(--accent-glow);
}
.marquee-item.outlined {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}
.marquee-item.outlined:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.skill-block {
    padding: 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.skill-block h3 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.skill-block h3 i { color: var(--accent); }
.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.skill-items span {
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
}

/* ── LEADERSHIP ── */
.leadership-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.leadership-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
}
.leadership-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}
.leadership-card:hover {
    border-color: rgba(0,255,102,0.12);
    transform: translateY(-3px);
}
.leadership-card:hover::after { opacity: 1; }

.leadership-icon {
    width: 48px; height: 48px;
    background: var(--accent-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 18px;
    margin-bottom: 20px;
}
.leadership-card h3 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
}
.leadership-role {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}
.leadership-card > p:last-child {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

/* ── CONTACT ── */
.contact {
    text-align: center;
    padding: var(--section-pad) 0 calc(var(--section-pad) * 0.6);
}
.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(48px, 10vw, 120px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 20px;
    /* Creative gradient text */
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 50%, var(--text) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.contact-sub {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 48px;
    line-height: 1.6;
}
.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-muted);
    transition: all 0.3s;
}
.contact-link i { color: var(--accent); font-size: 16px; }
.contact-link:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--accent-dim);
    transform: translateY(-2px);
}

/* ── FOOTER ── */
.footer {
    padding: 24px 0;
    border-top: 1px solid var(--border);
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}
.footer-socials { display: flex; gap: 16px; }
.footer-socials a {
    color: var(--text-dim);
    font-size: 14px;
    transition: color 0.3s;
}
.footer-socials a:hover { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .nav-links, .nav-resume { display: none; }
    .nav-toggle { display: flex; }

    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-gallery { grid-template-columns: 1fr; gap: 20px; }
    .exp-item { grid-template-columns: 1fr; gap: 8px; }
    .project-featured { grid-template-columns: 1fr; gap: 30px; }
    .project-featured.reverse .project-featured-media { order: 0; }
    .project-featured.reverse .project-featured-info { order: 0; }
    .project-featured-media { transform: none !important; }
    .project-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: 1fr; }
    .leadership-grid { grid-template-columns: 1fr; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .contact-links { flex-direction: column; align-items: center; }
}

@media (max-width: 600px) {
    .hero-title { font-size: clamp(48px, 16vw, 80px); }
    .section-heading { font-size: clamp(32px, 8vw, 56px); }
    .contact-heading { font-size: clamp(36px, 12vw, 80px); }
    .hero-ctas { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
}

/* ── Theme: Lava Blobs ── */
.blob-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -3;
    overflow: hidden;
    background: #000;
    pointer-events: none;
}
html[data-theme="light"] .blob-bg,
body[data-theme="light"] .blob-bg {
    background: radial-gradient(circle at 20% 15%, rgba(134, 239, 172, 0.28), transparent 40%),
                radial-gradient(circle at 85% 10%, rgba(147, 197, 253, 0.2), transparent 44%),
                linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}
.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: floatBlob 20s infinite alternate ease-in-out;
}
.blob-1 {
    width: 40vw; height: 40vw;
    background: rgba(0, 255, 102, 0.15);
    top: -10%; left: -10%;
    animation-delay: 0s;
}
.blob-2 {
    width: 35vw; height: 35vw;
    background: rgba(102, 0, 255, 0.1);
    bottom: -10%; right: -10%;
    animation-delay: -5s;
    animation-duration: 25s;
}
.blob-3 {
    width: 30vw; height: 30vw;
    background: rgba(0, 102, 255, 0.1);
    top: 40%; left: 30%;
    animation-delay: -10s;
    animation-duration: 22s;
}
html[data-theme="light"] .blob-1,
body[data-theme="light"] .blob-1 {
    background: rgba(34, 197, 94, 0.14);
    opacity: 0.38;
}
html[data-theme="light"] .blob-2,
body[data-theme="light"] .blob-2 {
    background: rgba(59, 130, 246, 0.11);
    opacity: 0.3;
}
html[data-theme="light"] .blob-3,
body[data-theme="light"] .blob-3 {
    background: rgba(16, 185, 129, 0.1);
    opacity: 0.28;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10vw, -10vh) scale(1.1); }
    100% { transform: translate(-5vw, 15vh) scale(0.9); }
}

/* ── Intro: Acko-like fixed “stage” (WebGL) + scrolling native content in <main> ── */
/* Stacking: theme canvas behind sections; WebGL egg above hero gradient; copy on top */
#native-content {
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.intro-fixed-frame {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: min(96vw, 1496px);
    perspective-origin: 50% 45%;
    will-change: transform, opacity;
}
.intro-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
.intro-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 75% 65% at 50% 42%, transparent 35%, rgba(0, 0, 0, 0.42) 100%);
    opacity: 0;
    transition: opacity 0.55s ease;
}
[data-theme="light"] .intro-stage::after {
    background: radial-gradient(ellipse 75% 65% at 50% 42%, transparent 40%, rgba(255, 255, 255, 0.28) 100%);
}
body.intro-play-active .intro-stage::after {
    opacity: 1;
}
.intro-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    background: transparent;
}

.hero-grid-dissolve {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(12, 1fr);
    opacity: 0;
    pointer-events: none;
}
.hero-grid-dissolve.active {
    opacity: 1;
}
.hero-grid-dissolve .grid-cell {
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    background: transparent;
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0;
    transition: opacity 120ms linear, transform 120ms linear, filter 120ms linear;
}
[data-theme="light"] .hero-grid-dissolve .grid-cell {
    border-right-color: rgba(0, 0, 0, 0.05);
    border-bottom-color: rgba(0, 0, 0, 0.05);
    background: transparent;
}
@media (max-width: 768px) {
    .hero-grid-dissolve {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(18, 1fr);
    }
}

/* Masthead: play (Acko #play) + title block + track / mute */
.hero-masthead {
    display: contents;
}
.hero-masthead-text {
    min-width: 0;
    margin-bottom: clamp(20px, 4vw, 36px);
}
.hero-masthead-audio {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding-top: 4px;
    pointer-events: auto;
}
.intro-play-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 102, 0.28);
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.12), rgba(10, 12, 14, 0.62));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.32s cubic-bezier(0.16,1,0.3,1), border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
    position: relative;
    isolation: isolate;
}
.intro-play-btn::before,
.intro-play-btn::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.26s ease, transform 0.34s ease;
}
.intro-play-btn::before {
    border: 1px solid rgba(0, 255, 102, 0.28);
    transform: scale(0.94);
}
.intro-play-btn::after {
    border: 1px dashed rgba(255, 255, 255, 0.35);
    inset: -15px;
    transform: scale(0.9) rotate(-8deg);
}
.intro-play-btn:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow), inset 0 0 24px rgba(0,255,102,0.14);
    transform: translateY(-1px) scale(1.06) rotateX(11deg) rotateY(-7deg);
}
.intro-play-btn:hover::before {
    opacity: 1;
    transform: scale(1.08);
}
.intro-play-btn:hover::after {
    opacity: 0.75;
    transform: scale(1.12) rotate(8deg);
}
.intro-play-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.intro-play-btn svg {
    width: 26px;
    height: 26px;
}
.intro-play-btn .intro-pause-icon {
    display: none;
}
.intro-play-btn.playing .intro-play-icon {
    display: none;
}
.intro-play-btn.playing .intro-pause-icon {
    display: block;
}
[data-theme="light"] .intro-play-btn {
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.95), rgba(210, 226, 236, 0.74));
    border-color: rgba(34, 197, 94, 0.45);
    color: var(--accent);
}
.acko-play {
    flex-shrink: 0;
    margin-top: 0;
    align-self: center;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    pointer-events: auto;
}
@media (max-width: 640px) {
    .hero {
        min-height: 180vh;
    }
    .intro-overlay-controls {
        width: calc(100vw - 28px);
        top: clamp(84px, 11vh, 120px);
        align-items: center;
    }
    .hero-masthead-audio {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-top: 0;
    }
    .hero-content {
        padding-top: 0;
    }
    .intro-song-popup {
        max-width: min(85vw, 280px);
    }
}

.intro-song-popup {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(8, 10, 12, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    max-width: min(70vw, 320px);
}
.intro-song-popup.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
[data-theme="light"] .intro-song-popup {
    background: rgba(255, 255, 255, 0.78);
}
.intro-song-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}
.intro-song-name {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.intro-song-artist {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.intro-mute-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(8, 10, 12, 0.45);
    backdrop-filter: blur(10px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.intro-mute-btn:hover,
.intro-mute-btn:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
}
.intro-mute-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
[data-theme="light"] .intro-mute-btn {
    background: rgba(255, 255, 255, 0.65);
}

.intro-motion-hint {
    position: absolute;
    bottom: 96px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    opacity: 0.55;
    pointer-events: none;
    text-align: center;
    max-width: min(92vw, 420px);
}
@media (max-width: 768px) {
    .intro-motion-hint {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .intro-stage::after {
        transition: none;
    }
}

/* ── Background hypercube: first child of #native-content, behind .section layers ── */
.theme-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
}
@media (prefers-reduced-motion: reduce) {
    .theme-canvas {
        transition: none;
    }
}

/* ── Idea 7: Horizontal Scroll Projects ── */
.horizontal-wrapper {
    overflow: hidden;
    width: 100vw;
    padding-left: clamp(20px, 4vw, 60px);
    padding-top: 40px;
    padding-bottom: 40px;
}
.horizontal-container {
    display: flex;
    gap: clamp(40px, 6vw, 100px);
    width: max-content;
    padding-right: clamp(20px, 4vw, 60px);
    align-items: center;
}
.horizontal-container > .project-featured {
    width: 80vw;
    max-width: 1100px;
    flex-shrink: 0;
    margin: 0;
}
.horizontal-container > .project-grid {
    width: 70vw;
    max-width: 900px;
    flex-shrink: 0;
    margin: 0;
}
.projects-intro-panel {
    width: 40vw;
    min-width: 320px;
    max-width: 560px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 clamp(20px, 4vw, 60px);
}

@media (max-width: 768px) {
    .horizontal-wrapper {
        padding-left: 0;
        overflow: visible;
    }
    .horizontal-container {
        flex-direction: column;
        width: 100%;
        padding-right: 0;
        gap: 60px;
    }
    .horizontal-container > .project-featured,
    .horizontal-container > .project-grid {
        width: 100%;
        padding: 0 20px;
    }
    .projects-intro-panel {
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 0 20px;
    }
}
