:root {
    color-scheme: dark;
    --color-background: #05090c;
    --color-background-soft: #091015;
    --color-surface: #0d151b;
    --color-surface-light: #111b22;
    --color-border: rgba(255, 255, 255, 0.11);
    --color-border-strong: rgba(72, 189, 63, 0.58);
    --color-text: #f2f4f3;
    --color-muted: #aab1ae;
    --color-accent: #48bd3f;
    --color-accent-bright: #5bd052;
    --shadow-panel: 0 28px 80px rgba(0, 0, 0, 0.24);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    color: var(--color-text);
    background:
        radial-gradient(circle at 86% 46%, rgba(42, 126, 37, 0.08), transparent 32rem),
        linear-gradient(145deg, #04080a 0%, var(--color-background) 48%, #071016 100%);
    font-family: "Lora", Georgia, serif;
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

@view-transition {
    navigation: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--color-accent-bright);
    outline-offset: 4px;
}

.skip-link {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    padding: 0.65rem 1rem;
    color: #071007;
    background: var(--color-accent-bright);
    border-radius: 0.4rem;
    transform: translateY(-180%);
    transition: transform 160ms ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 72px;
    display: flex;
    align-items: center;
    background: rgba(5, 9, 12, 0.92);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(18px);
}

.site-header .navbar {
    min-height: 72px;
}

.brand {
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    font-family: "Lora", Georgia, serif;
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1;
}

.brand-main {
    color: var(--color-text);
}

.brand-accent {
    color: var(--color-accent);
}

.site-header .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    color: #dce0de;
    font-size: 1.02rem;
    transition: color 160ms ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header .nav-link.is-active {
    color: var(--color-accent-bright);
}

.site-header .nav-link.is-active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

.main-navigation-list.has-animated-indicator .nav-link.is-active::after {
    display: none;
}

.main-navigation-list {
    position: relative;
}

.main-navigation-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    pointer-events: none;
    opacity: 0;
    background: var(--color-accent);
    border-radius: 2px;
    transition: opacity 100ms ease, width 360ms cubic-bezier(0.34, 1.45, 0.64, 1), transform 420ms cubic-bezier(0.34, 1.45, 0.64, 1);
}

.main-navigation-list.has-animated-indicator .main-navigation-indicator {
    opacity: 1;
}

.main-navigation-indicator.is-immediate {
    transition-duration: 0.01ms;
}

@media (max-width: 991.98px) {
    .main-navigation-indicator {
        display: none;
    }

    .main-navigation-list.has-animated-indicator .nav-link.is-active::after {
        display: block;
    }
}

.language-switcher {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--color-muted);
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.language-option {
    min-width: 2.2rem;
    padding: 0.4rem 0.2rem;
    text-align: center;
    transition: color 160ms ease;
}

.language-option.is-current {
    color: var(--color-accent-bright);
}

.language-option.is-current:hover {
    color: #ffffff;
}

.language-separator {
    color: var(--color-border-strong);
}

.footer-contact svg {
    width: 1.2rem;
    height: 1.2rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.navbar-toggler {
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(72, 189, 63, 0.2);
}

.navbar-toggler-icon-custom {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.navbar-toggler-icon-custom svg {
    width: 1.45rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.site-content {
    min-height: clamp(15rem, 42vh, 34rem);
    flex: 1 0 auto;
}

.footer-panel {
    --footer-panel-space: clamp(1.15rem, 2.2vw, 1.75rem);

    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--footer-panel-space);
    align-items: start;
    padding: var(--footer-panel-space);
    background:
        radial-gradient(circle at 90% 50%, rgba(65, 151, 59, 0.08), transparent 25rem),
        linear-gradient(120deg, rgba(14, 23, 30, 0.98), rgba(10, 17, 22, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.8rem;
    box-shadow: var(--shadow-panel);
}

.footer-quote {
    grid-column: span 3;
    display: flex;
    gap: 1rem;
}

.footer-about {
    grid-column: span 4;
}

.footer-contact {
    grid-column: span 3;
}

.footer-legal-column {
    grid-column: span 2;
}

.footer-panel h2 {
    margin: 0 0 0.85rem;
    color: var(--color-text);
    font-size: 1rem;
    line-height: 1.3;
}

.footer-panel p {
    margin: 0;
    color: var(--color-muted);
}

.quote-mark {
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 auto;
    fill: var(--color-accent);
}

.footer-quote blockquote {
    margin: 0;
}

.footer-quote p {
    color: var(--color-text);
    font-size: 1.08rem;
    line-height: 1.65;
}

.footer-about p {
    max-width: 40rem;
    font-size: 0.91rem;
}

.footer-more {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1rem;
    color: var(--color-accent-bright);
    font-size: 0.92rem;
    font-weight: 600;
}

.footer-more span {
    transition: transform 160ms ease;
}

.footer-more:hover span {
    transform: translateX(0.25rem);
}

.footer-contact address {
    display: grid;
    gap: 0.55rem;
    color: var(--color-muted);
    font-size: 0.92rem;
    font-style: normal;
}

.footer-contact address a,
.footer-contact address span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-contact address a:hover {
    color: var(--color-text);
}

.footer-contact svg {
    color: var(--color-accent);
}

.footer-bottom {
    margin-top: 1.15rem;
}

.footer-legal {
    display: grid;
    gap: 0.55rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.footer-legal a {
    transition: color 160ms ease;
}

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

.copyright {
    margin: 0;
    color: #858d89;
    text-align: center;
    font-size: 0.82rem;
}

html.has-scroll-reveals .scroll-reveal {
    opacity: 0;
    transform: translateY(0.75rem);
    transition: opacity 360ms ease-out var(--reveal-delay, 0ms), transform 360ms ease-out var(--reveal-delay, 0ms);
}

html.has-scroll-reveals .scroll-reveal.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 1199.98px) {
    .footer-quote,
    .footer-about,
    .footer-contact,
    .footer-legal-column {
        grid-column: span 6;
    }
}

@media (max-width: 767.98px) {
    .footer-panel {
        --footer-panel-space: 1.15rem;
    }

    .footer-quote,
    .footer-about,
    .footer-contact,
    .footer-legal-column {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .footer-quote {
        flex-direction: column;
    }
}

/* Portfolio layout */
.page-home, .page-inner {
    --content-gutter: max(clamp(24px, 7.2vw, 120px), calc((100vw - 1200px) / 2));
}
.page-home {
    --paper: #f3ede2;
    --ink: #22221d;
    --olive: #292d1e;
    color: var(--ink);
    background: var(--paper);
    font-family: "Lora", Georgia, serif;
    line-height: 1.18;
}
.page-home .site-content { flex: 1 0 auto; }
.page-header {
    position: relative;
    z-index: 40;
    height: 62px;
    flex: 0 0 62px;
    color: #f8f3e8;
    background: linear-gradient(90deg, #2f311e 0%, #303421 48%, #343520 100%);
    box-shadow: 0 1px 0 rgba(20, 22, 14, .12);
}
.header-inner {
    display: flex;
    align-items: center;
    height: 62px;
    width: min(calc(100% - var(--content-gutter) - var(--content-gutter)), 1200px);
    margin-inline: auto;
}
.site-navigation {
    display: flex;
    align-items: center;
    gap: 42px;
    height: 100%;
    white-space: nowrap;
}
.site-navigation > a,
.art-menu > summary {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    color: #f7f3e9;
    font-family: "Lora", Georgia, serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
}
.site-navigation > a::after,
.art-menu > summary::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
}
.site-navigation > a:hover::after,
.site-navigation > a:focus-visible::after,
.site-navigation > a.is-current::after,
.art-menu > summary:hover::after,
.art-menu > summary.is-current::after,
.art-menu[open] > summary::after { transform: scaleX(1); }
.art-menu { position: relative; height: 100%; }
.art-menu > summary { list-style: none; gap: 8px; }
.art-menu > summary::-webkit-details-marker { display: none; }
.art-menu svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.art-menu-panel {
    position: absolute;
    top: 62px;
    left: -21px;
    min-width: 184px;
    display: grid;
    gap: 2px;
    padding: 13px 16px;
    color: #f8f3e8;
    background: #292d1e;
    box-shadow: 0 14px 22px rgba(25, 23, 15, .2);
}
.art-menu-panel a { padding: 7px 5px; font: 500 16px "Lora", Georgia, serif; }
.art-menu-panel a:hover { text-decoration: underline; }
.social-links {
    display: flex;
    align-items: center;
    gap: 31px;
    margin-left: auto;
    white-space: nowrap;
}
.social-links > a { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 30px; color: inherit; }
.social-links > a:hover { opacity: .72; }
.social-links svg { display: block; width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.social-links .icon-dot { fill: currentColor; stroke: none; }
.menu-toggle { display: none; }
.page-footer {
    position: relative;
    z-index: 3;
    min-height: 39px;
    color: #33342e;
    background: #f3ede2;
    border-top: 1px solid #ded7c9;
    font: 400 12px/1.3 "Lora", Georgia, serif;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: min(calc(100% - var(--content-gutter) - var(--content-gutter)), 1200px);
    min-height: 39px;
    margin-inline: auto;
    padding-block: 6px;
}
.page-footer nav { display: flex; align-items: center; gap: 17px; }
.page-footer nav a:hover { text-decoration: underline; }
.footer-divider { margin: 0 12px; }
.page-home .skip-link { color: #fff; background: #292d1e; }
.page-home a:focus-visible, .page-home summary:focus-visible, .page-home button:focus-visible { outline-color: #9b513f; }
.page-inner .page-header, .page-inner .page-footer { font-family: "Lora", Georgia, serif; }

@media (max-width: 1540px) {
    .site-navigation { gap: 28px; }
}
@media (max-width: 1220px) {
    .site-navigation { gap: 22px; }
    .social-links { gap: 17px; }
}
@media (max-width: 980px) {
    .header-inner { justify-content: space-between; }
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        margin-left: 0;
        padding: 8px;
        border: 0;
        color: #fff;
        background: transparent;
    }
    .menu-toggle span { width: 100%; height: 1.5px; background: currentColor; }
    .site-navigation {
        position: absolute;
        top: 75px;
        left: 0;
        right: 0;
        height: auto;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        padding: 14px 26px 22px;
        background: #292d1e;
        box-shadow: 0 15px 20px rgba(0,0,0,.14);
    }
    .site-navigation.is-open { display: flex; }
    .site-navigation > a, .art-menu > summary { min-height: 45px; height: auto; font-size: 22px; }
    .site-navigation > a::after, .art-menu > summary::after { display: none; }
    .art-menu { height: auto; }
    .art-menu-panel { position: static; box-shadow: none; padding: 0 14px 8px; }
    .social-links { margin-left: auto; }
    .footer-inner { flex-direction: column; padding-block: 14px; text-align: center; }
    .page-footer nav { flex-wrap: wrap; justify-content: center; gap: 10px; }
}
@media (max-width: 760px) {
    .page-home, .page-inner { --content-gutter: 22px; }
}
@media (max-width: 520px) {
    .social-links { gap: 10px; margin-left: auto; }
    .page-footer nav { font-size: 11px; }
}
