@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
    color-scheme: dark;
    --bg: #07111a;
    --bg-soft: #10212f;
    --panel: rgba(10, 21, 32, 0.76);
    --panel-strong: rgba(13, 27, 40, 0.92);
    --line: rgba(211, 226, 236, 0.14);
    --text: #f7f1e8;
    --muted: #b8c5cf;
    --accent: #ffb067;
    --accent-soft: #ffd8b0;
    --ice: #95d7e4;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    --page-bg:
        radial-gradient(circle at 12% 18%, rgba(255, 176, 103, 0.16), transparent 24%),
        radial-gradient(circle at 84% 16%, rgba(149, 215, 228, 0.12), transparent 22%),
        radial-gradient(circle at 75% 78%, rgba(255, 176, 103, 0.1), transparent 18%),
        linear-gradient(160deg, #07111a 0%, #0c1722 44%, #112435 100%);
    --grid-line: rgba(255, 255, 255, 0.02);
    --grid-mask: radial-gradient(circle at center, black 38%, transparent 100%);
    --atmosphere-bg:
        conic-gradient(from 210deg at 78% 24%, rgba(255, 176, 103, 0.14), transparent 40%, rgba(149, 215, 228, 0.08), transparent 80%),
        radial-gradient(circle at 30% 75%, rgba(255, 255, 255, 0.03), transparent 28%);
    --header-bg: rgba(8, 16, 25, 0.72);
    --button-text-strong: #1b1510;
    --card-inner-bg: rgba(255, 255, 255, 0.03);
    --tag-bg: rgba(255, 255, 255, 0.05);
    --tag-border: rgba(255, 255, 255, 0.08);
    --tag-hover-bg: rgba(255, 176, 103, 0.08);
    --tag-hover-border: rgba(255, 176, 103, 0.28);
    --tour-scrim-bg: rgba(4, 10, 16, 0.68);
    --tour-panel-bg: rgba(10, 20, 31, 0.96);
    --tour-panel-border: rgba(255, 255, 255, 0.12);
    --tour-shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
    --tour-meter-bg: rgba(255, 255, 255, 0.08);
    --tour-dot-bg: rgba(255, 255, 255, 0.04);
    --tour-dot-border: rgba(255, 255, 255, 0.1);
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f0e8;
    --bg-soft: #e8edf0;
    --panel: rgba(255, 255, 255, 0.76);
    --panel-strong: rgba(255, 255, 255, 0.94);
    --line: rgba(30, 45, 58, 0.16);
    --text: #17202a;
    --muted: #52616f;
    --accent: #b65f24;
    --accent-soft: #7d421d;
    --ice: #297b8a;
    --shadow: 0 20px 65px rgba(37, 45, 52, 0.16);
    --page-bg:
        radial-gradient(circle at 12% 18%, rgba(182, 95, 36, 0.14), transparent 24%),
        radial-gradient(circle at 84% 16%, rgba(41, 123, 138, 0.13), transparent 23%),
        linear-gradient(160deg, #f7f3eb 0%, #edf2f4 48%, #dfe9ec 100%);
    --grid-line: rgba(30, 45, 58, 0.045);
    --grid-mask: radial-gradient(circle at center, black 42%, transparent 100%);
    --atmosphere-bg:
        conic-gradient(from 210deg at 78% 24%, rgba(182, 95, 36, 0.12), transparent 42%, rgba(41, 123, 138, 0.1), transparent 82%),
        radial-gradient(circle at 30% 75%, rgba(255, 255, 255, 0.46), transparent 30%);
    --header-bg: rgba(255, 255, 255, 0.76);
    --button-text-strong: #fff7ef;
    --card-inner-bg: rgba(255, 255, 255, 0.58);
    --tag-bg: rgba(41, 123, 138, 0.1);
    --tag-border: rgba(41, 123, 138, 0.2);
    --tag-hover-bg: rgba(182, 95, 36, 0.12);
    --tag-hover-border: rgba(182, 95, 36, 0.3);
    --tour-scrim-bg: rgba(235, 241, 243, 0.68);
    --tour-panel-bg: rgba(255, 255, 255, 0.96);
    --tour-panel-border: rgba(30, 45, 58, 0.14);
    --tour-shadow: 0 24px 70px rgba(37, 45, 52, 0.2);
    --tour-meter-bg: rgba(30, 45, 58, 0.1);
    --tour-dot-bg: rgba(41, 123, 138, 0.08);
    --tour-dot-border: rgba(41, 123, 138, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Space Grotesk", sans-serif;
    font-size: 17px;
    color: var(--text);
    background: var(--page-bg);
    transition: background 0.24s ease, color 0.24s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: var(--grid-mask);
    opacity: 0.7;
}

.atmosphere {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: var(--atmosphere-bg);
    filter: blur(24px);
    opacity: 0.9;
}

a {
    color: inherit;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(149, 215, 228, 0.82);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1200;
    transform: translateY(-160%);
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--button-text-strong);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
}

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

.site-header,
.site-footer,
.page-shell {
    position: relative;
    z-index: 1;
}

.site-header {
    z-index: 100;
    width: min(1220px, calc(100% - 32px));
    margin: 22px auto 0;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--header-bg);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.brand-monogram {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(255, 176, 103, 0.18), rgba(149, 215, 228, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--accent-soft);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.brand-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.brand-copy strong {
    font-size: 1.38rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.brand-copy span {
    font-size: 0.86rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
    font-size: 1rem;
}

.tour-start {
    margin-left: auto;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 176, 103, 0.32);
    background: linear-gradient(135deg, rgba(255, 176, 103, 0.16), rgba(149, 215, 228, 0.08));
    color: var(--text);
    font-size: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.lang-switch__option {
    min-width: 44px;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    transition: background 0.2s ease, color 0.2s ease;
}

.lang-switch__option.is-active {
    background: rgba(255, 176, 103, 0.18);
    color: var(--accent-soft);
}

.theme-toggle {
    min-height: 44px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(255, 176, 103, 0.36);
    background: rgba(255, 176, 103, 0.08);
}

.theme-toggle__icon {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: inset -5px -5px 0 rgba(7, 17, 26, 0.72);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

:root[data-theme="light"] .theme-toggle__icon {
    box-shadow:
        0 0 0 4px rgba(182, 95, 36, 0.12),
        inset 0 0 0 0 rgba(7, 17, 26, 0);
    transform: rotate(30deg);
}

.tour-start:hover,
.tour-start:focus {
    transform: translateY(-1px);
    border-color: rgba(255, 216, 176, 0.55);
    background: linear-gradient(135deg, rgba(255, 176, 103, 0.24), rgba(149, 215, 228, 0.14));
}

.tour-start--pulse {
    animation: tourPulse 2.4s ease-in-out infinite;
}

.site-nav {
    margin-left: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a {
    padding: 9px 11px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-size: 1rem;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

.page-shell {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 72px;
}

.site-footer {
    width: min(1220px, calc(100% - 32px));
    margin: 0 auto 26px;
    padding: 18px 0 0;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: var(--muted);
    font-size: 1rem;
}

.site-footer p {
    margin: 0;
    max-width: 62ch;
}

.section-label {
    margin: 0 0 14px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.88rem;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-family: "Fraunces", serif;
    font-weight: 700;
    letter-spacing: 0;
}

h1 {
    font-size: 4.6rem;
    line-height: 0.94;
    margin-bottom: 18px;
}

h2 {
    font-size: 2rem;
    line-height: 1.05;
    margin-bottom: 12px;
}

h3 {
    font-size: 1.35rem;
    margin-bottom: 10px;
}

p,
li,
dd,
dt {
    line-height: 1.75;
}

.hero-section,
.chapter-hero,
.resume-hero,
.contact-layout,
.split-story,
.resume-layout {
    display: grid;
    gap: 24px;
}

.hero-section {
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    align-items: stretch;
    justify-items: center;
}

.project-map {
    width: 100%;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--panel-strong);
}

.project-map h2 { font-size: 1.55rem; line-height: 1.25; }
.project-map ol { list-style: none; padding: 0; margin: 26px 0; }
.project-map li { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.map-number { color: var(--accent); font-size: .8rem; font-weight: 700; }
.project-map > p:last-child { color: var(--muted); font-size: .92rem; }
.hero-facts { padding: 0; list-style: none; margin: 24px 0 0; color: var(--muted); font-size: .95rem; }
.hero-facts li::before { content: '•'; color: var(--accent); margin-right: 10px; }
.project-detail { display: inline-flex; gap: 12px; margin-top: 12px; font-weight: 700; color: var(--accent); text-underline-offset: 5px; }
.hero-copy h1 { font-size: clamp(2.8rem, 5vw, 4.5rem); line-height: 1.08; }
.hero-copy::after { pointer-events: none; }

@media (min-width: 981px) {
    .site-header { flex-wrap: wrap; }
    .site-nav { flex-wrap: wrap; }
}

.hero-copy,
.hero-panel,
.feature-panel,
.glass-card,
.quote-banner,
.case-study,
.contact-card,
.contact-panel,
.resume-sidebar,
.resume-main,
.metric-card,
.rail-card {
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-copy,
.contact-card,
.contact-panel,
.resume-sidebar,
.resume-main,
.case-study {
    padding: 34px;
    border-radius: 32px;
}

.hero-copy {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 980px;
}

.hero-copy::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -60px;
    top: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 176, 103, 0.22), transparent 70%);
}

.hero-lead,
.chapter-lead {
    margin: 0;
    max-width: 66ch;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
}

.button-primary {
    background: var(--accent);
    color: var(--button-text-strong);
}

.button-secondary {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
}

.hero-signals {
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.hero-signals li {
    padding-left: 18px;
    position: relative;
    color: var(--muted);
}

.hero-signals li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-radius: 32px;
}

.signal-card {
    padding: 22px;
    border-radius: 22px;
    background: var(--card-inner-bg);
    border: 1px solid var(--tag-border);
}

.signal-card p,
.feature-panel p,
.glass-card p,
.contact-card p,
.contact-panel p,
.rail-card p,
.case-study__body p,
.metric-card span,
.resume-main p,
.resume-sidebar li {
    margin: 0;
    color: var(--muted);
}

.signal-index {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--ice);
    font-size: 0.92rem;
    letter-spacing: 0.16em;
}

.accent-card {
    background: var(--card-inner-bg);
}

.ticker-strip {
    margin: 22px 0 0;
    padding: 22px 0;
    display: grid;
    gap: 16px;
    overflow: visible;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.ticker-strip__heading {
    max-width: 760px;
}

.ticker-strip__heading p:last-child {
    margin: 0;
    color: var(--muted);
}

.ticker-strip__items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.technology-groups {
    display: grid;
    gap: 22px;
}

.technology-footer {
    margin-top: 54px;
    padding: 30px 0 8px;
    border-bottom: 0;
}

.technology-footer .technology-groups {
    margin-top: 6px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(149, 215, 228, 0.07), transparent 42%),
        var(--card-inner-bg);
}

.technology-group {
    display: grid;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.technology-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.technology-group h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
}

.ticker-strip span,
.chapter-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--tag-bg);
    border: 1px solid var(--tag-border);
    color: var(--accent-soft);
    font-size: 0.98rem;
}

.tech-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--tag-border);
    background: var(--tag-bg);
    color: var(--accent-soft);
    text-decoration: none;
    font-size: 0.98rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.tech-link:hover,
.tech-link:focus-visible {
    transform: translateY(-1px);
    border-color: var(--tag-hover-border);
    background: var(--tag-hover-bg);
    outline: none;
}

.split-story {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    margin-top: 44px;
    align-items: start;
}

.story-grid,
.chapter-grid,
.showcase-grid,
.feature-rail,
.metric-stack {
    display: grid;
    gap: 18px;
}

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

.card-stack {
    margin: 16px 0 10px !important;
    color: var(--accent-soft) !important;
    font-weight: 700;
}

.glass-card,
.feature-panel,
.rail-card,
.metric-card {
    padding: 28px;
    border-radius: 26px;
}

.showcase-grid {
    margin-top: 44px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-panel.wide-panel {
    grid-column: span 2;
}

.panel-link {
    text-decoration: none;
    color: inherit;
}

.panel-link:hover,
.panel-link:focus-visible {
    color: var(--accent-soft);
    outline: none;
}

.quote-banner {
    margin-top: 44px;
    padding: 36px;
    border-radius: 32px;
}

.quote-banner p {
    margin: 0;
    max-width: 34ch;
    font-family: "Fraunces", serif;
    font-size: 2.4rem;
    line-height: 1.15;
}

.chapter-hero,
.resume-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    align-items: end;
}

.project-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.project-hero > div,
.project-signal-card,
.project-disclaimer {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.project-signal-card { background: var(--panel-strong); }
.project-signal-card ol { list-style: none; margin: 22px 0 0; padding: 0; }
.project-signal-card li { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.project-signal-card li:last-child { border-bottom: 0; }
.project-signal-card li span { color: var(--accent); font-weight: 700; font-size: .8rem; }
.local-demo-note { margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
.project-disclaimer { margin-top: 28px; color: var(--muted); }
.project-disclaimer p { margin: 0; }

.wms-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-top: 28px;
    padding: 30px 34px;
    border: 1px solid rgba(149, 215, 228, 0.3);
    border-radius: 30px;
    background: linear-gradient(110deg, rgba(41, 123, 138, 0.12), rgba(255, 176, 103, 0.08));
}

.wms-teaser h2 { margin: 0 0 10px; }
.wms-teaser p:last-child { margin: 0; color: var(--muted); max-width: 68ch; }

.chapter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.chapter-grid {
    margin-top: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.case-study {
    margin-top: 28px;
}

.case-study__body {
    display: grid;
    gap: 14px;
}

.case-study__body ul,
.resume-section ul,
.contact-note ul {
    margin: 0;
    padding-left: 20px;
}

.feature-rail {
    margin-top: 28px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.media-showcase {
    margin-top: 32px;
}

.showcase-heading {
    max-width: 760px;
    margin-bottom: 18px;
}

.showcase-heading p:last-child {
    margin: 0;
    color: var(--muted);
}

.contact-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: stretch;
}

.contact-layout--compact {
    grid-template-columns: minmax(0, 620px);
    justify-content: start;
}

.tech-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.tech-hero__copy,
.tech-hero__side,
.tech-card {
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    border-radius: 30px;
}

.tech-hero__copy,
.tech-hero__side,
.tech-card {
    padding: 32px;
}

.tech-summary {
    margin: 0;
    color: var(--muted);
}

.tech-subtitle {
    margin-top: 22px;
}

.tech-layout {
    margin-top: 28px;
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: 24px;
}

.tech-layout--single {
    grid-template-columns: minmax(0, 1fr);
}

.tech-list {
    margin: 0;
    padding-left: 20px;
}

.contact-list {
    margin: 0;
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 16px;
}

.contact-list dt {
    color: var(--accent);
}

.contact-list dd {
    margin: 0;
}

.contact-note {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.resume-hero {
    align-items: start;
}

.not-found {
    min-height: 54vh;
    display: grid;
    align-items: center;
}

.not-found__copy {
    max-width: 780px;
    padding: 34px;
    border-radius: 32px;
    border: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
        var(--panel);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.metric-stack {
    grid-template-columns: 1fr;
}

.metric-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--accent-soft);
    font-size: 1.25rem;
    font-family: "Fraunces", serif;
}

.resume-layout {
    margin-top: 28px;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
}

.resume-sidebar,
.resume-main {
    height: 100%;
}

.sidebar-block + .sidebar-block,
.resume-section + .resume-section,
.timeline-item + .timeline-item {
    margin-top: 28px;
}

.plain-list {
    margin: 0;
    padding-left: 18px;
}

.timeline-meta {
    margin: -4px 0 12px;
    color: var(--ice);
}

.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tour-focus {
    position: relative;
    z-index: 1105;
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 216, 176, 0.85),
        0 0 0 10px rgba(255, 176, 103, 0.14),
        0 30px 70px rgba(0, 0, 0, 0.45);
}

.tour-focus::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: inherit;
    border: 1px solid rgba(255, 216, 176, 0.45);
    animation: tourHalo 1.8s ease-out infinite;
    pointer-events: none;
}

.site-tour {
    position: fixed;
    inset: 0;
    z-index: 1100;
}

.site-tour__scrim {
    position: absolute;
    inset: 0;
    background: var(--tour-scrim-bg);
    backdrop-filter: blur(8px);
}

.site-tour__panel {
    position: fixed;
    width: min(420px, calc(100vw - 32px));
    padding: 24px;
    border-radius: 26px;
    border: 1px solid var(--tour-panel-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
        var(--tour-panel-bg);
    box-shadow: var(--tour-shadow);
    backdrop-filter: blur(18px);
}

.site-tour__panel::before {
    content: "";
    position: absolute;
    left: 28px;
    width: 16px;
    height: 16px;
    background: var(--tour-panel-bg);
    border-left: 1px solid var(--tour-panel-border);
    border-top: 1px solid var(--tour-panel-border);
    transform: rotate(45deg);
}

.site-tour__panel[data-anchor="top"]::before {
    top: -9px;
}

.site-tour__panel[data-anchor="bottom"]::before {
    bottom: -9px;
    transform: rotate(225deg);
}

.site-tour__panel[data-anchor="floating"]::before {
    display: none;
}

.site-tour__panel.is-animating {
    animation: tourPanelIn 0.3s ease;
}

.site-tour__meter {
    margin: 4px 0 14px;
    height: 6px;
    border-radius: 999px;
    background: var(--tour-meter-bg);
    overflow: hidden;
}

.site-tour__meter-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--ice));
    transition: width 0.24s ease;
}

.site-tour__dots {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.site-tour__dot {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tour-dot-border);
    background: var(--tour-dot-bg);
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.site-tour__dot.is-active {
    background: rgba(255, 176, 103, 0.18);
    border-color: rgba(255, 176, 103, 0.48);
    color: var(--accent-soft);
}

.site-tour__dot.is-complete {
    background: rgba(149, 215, 228, 0.14);
    border-color: rgba(149, 215, 228, 0.36);
    color: var(--ice);
}

.site-tour__label,
.site-tour__progress {
    margin: 0;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.84rem;
}

.site-tour__panel h2 {
    margin: 10px 0 10px;
}

.site-tour__text {
    margin: 0 0 18px;
    color: var(--muted);
}

.site-tour__hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    opacity: 0.88;
}

.site-tour__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 18px;
}

.site-tour__actions .button-secondary {
    color: var(--text);
}

.site-tour__actions .button-primary {
    color: var(--button-text-strong);
}

.site-tour__actions .button-secondary:disabled {
    color: var(--muted);
    opacity: 0.62;
    cursor: not-allowed;
}

body.tour-active {
    overflow-x: hidden;
}

@keyframes tourPulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 176, 103, 0.3);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(255, 176, 103, 0);
    }
}

@keyframes tourHalo {
    0% {
        opacity: 0.65;
        transform: scale(0.98);
    }

    100% {
        opacity: 0;
        transform: scale(1.03);
    }
}

@keyframes tourPanelIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .tour-start--pulse,
    .tour-focus::after,
    .site-tour__panel.is-animating {
        animation: none;
    }
}

@media (max-width: 980px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
    }

    .tour-start {
        margin-left: 0;
    }

    .lang-switch {
        margin-left: auto;
    }

    .theme-toggle__text {
        display: none;
    }

    .site-nav {
        position: absolute;
        z-index: 101;
        top: calc(100% + 12px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 22px;
        border: 1px solid var(--line);
        background: var(--panel-strong);
        box-shadow: var(--shadow);
    }

    .site-header.nav-open .site-nav {
        display: flex;
    }

    .site-nav a {
        width: 100%;
    }

    .brand-copy strong {
        font-size: 1.2rem;
    }

    .brand-copy span {
        font-size: 0.82rem;
    }

    h1 {
        font-size: 3.4rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .quote-banner p {
        font-size: 2rem;
    }

    .hero-section,
    .tech-hero,
    .chapter-hero,
    .resume-hero,
    .contact-layout,
    .split-story,
    .resume-layout,
    .tech-layout,
    .chapter-grid,
    .story-grid,
    .showcase-grid,
    .feature-rail {
        grid-template-columns: 1fr;
    }

    .project-hero { grid-template-columns: 1fr; }
    .wms-teaser { align-items: flex-start; flex-direction: column; }
    .technology-footer { margin-top: 38px; }

    .feature-panel.wide-panel {
        grid-column: auto;
    }

    .site-footer {
        flex-direction: column;
    }

    .site-tour__panel {
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
        top: auto !important;
        width: auto;
    }

    .site-tour__panel::before {
        display: none;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .site-header,
    .page-shell,
    .site-footer {
        width: min(100% - 20px, 1220px);
    }

    .site-header {
        padding: 12px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .brand-mark {
        max-width: calc(100% - 122px);
    }

    .brand-monogram {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        font-size: 0.82rem;
    }

    .brand-copy strong {
        font-size: 1.12rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .brand-copy span {
        display: none;
    }

    h1 {
        font-size: 2.55rem;
        line-height: 1;
    }

    h2 {
        font-size: 1.55rem;
    }

    .quote-banner p {
        font-size: 1.7rem;
    }

    .tour-start {
        order: 5;
        flex: 1 1 180px;
        justify-content: center;
    }

    .lang-switch {
        order: 2;
        margin-left: auto;
    }

    .theme-toggle {
        order: 3;
    }

    .menu-toggle {
        order: 4;
        flex: 0 0 auto;
    }

    .hero-copy,
    .contact-card,
    .contact-panel,
    .resume-sidebar,
    .resume-main,
    .case-study,
    .glass-card,
    .feature-panel,
    .rail-card,
    .metric-card,
    .not-found__copy {
        padding: 22px;
    }

    .technology-footer .technology-groups {
        padding: 18px;
        border-radius: 22px;
    }

    .contact-list {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .site-tour__actions {
        flex-direction: column-reverse;
    }
}
