/* Brand = emerald→turquoise. Work turquoise→sapphire, academia sapphire */
:root {
    --bg: #0b0d12;
    --surface: #12151d;
    --border: #232837;
    --text: #e6e8ee;
    --muted: #8a91a5;
    --accent: #10b981;
    --accent-2: #5eead4;
    color-scheme: dark light;
}
#experience { --accent: #2dd4bf; --accent-2: #60a5fa; }
#education { --accent: #3b82f6; --accent-2: #93b4ff; }

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f7f8fb;
        --surface: #ffffff;
        --border: #e3e6ee;
        --text: #141722;
        --muted: #5c6378;
        --accent: #047857;
        --accent-2: #0d9488;
    }
    #experience { --accent: #0f766e; --accent-2: #1d4ed8; }
    #education { --accent: #1e40af; --accent-2: #2563eb; }
}

/* declared per element so it picks up each section's accents */
:root, section { --grad: linear-gradient(120deg, var(--accent), var(--accent-2)); }

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
    font: 16px/1.65 Inter, system-ui, sans-serif;
    background:
        radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent),
        radial-gradient(40rem 25rem at -10% 20%, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent),
        var(--bg);
    background-repeat: no-repeat;
    color: var(--text);
}

a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

/* Nav */
.nav {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; gap: 2rem;
    padding: .9rem max(1rem, calc((100vw - 64rem) / 2));
    background: color-mix(in srgb, var(--bg) 75%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.logo { font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.logo span { color: var(--accent-2); }
.nav ul { display: flex; gap: .25rem; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav ul a {
    display: block; padding: .35rem .75rem; border-radius: 99px;
    color: var(--muted); text-decoration: none; font-size: .9rem; white-space: nowrap;
    transition: color .2s, background .2s;
}
.nav ul a:hover { color: var(--text); background: var(--surface); }

/* Layout */
.hero, main, footer { max-width: 64rem; margin: 0 auto; padding: 0 1rem; }
section { padding: 4rem 0; }
h2 {
    font-size: .8rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--accent-2); margin-bottom: 1.5rem;
}
h3 { font-size: 1.15rem; line-height: 1.3; }
.muted, time, .meta { color: var(--muted); font-size: .9rem; }
.eyebrow { color: var(--accent-2); font-weight: 600; font-size: .85rem; letter-spacing: .05em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: border-color .25s, transform .25s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }

/* Buttons & socials */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.btn {
    padding: .7rem 1.3rem; border-radius: 99px; font-weight: 600; text-decoration: none;
    border: 1px solid var(--border); background: var(--surface);
    transition: transform .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn.primary { background: var(--grad); color: #0b0d12; border: 0; }

.socials { display: flex; gap: 1.25rem; margin-top: 1.75rem; font-size: 1.3rem; }
.socials a { color: var(--muted); transition: color .2s; }
.socials a:hover { color: var(--accent-2); }

/* Hero */
.hero {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3rem;
    min-height: calc(100svh - 4rem); padding-block: 4rem;
}
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.5rem); line-height: 1.05; letter-spacing: -.03em; margin: .5rem 0 1.25rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.lead a { color: var(--text); text-decoration-color: var(--accent); }
.avatar {
    width: clamp(10rem, 24vw, 17rem); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
    padding: 4px; background: var(--grad);
    box-shadow: 0 0 80px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* About */
.about { display: grid; grid-template-columns: 1fr 14rem; gap: 3rem; }
.about p + p { margin-top: 1rem; }
.stats { display: grid; gap: 1rem; align-content: start; }
.stats div { border-left: 2px solid var(--accent); padding-left: 1rem; }
.stats dt { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.stats dd { color: var(--muted); font-size: .9rem; }

/* Experience */
.timeline { display: grid; gap: 1rem; }
.timeline header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; align-items: baseline; }
.timeline header span { color: var(--muted); font-size: .9rem; }
.role { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; margin-top: 1rem; }
.role h4 { color: var(--accent); font-weight: 600; }
.timeline ul { margin-top: .5rem; }
.timeline ul li { position: relative; padding-left: 1.1rem; color: var(--muted); }
.timeline ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); }


.grid h3 { margin: .25rem 0; }
.grid p + p { margin-top: .75rem; }

/* Skills */
.skills { display: flex; flex-wrap: wrap; gap: .5rem; }
.skills dt { flex-basis: 100%; font-weight: 600; margin-top: 1rem; }
.skills dt:first-child { margin-top: 0; }
.skills dd, .tags li {
    padding: .3rem .8rem; border-radius: 99px; font-size: .875rem;
    background: var(--surface); border: 1px solid var(--border);
}

/* Contact */
.contact { text-align: center; padding: 3rem 1.5rem; }
.email {
    display: inline-block; margin: 1rem 0; text-decoration: none;
    font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: 800;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.contact .socials { justify-content: center; }

footer { padding-block: 2rem 3rem; text-align: center; color: var(--muted); font-size: .85rem; }

/* Scroll reveal, CSS-only where supported */
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .card { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
        @keyframes reveal { from { opacity: 0; translate: 0 2rem; } }
    }
}

/* Mobile */
@media (max-width: 720px) {
    .nav { flex-direction: column; align-items: stretch; gap: .5rem; padding-block: .6rem; }
    .nav ul { margin-left: -.75rem; }
    .hero { grid-template-columns: 1fr; text-align: left; min-height: auto; gap: 2rem; padding-top: 2rem; }
    .avatar { order: -1; width: 8rem; }
    .about { grid-template-columns: 1fr; gap: 2rem; }
    .stats { grid-template-columns: repeat(3, 1fr); }
    section { padding: 3rem 0; }
}

.quote { display: block; width: fit-content; margin: 0 auto .75rem; font-size: 1.25rem; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tags li { font-size: .8rem; color: var(--accent-2); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }

/* Language switch */
.lang { display: flex; border: 1px solid var(--border); border-radius: 99px; padding: 2px; font-size: .8rem; font-weight: 600; }
.lang a { padding: .2rem .6rem; border-radius: 99px; text-decoration: none; color: var(--muted); }
.lang a[href]:hover { color: var(--text); }
.lang a[aria-current] { background: var(--grad); color: #0b0d12; }
@media (max-width: 720px) { .lang { position: absolute; top: .6rem; right: 1rem; } }
