:root {
    --bg: #0b0b0a;
    --surface: #111110;
    --surface-2: #181816;
    --text: #f4f1ea;
    --muted: #a8a49b;
    --line: rgba(244, 241, 234, 0.12);
    --accent: #d8ff5f;
    --shadow: rgba(0, 0, 0, 0.32);
    --max: 1160px;
}

body.light-mode {
    --bg: #f4f1ea;
    --surface: #fffdf6;
    --surface-2: #ebe6da;
    --text: #141413;
    --muted: #68655f;
    --line: rgba(20, 20, 19, 0.12);
    --accent: #5d7500;
    --shadow: rgba(31, 27, 19, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 80% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 32%),
        var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.55;
}

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

img {
    display: block;
    max-width: 100%;
}

button {
    font: inherit;
}

.site-header,
main,
.site-footer {
    width: min(var(--max), calc(100% - 36px));
    margin: 0 auto;
}

.site-header {
    min-height: 78px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px);
}

.brand {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.nav-links {
    justify-self: center;
    display: flex;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px;
    background: color-mix(in srgb, var(--surface) 84%, transparent);
}

.nav-links a {
    color: var(--muted);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 700;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface-2);
}

.header-actions,
.hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-button,
.resume-button,
.hero-actions a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    color: var(--text);
    font-weight: 700;
}

.theme-button {
    width: 42px;
    cursor: pointer;
}

.resume-button {
    padding: 10px 16px;
    background: var(--text);
    color: var(--bg);
}

.hero {
    min-height: calc(100vh - 78px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: clamp(36px, 7vw, 92px);
    align-items: center;
    padding: 56px 0 86px;
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: -0.055em;
}

h1 {
    max-width: 880px;
    margin: 18px 0 0;
    font-size: clamp(3.75rem, 8vw, 7.4rem);
    line-height: 0.9;
}

.hero-summary {
    max-width: 720px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 1.55vw, 1.25rem);
}

.hero-actions {
    flex-wrap: wrap;
    margin-top: 30px;
}

.hero-actions a {
    gap: 8px;
    padding: 10px 14px;
    color: var(--muted);
}

.hero-actions a:hover,
.resume-button:hover,
.theme-button:hover,
.project-card a:hover {
    transform: translateY(-2px);
}

.profile-card {
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    overflow: hidden;
    box-shadow: 0 24px 70px var(--shadow);
}

.profile-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 22%;
}

.profile-card div {
    padding: 18px;
}

.profile-card strong,
.profile-card span {
    display: block;
}

.profile-card span {
    margin-top: 4px;
    color: var(--muted);
    font-weight: 700;
}

.quick-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.quick-facts article,
.experience-card,
.project-card,
.skills-grid article,
.signal-grid article {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 18px 58px var(--shadow);
}

.quick-facts article {
    padding: 20px;
}

.quick-facts strong {
    display: block;
    font-size: 1.25rem;
}

.quick-facts span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-weight: 700;
}

.section-block {
    padding: clamp(76px, 10vw, 124px) 0 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 26px;
}

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(2.2rem, 4.6vw, 4.4rem);
    line-height: 0.95;
}

.experience-list {
    display: grid;
    gap: 14px;
}

.experience-card {
    padding: clamp(22px, 3vw, 32px);
}

.role-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.role-header h3 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.8rem);
    line-height: 1;
}

.role-header p,
.role-line {
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.role-grid div {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-2);
    padding: 20px;
}

.role-grid h4 {
    margin: 0;
}

.role-grid p,
.project-card p,
.clean-list,
.signal-grid p {
    color: var(--muted);
}

.role-grid p {
    margin: 10px 0 0;
    font-size: 0.95rem;
}

.clean-list {
    margin: 20px 0 0;
    padding-left: 20px;
}

.clean-list li + li {
    margin-top: 10px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.project-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
    padding: 22px;
}

.project-featured {
    grid-column: span 3;
    min-height: 310px;
}

.project-card h3 {
    margin: 0;
    font-size: clamp(1.45rem, 2.8vw, 2.8rem);
    line-height: 1;
}

.project-card:not(.project-featured) h3 {
    font-size: 1.35rem;
}

.project-card p {
    margin: 14px 0 0;
}

.project-card a {
    margin-top: auto;
    padding-top: 20px;
    color: var(--accent);
    font-weight: 800;
}

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

.tags span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--muted);
    padding: 7px 10px;
    font-size: 0.8rem;
    font-weight: 800;
}

.tags.large span {
    padding: 8px 11px;
}

.skills-grid,
.signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.skills-grid article,
.signal-grid article {
    padding: 22px;
}

.skills-grid h3,
.signal-grid h3 {
    margin: 0;
    font-size: 1.35rem;
}

.signal-grid {
    padding-bottom: 74px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid var(--line);
    padding: 26px 0 38px;
    color: var(--muted);
    font-weight: 800;
}

@media (max-width: 980px) {
    .nav-links {
        display: none;
    }

    .hero,
    .quick-facts,
    .role-grid,
    .project-grid,
    .skills-grid,
    .signal-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .profile-card {
        max-width: 360px;
    }

    .project-featured {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .site-header,
    main,
    .site-footer {
        width: min(var(--max), calc(100% - 24px));
    }

    .site-header {
        min-height: 68px;
        grid-template-columns: 1fr auto;
    }

    .brand {
        max-width: 150px;
        line-height: 1.05;
    }

    h1 {
        font-size: 3.35rem;
    }

    .hero-actions,
    .site-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-actions a {
        width: 100%;
    }
}
