/* Same system as the personal portfolio, with a service-bay banner. */
:root {
    --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
    --sans: "Source Sans 3", "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --bg: #f6f4ef;
    --bg-subtle: #ece8e1;
    --surface: #fbfaf6;
    --text: #1c1915;
    --text-secondary: #4e4942;
    --text-tertiary: #756e65;
    --border: #e0dad2;
    --border-strong: #c9c1b6;
    --accent: #7a3324;
    --on-accent: #fbfaf6;
    --status: #2c6b45;

    --nav-h: 72px;
    --max: 1080px;
    --ease: 180ms ease;
}

[data-theme="dark"] {
    --bg: #131210;
    --bg-subtle: #1a1916;
    --surface: #1c1b18;
    --text: #f3efe6;
    --text-secondary: #c8c1b5;
    --text-tertiary: #9a9388;
    --border: #2e2b26;
    --border-strong: #453f38;
    --accent: #e2b48a;
    --on-accent: #1c140e;
    --status: #8fbf9a;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--ease), color var(--ease);
}

::selection {
    background: #e7d3c4;
    color: #1c1915;
}

[data-theme="dark"] ::selection {
    background: #5c4632;
    color: #f3efe6;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

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

.container {
    width: min(var(--max), calc(100% - 3rem));
    margin-inline: auto;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: background-color var(--ease), border-color var(--ease);
}

.navbar.scrolled {
    background: var(--bg);
    border-bottom-color: var(--border-strong);
}

.nav-container {
    width: min(var(--max), calc(100% - 3rem));
    margin-inline: auto;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-strong);
    background: var(--bg-subtle);
    transition: border-color var(--ease);
}

.nav-logo:hover .nav-avatar {
    border-color: var(--accent);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color var(--ease);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width var(--ease);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--ease), color var(--ease);
}

.theme-toggle:hover {
    border-color: var(--text);
}

.theme-toggle svg {
    grid-area: 1 / 1;
}

[data-theme="light"] .theme-toggle .moon,
[data-theme="dark"] .theme-toggle .sun {
    display: none;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding: calc(var(--nav-h) + 3rem) 0 4.5rem;
    color: #f6f4ef;
    overflow: hidden;
    background: #0e0d0b;
}

.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 70% center;
}

.hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(14, 13, 11, 0.88) 0%, rgba(14, 13, 11, 0.72) 42%, rgba(14, 13, 11, 0.18) 100%),
        linear-gradient(180deg, rgba(14, 13, 11, 0.35) 0%, rgba(14, 13, 11, 0.15) 40%, rgba(14, 13, 11, 0.55) 100%);
}

.hero-container {
    position: relative;
    z-index: 1;
    text-align: left;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e7e1d6;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8fbf9a;
    box-shadow: 0 0 0 4px rgba(143, 191, 154, 0.22);
}

.hero-title {
    max-width: 12ch;
    margin-bottom: 1.15rem;
    font-family: var(--serif);
    font-size: clamp(3.4rem, 7vw, 5.75rem);
    font-weight: 560;
    line-height: 0.92;
    letter-spacing: -0.035em;
    color: #f6f4ef;
}

.hero-subtitle {
    max-width: 28rem;
    margin-bottom: 0.85rem;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: #f6f4ef;
}

.hero-meta {
    margin-bottom: 1.15rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: #d9d1c4;
}

.hero-description {
    max-width: 38rem;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #e7e1d6;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.85rem 1.2rem;
    border-radius: 2px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}

.btn-primary {
    background: #f6f4ef;
    color: #1c1915;
}

.btn-primary:hover {
    background: #e2b48a;
    color: #1c140e;
}

.btn-secondary {
    background: transparent;
    color: #f6f4ef;
    border-color: rgba(246, 244, 239, 0.45);
}

.btn-secondary:hover {
    border-color: #f6f4ef;
}

section {
    padding: 6.25rem 0;
}

.section-header {
    max-width: 40rem;
    margin-bottom: 3rem;
    text-align: left;
}

.section-label {
    display: block;
    margin-bottom: 0.7rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.15rem);
    font-weight: 560;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
}

.about,
.education,
.footer {
    background: var(--bg-subtle);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.7fr);
    gap: 4.5rem;
    align-items: start;
}

.about-text .lead {
    margin-bottom: 1.25rem;
    font-family: var(--serif);
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.02em;
    color: var(--text);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.strengths {
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
}

.about-stats {
    display: flex;
    flex-direction: column;
    padding-top: 0.35rem;
}

.stat-card {
    padding: 1.2rem 0 1.15rem;
    border-top: 1px solid var(--border);
    text-align: left;
}

.stat-card:last-child {
    border-bottom: 1px solid var(--border);
}

.stat-number {
    font-family: var(--serif);
    font-size: 3.15rem;
    font-weight: 560;
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: var(--text);
}

.stat-label {
    margin-top: 0.4rem;
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text);
}

.stat-card > .stat-label:first-child {
    margin-top: 0;
    margin-bottom: 0.35rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
}

.stat-description {
    margin-top: 0.15rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.experience-list,
.edu-list,
.skill-list {
    display: flex;
    flex-direction: column;
}

.role-card,
.edu-card {
    display: grid;
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    gap: 1.5rem 2.5rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--border);
}

.role-card:last-child,
.edu-card:last-child,
.skill-list li:last-child {
    border-bottom: 1px solid var(--border);
}

.role-meta p,
.edu-dates {
    color: var(--text-tertiary);
    font-family: var(--mono);
    font-size: 0.75rem;
    line-height: 1.55;
    letter-spacing: 0.02em;
}

.role-body h3,
.edu-card h3 {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 560;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.role-company,
.role-place,
.edu-card p,
.edu-note {
    margin-top: 0.25rem;
    color: var(--text-secondary);
}

.role-meta p {
    white-space: nowrap;
}

.role-body ul {
    margin-top: 0.9rem;
    padding-left: 1.1rem;
    color: var(--text-secondary);
}

.role-body li + li {
    margin-top: 0.45rem;
}

.edu-note {
    font-family: var(--mono);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.skill-list {
    margin-bottom: 3.5rem;
    list-style: none;
}

.skill-list li {
    display: grid;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: 0.35rem 1.5rem;
    align-items: baseline;
    padding: 0.95rem 0;
    border-top: 1px solid var(--border);
}

.skill-name {
    font-weight: 650;
    color: var(--text);
}

.skill-detail {
    color: var(--text-secondary);
}

.languages-header {
    margin-top: 1rem;
}

.contact-info p {
    max-width: 40rem;
    margin-bottom: 1.75rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.contact-methods {
    max-width: 40rem;
    border-top: 1px solid var(--border);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: padding-left var(--ease);
}

a.contact-method::after {
    content: "→";
    margin-left: auto;
    color: var(--accent);
    transition: transform var(--ease);
}

a.contact-method:hover {
    padding-left: 0.3rem;
}

a.contact-method:hover::after {
    transform: translateX(3px);
}

.method-info {
    display: flex;
    flex-direction: column;
}

.method-label {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.method-value {
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--text);
}

.footer {
    padding: 2.5rem 0 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 1.5rem;
}

.footer-brand h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 560;
    letter-spacing: -0.02em;
}

.footer-brand p {
    max-width: 28rem;
    margin-top: 0.15rem;
    color: var(--text-tertiary);
    font-size: 0.92rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color var(--ease);
}

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

.footer-bottom {
    padding-top: 1.15rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media (max-width: 900px) {
    .about-content,
    .role-card,
    .edu-card,
    .skill-list li {
        grid-template-columns: 1fr;
    }

    .about-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
        padding-top: 0;
    }

    .stat-card,
    .stat-card:last-child {
        border: 0;
        border-top: 1px solid var(--border);
        padding-top: 1rem;
    }
}

@media (max-width: 640px) {
    .container,
    .nav-container {
        width: min(var(--max), calc(100% - 2rem));
    }

    .nav-container {
        height: 64px;
        gap: 0.75rem;
    }

    .nav-menu {
        gap: 0.7rem;
    }

    .nav-link {
        font-size: 0.84rem;
    }

    .hero {
        min-height: auto;
        align-items: flex-end;
        padding: 8.5rem 0 3rem;
    }

    .hero-title {
        max-width: none;
    }

    .hero-scrim {
        background:
            linear-gradient(180deg, rgba(14, 13, 11, 0.25) 0%, rgba(14, 13, 11, 0.55) 38%, rgba(14, 13, 11, 0.9) 100%);
    }

    .hero-buttons,
    .btn {
        width: 100%;
    }

    section {
        padding: 4.25rem 0;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 380px) {
    .nav-menu {
        gap: 0.45rem;
    }

    .nav-link {
        font-size: 0.75rem;
    }
}
