:root {
    color-scheme: dark;
    --background: #151515;
    --surface: #191919;
    --line: #414141;
    --ink: #f5f3ed;
    --muted: #c2beb6;
    --accent: #e3c48e;
    --gutter: clamp(1.25rem, 3.3vw, 3.75rem);
    font-family: system-ui, sans-serif;
    background: var(--background);
    color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
}

a { color: inherit; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(.65rem, 2.2vh, 1.25rem) var(--gutter);
    border-block: 1px solid var(--line);
}
.name {
    font-size: clamp(1.3rem, 2.1vw, 2rem);
    font-weight: 750;
    letter-spacing: -.06em;
    text-decoration: none;
}
.name span { color: var(--accent); }
nav { display: flex; gap: clamp(.75rem, 3vw, 2.75rem); }
nav a { font-size: .9rem; text-decoration: none; }

.layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
    min-height: 0;
    border-bottom: 1px solid var(--line);
}
.profile {
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 4vh, 3rem);
    overflow-y: auto;
    padding: clamp(1rem, 5vh, 4rem) var(--gutter);
    border-right: 1px solid var(--line);
    background: var(--surface);
}
h1, h2, p, ul { margin: 0; }
.profile h1 {
    font-size: clamp(1.6rem, min(3.4vw, 6vh), 3.4rem);
    line-height: 1.02;
    letter-spacing: -.065em;
    text-wrap: balance;
}
.intro {
    margin-top: .85rem;
    max-width: 30ch;
    color: var(--muted);
    font-size: clamp(.88rem, 1.15vw, 1.08rem);
    line-height: 1.5;
}
.profile h2 { margin-bottom: .65rem; font-size: .85rem; color: var(--accent); }
.profile ul { display: flex; flex-wrap: wrap; gap: .4rem .7rem; list-style: none; padding: 0; }
.skills li {
    padding: .22rem .48rem;
    border: 1px solid var(--line);
    font-size: .78rem;
}
.contact {
    margin-top: auto;
    padding-top: clamp(.75rem, 2.5vh, 1.5rem);
    border-top: 1px solid var(--line);
    font-size: .84rem;
    line-height: 1.4;
}
.contact p { margin-top: .65rem; }
.contact p { color: var(--muted); }
.contact .contact-note { margin: 0 0 .65rem; }
.contact a { text-underline-offset: .2em; }

.work {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-behavior: smooth;
}
.work:focus-visible { outline-offset: -3px; }
.panel {
    display: grid;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    align-items: center;
    min-height: 100%;
    padding: var(--gutter);
}
.panel + .panel { border-top: 1px solid var(--line); }
.panel::before {
    position: absolute;
    z-index: -1;
    inset: -24%;
    background: radial-gradient(ellipse at 73% 43%, var(--glow), transparent 43%);
    transform: translateY(var(--parallax-offset, 0px));
    content: "";
}
.panel-services { --glow: #433525; }
.panel-projects { --glow: #343943; }
.panel h2 {
    font-size: clamp(3rem, min(10vw, 20vh), 10rem);
    line-height: .95;
    letter-spacing: -.083em;
}

@media (max-width: 740px) {
    .layout { display: block; overflow-y: auto; scroll-behavior: smooth; }
    .profile { overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
    .profile h1 { text-wrap: initial; }
    .work { overflow: visible; }
    .panel { min-height: 80vh; min-height: 80dvh; }
}

@media (prefers-reduced-motion: reduce) {
    .work, .layout { scroll-behavior: auto; }
    .panel::before { transform: none; }
}

.service-content h2 {
    font-size: clamp(2.75rem, min(8vw, 13vh), 7rem);
}
.service-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 clamp(.85rem, 3vw, 3rem);
    max-width: 66rem;
    margin-top: clamp(1rem, 4vh, 2.75rem);
    padding: 0;
    list-style: none;
}
.service-list li {
    border-top: 1px solid var(--line);
    padding-block: clamp(.55rem, 1.6vh, 1.2rem);
    font-size: clamp(.9rem, 1.6vw, 1.25rem);
    line-height: 1.4;
}

@media (min-width: 741px) {
    .layout { --profile-inset-top: clamp(.8rem, 3vh, 2rem); }
    .profile {
        gap: clamp(.75rem, 2vh, 1.5rem);
        padding: var(--profile-inset-top) clamp(.85rem, 2.5vw, 3rem);
    }
    .profile h1 { font-size: clamp(1.6rem, min(3.2vw, 5vh), 3.2rem); }
    .skills ul { gap: .3rem; }
    .skills li { padding: .15rem .36rem; }
    .contact { padding-top: clamp(.65rem, 1.7vh, 1.25rem); }
    .panel-services {
        align-items: start;
        padding-top: var(--profile-inset-top);
    }
}

@media (max-width: 560px) {
    .service-list { grid-template-columns: 1fr; }
}

.section-intro {
    max-width: 62ch;
    margin-top: .9rem;
    color: var(--muted);
    line-height: 1.5;
}
.panel-projects { align-items: start; }
.project-content { min-width: 0; }
.project-content h2 { font-size: clamp(2.75rem, min(8vw, 13vh), 7rem); }
.project-table-scroll { overflow-x: auto; margin-top: 1.5rem; }
.project-table { width: 100%; border-collapse: collapse; text-align: left; }
.project-table caption { padding-bottom: .6rem; text-align: left; color: var(--accent); }
.project-table th, .project-table td { padding: .7rem; border-bottom: 1px solid var(--line); }
.project-table thead { background: var(--surface); }
.project-table tbody th { font-weight: 500; }

.revenue { margin-top: .8rem; color: var(--muted); }
.revenue strong { color: var(--accent); }
.locations { margin-top: .65rem; }
.locations summary { cursor: pointer; color: var(--accent); }
.locations ul { margin-top: .6rem; }

.country-flag {
    object-fit: contain;
    vertical-align: middle;
}
