/* ============ Local fonts ============ */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('fonts/space-grotesk-latin.woff2') format('woff2');
}

/* ============ COLOR & TYPE TOKENS — edit these to re-theme the whole site ============ */
:root {
    --color-bg: #F4F8F7;
    --color-surface: #FFFFFF;
    --color-surface-alt: #EEF5F4;
    --color-text: #0E2429;
    --color-text-muted: #506668;
    --color-primary: #FF6B45;
    /* coral — CTAs, links, highlights */
    --color-primary-ink: #FFFFFF;
    --color-secondary: #16897A;
    /* pool teal — badges, timeline */
    --color-secondary-soft: #DCEFEC;
    --color-border: #DCE6E4;
    --color-badge-bg: #E7F2F0;
    --shadow-soft: 0 16px 40px -24px rgba(14, 36, 41, 0.35);

    --font-head: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --color-bg: #0C2024;
        --color-surface: #122C30;
        --color-surface-alt: #0F262A;
        --color-text: #EAF4F2;
        --color-text-muted: #9DB7B9;
        --color-primary: #FF8362;
        --color-primary-ink: #0C2024;
        --color-secondary: #3FCBB6;
        --color-secondary-soft: #163A38;
        --color-border: #21403F;
        --color-badge-bg: #163936;
        --shadow-soft: 0 16px 40px -20px rgba(0, 0, 0, 0.55);
    }
}

:root[data-theme="dark"] {
    --color-bg: #0C2024;
    --color-surface: #122C30;
    --color-surface-alt: #0F262A;
    --color-text: #EAF4F2;
    --color-text-muted: #9DB7B9;
    --color-primary: #FF8362;
    --color-primary-ink: #0C2024;
    --color-secondary: #3FCBB6;
    --color-secondary-soft: #163A38;
    --color-border: #21403F;
    --color-badge-bg: #163936;
    --shadow-soft: 0 16px 40px -20px rgba(0, 0, 0, 0.55);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(76px + var(--safe-t));
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--safe-t);
    padding-bottom: var(--safe-b);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    margin: 0;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Nav ---------- */
header.site-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--color-bg) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding-top: var(--safe-t);
}

.nav-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 17px;
}

.brand .mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

nav.links {
    display: flex;
    gap: 26px;
}

nav.links button {
    background: none;
    border: none;
    font: inherit;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px 0;
    font-size: 14.5px;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}

nav.links button:hover {
    color: var(--color-text);
}

nav.links button.active {
    color: var(--color-text);
    border-color: var(--color-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.lang-switch {
    display: flex;
    gap: 4px;
    background: var(--color-surface-alt);
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
}

.lang-switch button {
    border: none;
    background: none;
    font: inherit;
    font-weight: 600;
    font-size: 12.5px;
    color: var(--color-text-muted);
    padding: 6px 11px;
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}

.lang-switch button.active {
    background: var(--color-secondary);
    color: #fff;
}

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--color-text);
    margin: 3px auto;
}

@media (max-width:760px) {
    nav.links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height .25s ease;
    }

    nav.links.open {
        max-height: 320px;
    }

    nav.links button {
        padding: 14px 24px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--color-border);
        border-left: none;
    }

    .menu-toggle {
        display: block;
    }
}

/* ---------- Hero ---------- */
.hero {
    padding: 64px 0 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

@media (max-width:860px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-secondary);
    background: var(--color-secondary-soft);
    padding: 6px 13px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-secondary);
}

h1.name {
    font-size: clamp(36px, 5.4vw, 58px);
    line-height: 1.05;
    font-weight: 700;
}

.role-line {
    font-size: clamp(18px, 2.4vw, 23px);
    color: var(--color-secondary);
    font-weight: 600;
    margin-top: 12px;
    font-family: var(--font-head);
}

.tagline {
    max-width: 52ch;
    color: var(--color-text-muted);
    font-size: 16.5px;
    margin-top: 18px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 26px;
    font-size: 14.5px;
    color: var(--color-text-muted);
}

.hero-meta .item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-meta svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-secondary);
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 22px;
    border-radius: 11px;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-primary-ink);
    box-shadow: var(--shadow-soft);
}

.btn-ghost {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
}

/* Hero mark: swim-lane + code bracket motif */
.hero-art {
    position: relative;
}

.hero-art svg {
    width: 100%;
    height: auto;
}

/* Hero photo */
.hero-photo-wrap {
    position: relative;
}

.hero-photo-wrap::before {
    content: "";
    position: absolute;
    inset: 20px -20px -20px 20px;
    background: var(--color-secondary-soft);
    border-radius: 24px;
    z-index: 0;
}

.hero-photo-frame {
    position: relative;
    z-index: 1;
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-soft);
    background: var(--color-surface);
}

.hero-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width:860px) {
    .hero-photo-wrap::before {
        inset: 14px -14px -14px 14px;
    }
}

.wave-divider {
    display: block;
    width: 100%;
    height: auto;
    margin-top: 56px;
}

/* ---------- Sections ---------- */
section {
    padding: 76px 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 40px;
}

.section-kicker {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(26px, 3.4vw, 34px);
    font-weight: 700;
}

.section-sub {
    color: var(--color-text-muted);
    margin-top: 12px;
    font-size: 15.5px;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 44px;
}

@media (max-width:820px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

.about-text p {
    color: var(--color-text-muted);
    font-size: 16px;
    margin-bottom: 16px;
}

.fact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fact {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.fact svg {
    width: 20px;
    height: 20px;
    stroke: var(--color-secondary);
    flex-shrink: 0;
    margin-top: 2px;
}

.fact strong {
    display: block;
    font-size: 14.5px;
}

.fact span {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* Experience timeline */
.timeline {
    position: relative;
    padding-left: 28px;
    border-left: 2px solid var(--color-border);
}

.tl-item {
    position: relative;
    padding-bottom: 40px;
}

.tl-item:last-child {
    padding-bottom: 0;
}

.tl-item::before {
    content: "";
    position: absolute;
    left: -38px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--color-secondary);
    border: 3px solid var(--color-bg);
}

.tl-period {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-secondary);
    letter-spacing: .02em;
}

.tl-role {
    font-size: 19px;
    font-weight: 700;
    margin-top: 5px;
}

.tl-company {
    font-size: 14.5px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

.tl-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--color-secondary);
    background: var(--color-secondary-soft);
    padding: 3px 9px;
    border-radius: 999px;
    margin-top: 10px;
}

.tl-bullets {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--color-text-muted);
    font-size: 14.5px;
}

.tl-bullets li {
    margin-bottom: 6px;
}

/* Skills */
.skill-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

@media (max-width:700px) {
    .skill-groups {
        grid-template-columns: 1fr;
    }
}

.skill-group {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 24px;
}

.skill-group h3 {
    font-size: 15px;
    margin-bottom: 16px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: none;
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chip {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--color-badge-bg);
    border-radius: 11px;
    padding: 8px 12px 8px 8px;
}

.chip .badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    flex-shrink: 0;
}

.chip .badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chip span.label {
    font-size: 13.5px;
    font-weight: 500;
}

/* Languages */
.lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

@media (max-width:700px) {
    .lang-grid {
        grid-template-columns: 1fr;
    }
}

.lang-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 22px;
}

.lang-card .lname {
    font-size: 17px;
    font-weight: 700;
}

.lang-card .llevel {
    font-size: 13.5px;
    color: var(--color-secondary);
    font-weight: 600;
    margin-top: 4px;
}

.bar-track {
    height: 8px;
    border-radius: 999px;
    background: var(--color-badge-bg);
    margin-top: 16px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--color-secondary);
}

/* Beyond work */
.beyond {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 40px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    align-items: center;
}

@media (max-width:700px) {
    .beyond {
        grid-template-columns: 1fr;
        padding: 28px;
    }
}

.beyond-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--color-secondary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.beyond-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--color-secondary);
}

.beyond h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.beyond p {
    color: var(--color-text-muted);
    font-size: 15.5px;
}

/* Contact / footer */
footer {
    background: var(--color-surface-alt);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 calc(40px + var(--safe-b));
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 32px;
    align-items: flex-start;
}

.footer-title {
    font-size: 26px;
    font-weight: 700;
    max-width: 360px;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    text-decoration: none;
    color: var(--color-text);
}

.contact-list svg {
    width: 17px;
    height: 17px;
    stroke: var(--color-secondary);
    flex-shrink: 0;
}

.footer-bottom {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    font-size: 13px;
    color: var(--color-text-muted);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---------- Download PDF button ---------- */
.btn-download {
    font-family: inherit;
}

/* ============ Print / PDF export ============ */
@media print {
    @page {
        size: A4;
        margin: 15mm 14mm;
    }

    /* keep the document light even if the OS/site is in dark mode */
    :root,
    :root[data-theme="dark"] {
        --color-bg: #fff !important;
        --color-surface: #fff !important;
        --color-surface-alt: #fff !important;
        --color-text: #16232a !important;
        --color-text-muted: #5b6b70 !important;
        --color-primary: #c1502f !important;
        --color-secondary: #0f6e62 !important;
        --color-secondary-soft: #fff !important;
        --color-border: #d9e0de !important;
        --color-badge-bg: #fff !important;
        --shadow-soft: none !important;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    html,
    body {
        background: #fff !important;
        color: var(--color-text);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 11.5px;
        line-height: 1.5;
    }

    .site-nav,
    .wave-divider,
    .hero-cta,
    .menu-toggle,
    .lang-switch,
    .btn-download,
    .hero-photo-wrap::before,
    .fact svg,
    .beyond-icon {
        display: none !important;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    .wrap {
        max-width: 100%;
        padding: 0;
    }

    /* flat, ruled sections instead of alternating background "cards" */
    section {
        padding: 10px 0;
    }

    section+section {
        border-top: 1px solid var(--color-border);
    }

    .hero {
        padding: 0 0 12px;
    }

    .hero-grid {
        grid-template-columns: 1fr auto;
        gap: 18px;
        align-items: center;
    }

    .hero-photo-wrap,
    .hero-photo-frame {
        width: 74px;
        height: 74px;
    }

    .hero-photo-frame {
        border-radius: 50%;
    }

    .eyebrow {
        display: none;
    }

    h1.name {
        font-size: 24px;
    }

    .role-line {
        font-size: 13.5px;
        margin-top: 4px;
    }

    .tagline {
        max-width: 100%;
        font-size: 11.5px;
        margin-top: 8px;
    }

    .hero-meta {
        margin-top: 10px;
        gap: 14px;
        font-size: 11px;
    }

    .hero-meta svg {
        width: 13px;
        height: 13px;
    }

    .section-kicker {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 4px !important;
    }

    .section-sub {
        font-size: 11px;
        margin-top: 4px;
    }

    .section-head {
        margin-bottom: 8px;
        break-after: avoid;
    }

    h1,
    h2,
    h3 {
        break-after: avoid;
    }

    /* strip the boxed "card" look — plain text blocks read cleaner on paper */
    .fact-card,
    .skill-group,
    .lang-card,
    .beyond {
        background: none;
        border: none;
        padding: 0;
    }

    .fact-card {
        gap: 8px;
    }

    .about-text p {
        font-size: 11.5px;
        margin-bottom: 10px;
    }

    .fact strong {
        font-size: 11.5px;
    }

    .fact span {
        font-size: 11px;
    }

    .about-grid,
    .skill-groups,
    .lang-grid {
        gap: 16px;
    }

    /* experience timeline is left out of the PDF to keep it to 1-2 pages */
    #experience {
        display: none !important;
    }

    .skill-groups {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 28px;
    }

    .skill-group h3 {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .skill-chips {
        gap: 6px 14px;
    }

    .chip {
        background: none;
        padding: 0;
        gap: 6px;
        break-inside: avoid;
    }

    .chip .badge {
        width: 15px;
        height: 15px;
        border: none;
        background: none;
        padding: 0;
    }

    .chip span.label {
        font-size: 11px;
    }

    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .lang-card .lname {
        font-size: 13px;
    }

    .lang-card .llevel {
        font-size: 11px;
    }

    .bar-track {
        height: 5px;
        margin-top: 8px;
        background: #e7ecea;
    }

    .beyond {
        display: block;
        break-inside: avoid;
    }

    .beyond h3 {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .beyond p {
        font-size: 11px;
    }

    footer {
        padding: 14px 0 0;
        background: #fff !important;
        border-top: none;
    }

    .footer-title {
        font-size: 15px;
    }

    .contact-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px 18px;
    }

    .contact-list svg {
        width: 13px;
        height: 13px;
    }

    .contact-list a {
        font-size: 11px;
    }

    .footer-bottom {
        display: none;
    }
}
