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

:root {
    --bg: #0f1117;
    --bg-card: #181a20;
    --bg-card-hover: #1e2028;
    --border: #2a2d37;
    --text: #e4e4e7;
    --text-muted: #8b8d97;
    --accent: #22d3ee;
    --accent-dim: rgba(34, 211, 238, 0.1);
    --green: #4ade80;
    --green-dim: rgba(74, 222, 128, 0.08);
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 760px;
    --radius: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ──────────────────────────────────────────── */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

main {
    flex: 1;
}

/* ── Header / Nav ────────────────────────────────────── */
.header {
    padding: 32px 0 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo .cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background: var(--accent);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.nav-links a svg {
    width: 20px;
    height: 20px;
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
    padding: 64px 0 48px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 320px;
    background: radial-gradient(ellipse, rgba(34, 211, 238, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero h1 {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 8px;
}

.hero h1 .wave {
    display: inline-block;
    animation: wave 2.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 60%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
}

.hero .tagline {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent);
    margin-bottom: 28px;
}

.hero .bio {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    max-width: 620px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}

.tech-tags span {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: var(--bg-card);
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.tech-tags span:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

/* ── Sections ────────────────────────────────────────── */
.section {
    padding: 40px 0;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ── Experience Cards ────────────────────────────────── */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color 0.25s, background 0.25s;
}

.card.current {
    border-color: rgba(34, 211, 238, 0.3);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.05);
}

.card:hover {
    border-color: #3a3d47;
    background: var(--bg-card-hover);
}

.card.current:hover {
    border-color: rgba(34, 211, 238, 0.45);
}

.card-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.card-title {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.card-role {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

.card-date {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.card-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.card-body .chip {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 6px;
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid transparent;
}

/* ── Education ───────────────────────────────────────── */
.edu-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.edu-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--green-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edu-icon svg {
    width: 22px;
    height: 22px;
    color: var(--green);
}

.edu-details h3 {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
}

.edu-details p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--border);
    margin-top: 48px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 16px;
}

.footer-links a {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ── Fade-in animation ───────────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0s; }
.fade-in:nth-child(2) { animation-delay: 0.08s; }
.fade-in:nth-child(3) { animation-delay: 0.16s; }
.fade-in:nth-child(4) { animation-delay: 0.24s; }

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

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 600px) {
    .hero {
        padding: 40px 0 32px;
    }

    .card-header {
        flex-direction: column;
        gap: 4px;
    }

    .card {
        padding: 20px;
    }

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