/* Theme tokens */
:root {
    --bg: #0b0d12;
    --surface: #121620;
    --text: #e6e9f0;
    --muted: #9aa3b5;
    --accent: #6ee7b7;
    --border: #232a38;
    --radius: 10px;
    --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #fafaf7;
        --surface: #ffffff;
        --text: #15181f;
        --muted: #5b6474;
        --accent: #0f8a61;
        --border: #e2e4dc;
    }
}

:root[data-theme="light"] {
    --bg: #fafaf7;
    --surface: #ffffff;
    --text: #15181f;
    --muted: #5b6474;
    --accent: #0f8a61;
    --border: #e2e4dc;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
}
.logo {
    font-family: var(--mono);
    font-weight: 500;
    color: var(--accent);
    font-size: 1.1em;
}
.logo:hover { text-decoration: none; }
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    font-size: 0.92em;
}
nav a { color: var(--muted); }
nav a:hover { color: var(--text); text-decoration: none; }
.nav-resume {
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 0 10px;
}

/* Hero */
.hero { padding-top: 96px; padding-bottom: 56px; }
.eyebrow {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 0.9em;
    margin-bottom: 8px;
}
.hero h1 {
    font-size: clamp(2.6rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.lead {
    color: var(--muted);
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    max-width: 640px;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
    display: inline-block;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95em;
    background: var(--surface);
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
}
.btn.primary:hover { color: var(--bg); opacity: 0.9; }

/* Sections */
.section { padding-top: 72px; }
.section h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 28px;
}
.section h2 span {
    font-family: var(--mono);
    color: var(--accent);
    font-size: 0.85em;
    font-weight: 400;
}
.section h2::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}
.section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 12px;
}

/* About */
.about {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 40px;
    align-items: start;
}
.about-text p { color: var(--muted); }
.about-text h3 { margin-top: 24px; }
.about-photo {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    justify-self: end;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}
.tags li {
    font-family: var(--mono);
    font-size: 0.8em;
    color: var(--accent);
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 999px;
    padding: 4px 12px;
}

/* Experience */
.job {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}
.job header { margin-bottom: 12px; }
.job h3 { font-size: 1.1rem; margin-bottom: 4px; }
.job .at { color: var(--accent); font-weight: 500; }
.meta {
    font-family: var(--mono);
    font-size: 0.82em;
    color: var(--muted);
    margin: 0;
}
.job ul { list-style: none; }
.job li {
    position: relative;
    padding-left: 20px;
    color: var(--muted);
    margin-bottom: 8px;
}
.job li:last-child { margin-bottom: 0; }
.job li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.sub-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
}
.plain { list-style: none; }
.plain li { color: var(--muted); margin-bottom: 6px; font-size: 0.95em; }

/* Projects */
.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.project {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
}
.project:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
}
.project h3 { font-size: 1.15rem; margin-bottom: 8px; }
.project p { color: var(--muted); font-size: 0.95em; flex: 1; }
.project-link {
    font-family: var(--mono);
    font-size: 0.82em;
    color: var(--accent);
    margin-top: 8px;
}

/* Contact */
.contact { text-align: center; padding-bottom: 24px; }
.contact h2 { text-align: left; }
.contact > p { color: var(--muted); max-width: 560px; margin: 0 auto 24px; }
.social {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 28px;
    flex-wrap: wrap;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 72px;
    padding: 28px 0;
    color: var(--muted);
    font-size: 0.9em;
    text-align: center;
}
.site-footer p { margin: 0 0 4px; }
.site-footer .small { font-size: 0.85em; }

/* Mobile */
@media (max-width: 720px) {
    .hero { padding-top: 56px; }
    .about { grid-template-columns: 1fr; }
    .about-photo { justify-self: start; max-width: 160px; }
    .sub-grid, .project-grid { grid-template-columns: 1fr; }
    .section h2 { font-size: 1.35rem; }
    nav { font-size: 0.85em; gap: 4px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
