:root {
    color-scheme: light;
    --page-background: #f8f6f1;
    --surface: rgba(255, 255, 255, 0.6);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --text-primary: #1b1b1b;
    --text-muted: #5a5a5a;
    --accent: #2d6a4f;
    --accent-soft: rgba(45, 106, 79, 0.12);
    --border: rgba(28, 28, 28, 0.08);
    --shadow-soft: 0 20px 60px rgba(18, 25, 38, 0.08);
    --shadow-ring: inset 0 0 0 1px rgba(28, 28, 28, 0.04);
    --font-sans: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page-background: #0f1115;
    --surface: rgba(24, 26, 32, 0.8);
    --surface-strong: rgba(24, 26, 32, 0.95);
    --text-primary: #f1f3f8;
    --text-muted: #aeb5c2;
    --accent: #74c69d;
    --accent-soft: rgba(116, 198, 157, 0.14);
    --border: rgba(228, 235, 250, 0.08);
    --shadow-soft: 0 25px 70px rgba(6, 9, 14, 0.65);
    --shadow-ring: inset 0 0 0 1px rgba(228, 235, 250, 0.08);
}

* {
    box-sizing: border-box;
}

html, body {
    padding: 0;
    margin: 0;
}

body {
    min-height: 100vh;
    font-family: var(--font-sans);
    background: radial-gradient(circle at 10% 20%, rgba(45, 106, 79, 0.1), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(29, 53, 87, 0.1), transparent 60%),
        var(--page-background);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.page {
    width: min(960px, 92vw);
    margin: clamp(1.5rem, 3vw, 3rem) 0;
    padding: clamp(1.5rem, 4vw, 3.5rem);
    border-radius: 28px;
    backdrop-filter: blur(20px);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    min-height: max(0px, calc(100vh - 2 * clamp(1.5rem, 3vw, 3rem)));
    gap: clamp(2.5rem, 6vw, 4rem);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: var(--shadow-ring);
}

.brand-name {
    font-size: 0.95rem;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-nav a {
    position: relative;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
}

.theme-toggle {
    border: 1px solid var(--border);
    background: var(--surface-strong);
    color: var(--text-primary);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.hero-portrait {
    margin: 0;
    display: flex;
    justify-content: center;
}

.portrait {
    width: clamp(200px, 40vw, 260px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, rgba(45, 106, 79, 0.8), rgba(29, 53, 87, 0.8));
    position: relative;
    box-shadow: var(--shadow-ring), 0 20px 40px rgba(18, 25, 38, 0.15);
}

:root[data-theme="dark"] .portrait {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, rgba(116, 198, 157, 0.55), rgba(69, 123, 157, 0.55));
    box-shadow: var(--shadow-ring), 0 25px 45px rgba(0, 0, 0, 0.55);
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.hero-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 44ch;
    margin-bottom: 1.75rem;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button.primary {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(45, 106, 79, 0.25);
}

:root[data-theme="dark"] .button.primary {
    color: #0f1115;
}

.button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(45, 106, 79, 0.3);
}

.button.ghost {
    border-color: var(--border);
    background: var(--surface-strong);
    color: var(--text-primary);
}

.button.ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.button.subtle {
    align-self: flex-start;
    border-color: transparent;
    background: var(--accent-soft);
    color: var(--accent);
    padding-inline: 1.2rem;
}

.button.subtle:hover {
    background: rgba(45, 106, 79, 0.2);
}

.prose {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-card {
    background: var(--surface-strong);
    border-radius: 24px;
    padding: clamp(1.5rem, 5vw, 3rem);
    box-shadow: var(--shadow-ring);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-card h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin: 0;
}

.about-card p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 0;
}

.about-card blockquote {
    margin: 0;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent);
    font-style: italic;
    color: var(--text-primary);
}

.site-footer {
    margin-top: auto;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

@media (max-width: 760px) {
    .page {
        padding: clamp(1.25rem, 6vw, 2rem);
        border-radius: 20px;
        gap: 2rem;
    }

    .site-header {
        flex-wrap: wrap;
    }

    .site-nav {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        order: 2;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-inline: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .button.subtle {
        align-self: center;
    }
}
