:root,
[data-theme="light"] {
    --text-xs: clamp(0.75rem, 0.72rem + 0.12vw, 0.82rem);
    --text-sm: clamp(0.92rem, 0.9rem + 0.12vw, 1rem);
    --text-base: clamp(1rem, 0.98rem + 0.12vw, 1.08rem);
    --text-lg: clamp(1.15rem, 1.06rem + 0.32vw, 1.35rem);
    --text-xl: clamp(1.65rem, 1.35rem + 1vw, 2.2rem);
    --text-2xl: clamp(2.5rem, 1.8rem + 2.8vw, 4rem);

    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    --bg: #f5f4ef;
    --surface: #fbfaf6;
    --line: rgba(20, 24, 22, 0.12);
    --soft-line: rgba(20, 24, 22, 0.08);
    --text: #171b18;
    --muted: #5f665f;
    --accent: #234f52;
    --inverse: #f8f7f3;
    --shadow: 0 8px 24px rgba(10, 15, 12, 0.05);
    --radius: 0.9rem;
    --radius-full: 9999px;
    --content: 980px;
    --font-body: "General Sans", sans-serif;
    --font-display: "Zodiak", Georgia, serif;
}

[data-theme="dark"] {
    --bg: #111412;
    --surface: #171b18;
    --line: rgba(240, 243, 239, 0.12);
    --soft-line: rgba(240, 243, 239, 0.08);
    --text: #eef1ed;
    --muted: #b4bbb4;
    --accent: #88b8b8;
    --inverse: #111412;
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

h3 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
    letter-spacing: -0.01em;
}

p {
    margin: 0;
    max-width: 62ch;
    color: var(--muted);
}
a {
    color: inherit;
    text-decoration: none;
}
button {
    font: inherit;
    background: none;
}
svg {
    display: block;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 0.35rem;
}

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

.header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--bg) 90%, transparent);
    border-bottom: 1px solid var(--soft-line);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
    min-height: 72px;
    padding: var(--space-4) 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 44px;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
}

.brand-text {
    display: grid;
    gap: 0.1rem;
}

.brand-text strong {
    font-size: var(--text-sm);
    font-weight: 600;
}

.brand-text span {
    font-size: var(--text-xs);
    color: var(--muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.nav a,
.theme-toggle,
.button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

.nav a {
    padding: 0 var(--space-3);
    font-size: var(--text-sm);
    color: var(--muted);
}

.theme-toggle {
    width: 44px;
    border: 1px solid var(--line);
    color: var(--muted);
    cursor: pointer;
}

.button {
    padding: 0 var(--space-5);
    border: 1px solid var(--line);
    font-size: var(--text-sm);
    font-weight: 600;
}

.button.primary {
    background: var(--text);
    color: var(--inverse);
    border-color: var(--text);
}

main section {
    padding-block: clamp(var(--space-12), 8vw, var(--space-20));
    border-bottom: 1px solid var(--soft-line);
}

.hero {
    padding-top: clamp(var(--space-10), 7vw, var(--space-16));
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: var(--space-8);
    align-items: start;
}

.eyebrow,
.section-label {
    display: inline-block;
    margin-bottom: var(--space-4);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--muted);
}

.hero h1 {
    font-size: var(--text-2xl);
    max-width: 11ch;
    margin-bottom: var(--space-5);
}

.actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-6);
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    border-top: 1px solid var(--soft-line);
}

.facts strong {
    display: block;
    font-size: var(--text-lg);
    margin-bottom: 0.15rem;
}

.facts span {
    display: block;
    font-size: var(--text-xs);
    color: var(--muted);
}

.panel,
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.panel {
    padding: var(--space-6);
}

.portrait {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    padding: 0;
}

.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-side {
    display: grid;
    gap: var(--space-4);
}

.plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-4);
}

.plain-list li:not(:last-child) {
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--soft-line);
}

.plain-list strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: var(--text-sm);
}

.section-head {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.section-head h2 {
    font-size: var(--text-xl);
    max-width: 12ch;
}

.grid-two,
.grid-three {
    display: grid;
    gap: var(--space-4);
}

.anchor {
    scroll-margin-top: 2rem;
}

.grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
    padding: var(--space-5);
    display: grid;
    gap: var(--space-3);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0.15rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--muted);
    background: transparent;
}

footer {
    padding: var(--space-6) 0 var(--space-8);
    color: var(--muted);
    font-size: var(--text-xs);
}

@media (max-width: 900px) {
    .hero-grid,
    .grid-two,
    .grid-three {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .nav {
        width: 100%;
        justify-content: flex-start;
        gap: var(--space-2);
    }

    /* Hide theme toggle on mobile since phones sync via system media queries */
    .theme-toggle {
        display: none;
    }

    /* With the toggle hidden, the primary contact button becomes the last child and pushes cleanly to the right */
    .nav .button {
        margin-left: auto;
    }

    .facts {
        grid-template-columns: 1fr;
    }

    .anchor {
        scroll-margin-top: 130px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
