/* ===== DESIGN TOKENS ===== */
:root {
    --bg: #09090b;
    --bg-elevated: #131316;
    --surface: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;
    --accent: #818cf8;
    /* Indigo-400 */
    --accent-glow: rgba(129, 140, 248, 0.15);
    --accent-strong: #6366f1;
    /* Indigo-500 */
    --gradient-start: #818cf8;
    --gradient-end: #c084fc;
    /* Purple-400 */
    --font-sans: 'Space Grotesk', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ===== CANVAS ===== */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

/* ===== NAV ===== */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 2rem;
    transition: all 0.4s var(--ease-out-expo);
    backdrop-filter: blur(0px);
}

#nav.scrolled {
    padding: 0.75rem 2rem;
    backdrop-filter: blur(20px);
    background: rgba(9, 9, 11, 0.8);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.blink {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out-expo);
}

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

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

/* ===== SECTION COMMON ===== */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

section {
    padding: 120px 0;
    position: relative;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 4rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

.label-num {
    color: var(--accent);
}

.label-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(to right, var(--accent), transparent);
}

.mono {
    font-family: var(--font-mono);
}

/* ===== HERO ===== */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-name {
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s var(--ease-out-expo) 0.2s forwards;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    line-height: 1.7;
    font-weight: 300;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out-expo) 1s forwards;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out-expo) 0.5s forwards;
}

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

@keyframes pulse-dot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

#hero h1 {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

#hero h1 strong {
    font-weight: 700;
}


.hero-manifesto {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1rem;
    max-width: 700px;
    color: var(--text-primary);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease-out-expo) 0.8s forwards;
}

.hero-manifesto em {
    font-style: italic;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scroll-indicator {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    transition: color 0.3s ease;
    opacity: 0;
    animation: fadeUp 1s var(--ease-out-expo) 1.1s forwards;
}

.scroll-indicator:hover {
    color: var(--text-secondary);
}

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

.scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--text-primary);
    animation: scroll-pulse 2s ease-in-out infinite;
}

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

    50% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.about-image img {
    width: 100%;
    border-radius: 12px;
    filter: grayscale(0.2) contrast(1.1);
    border: 1px solid var(--border);
    transition: all 0.5s var(--ease-out-expo);
}

.about-image:hover img {
    filter: grayscale(0) contrast(1);
    border-color: var(--accent);
    transform: scale(1.02);
}

.large-text {
    font-size: 1.5rem;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.large-text strong {
    color: var(--accent);
    font-weight: 500;
}

.highlight-text {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.body-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.body-text em {
    color: var(--text-primary);
    font-style: normal;
    font-weight: 400;
}

.about-side {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.4s var(--ease-out-expo);
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.05);
}

.stat-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.stat-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ===== FOCUS ===== */
.focus-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.focus-card {
    padding: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.5s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

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

.focus-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px var(--accent-glow);
}

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

.focus-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.focus-num {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.focus-icon {
    color: var(--accent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.focus-card:hover .focus-icon {
    opacity: 1;
}

.focus-card h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.focus-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

/* ===== PUBLICATIONS ===== */
.publications-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.pub-item {
    padding: 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.pub-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, var(--accent-glow), transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pub-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.pub-item:hover::after {
    opacity: 1;
}

.pub-meta {
    display: block;
    font-size: 0.65rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.pub-item h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.pub-authors {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.pub-links {
    display: flex;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.pub-links a {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.pub-links a:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

/* ===== CONNECT ===== */
#connect {
    padding-bottom: 60px;
}

.connect-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 3rem;
}

.connect-content h2 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
}

.social-link:first-child {
    border-top: 1px solid var(--border);
}

.social-link:hover {
    padding-left: 1rem;
}

.social-link:hover .social-icon {
    color: var(--accent);
}

.social-link:hover .social-arrow {
    transform: translateX(4px);
    color: var(--accent);
}

.social-icon {
    color: var(--text-muted);
    transition: color 0.3s ease;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-name {
    font-size: 1.1rem;
    font-weight: 400;
    flex: 1;
}

.social-arrow {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s var(--ease-out-expo);
}

/* ===== FOOTER ===== */
footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal-el {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out-expo);
}

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

/* stagger children */
.reveal-el:nth-child(1) {
    transition-delay: 0s;
}

.reveal-el:nth-child(2) {
    transition-delay: 0.1s;
}

.reveal-el:nth-child(3) {
    transition-delay: 0.2s;
}

/* ===== RESPONSIVE ===== */

/* Tablet */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        max-width: 300px;
        margin: 0 auto;
    }

    .about-side {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .stat-card {
        flex: 1;
        min-width: 200px;
    }

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

    .publications-list {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 640px) {
    section {
        padding: 80px 0;
    }

    .section-container {
        padding: 0 1.25rem;
    }

    #hero {
        padding: 0 1.25rem;
    }

    #hero h1 {
        font-size: clamp(2.5rem, 14vw, 5rem);
    }

    .hero-sub {
        font-size: 1rem;
    }

    .section-label {
        margin-bottom: 2.5rem;
    }

    .large-text {
        font-size: 1.2rem;
    }

    .highlight-text {
        font-size: 1.35rem;
    }

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

    .focus-card {
        padding: 2rem;
    }

    .about-side {
        flex-direction: column;
    }

    .stat-card {
        min-width: unset;
    }

    .footer-inner {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.65rem;
    }
}