:root {
    color-scheme: dark;
    --bg: #030b0a;
    --bg-soft: #071411;
    --panel: rgba(10, 29, 24, 0.68);
    --panel-solid: #0a1d18;
    --text: #f4f7ee;
    --muted: #a4b5aa;
    --cyan: #73d7c5;
    --blue: #6fa6d9;
    --purple: #9c8ee8;
    --pink: #ef9a83;
    --leaf: #7ccf8a;
    --moss: #315f46;
    --snow: #e9f4ee;
    --sun: #efc777;
    --border: rgba(214, 242, 222, 0.12);
    --header-height: 76px;
    --accent: var(--purple);
    --max-width: 1220px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--purple) var(--bg);
}

body {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(80, 160, 116, 0.11), transparent 30rem),
        radial-gradient(circle at 84% 34%, rgba(94, 126, 190, 0.1), transparent 34rem),
        linear-gradient(180deg, #030908 0%, #06110f 48%, #030b0a 100%),
        var(--bg);
    color: var(--text);
    font-family: "Manrope", system-ui, sans-serif;
    line-height: 1.7;
}

body::before {
    position: fixed;
    z-index: -2;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
    content: "";
    opacity: 0.025;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
    max-width: 100%;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 2000;
    top: 1rem;
    left: 1rem;
    padding: 0.7rem 1rem;
    transform: translateY(-150%);
    border-radius: 999px;
    background: white;
    color: #070711;
}

.skip-link:focus {
    transform: translateY(0);
}

#particle-canvas {
    position: fixed;
    z-index: -1;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.58;
    pointer-events: none;
}

.cursor-glow {
    position: fixed;
    z-index: 3;
    width: 26rem;
    height: 26rem;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(115, 215, 197, 0.1), rgba(124, 207, 138, 0.035) 38%, transparent 68%);
    pointer-events: none;
}

.page-progress {
    position: fixed;
    z-index: 1001;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.04);
}

.page-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--leaf), var(--cyan), var(--purple), var(--sun));
    box-shadow: 0 0 16px var(--cyan);
}

.site-header {
    position: fixed;
    z-index: 1000;
    top: 1rem;
    right: 50%;
    display: flex;
    width: min(calc(100% - 2rem), var(--max-width));
    min-height: var(--header-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 1.2rem 0 1.5rem;
    transform: translateX(50%);
    border: 1px solid transparent;
    border-radius: 1.1rem;
    transition: 250ms ease;
}

.site-header.scrolled {
    border-color: var(--border);
    background: rgba(7, 7, 17, 0.72);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(20px) saturate(150%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.brand-mark,
.auth-logo span,
.admin-brand span {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan), 0 0 24px var(--purple);
}

#primary-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

#primary-nav a {
    padding: 0.6rem 0.9rem;
    color: var(--muted);
    font-size: 0.83rem;
    font-weight: 600;
    transition: color 180ms ease;
}

#primary-nav a:hover,
#primary-nav a.active {
    color: white;
}

#primary-nav .nav-cta {
    margin-left: 0.35rem;
    border: 1px solid rgba(34, 211, 238, 0.32);
    border-radius: 999px;
    color: white;
}

.nav-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: white;
}

.chapter {
    position: relative;
    min-height: 100vh;
    padding: clamp(7rem, 12vw, 11rem) max(1.25rem, calc((100vw - var(--max-width)) / 2));
}

.hero {
    display: grid;
    place-items: center;
    min-height: 100svh;
    overflow: hidden;
    padding-top: 9rem;
    text-align: center;
    background:
        linear-gradient(180deg, transparent 70%, var(--bg)),
        radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34rem);
}

.hero::before {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 60px 60px;
    content: "";
    mask-image: radial-gradient(circle at center, black, transparent 75%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 960px;
}

.eyebrow,
.chapter-number,
.section-kicker {
    margin: 0 0 1rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 1000px;
    margin: 0 auto;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(3.6rem, 10vw, 8.7rem);
    font-weight: 700;
    letter-spacing: -0.07em;
    line-height: 0.88;
    text-wrap: balance;
    background: linear-gradient(120deg, white 20%, #b9f5ff 48%, #cab7ff 72%, white);
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 28px color-mix(in srgb, var(--accent) 18%, transparent));
}

.hero-subtitle {
    max-width: 740px;
    margin: 2rem auto 0.5rem;
    color: #d8d6e3;
    font-size: clamp(1.15rem, 2.2vw, 1.55rem);
}

.hero .rich-copy {
    max-width: 720px;
    margin: 1rem auto 0;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 2.2rem;
}

.button {
    display: inline-flex;
    min-height: 3.25rem;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.78rem 1.35rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: linear-gradient(120deg, var(--cyan), var(--purple));
    box-shadow: 0 10px 36px rgba(124, 58, 237, 0.26), inset 0 1px rgba(255, 255, 255, 0.35);
    color: #080811;
}

.button-primary:hover {
    box-shadow: 0 12px 44px rgba(34, 211, 238, 0.28);
}

.button-ghost {
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.035);
    color: white;
    backdrop-filter: blur(12px);
}

.button-ghost:hover {
    border-color: color-mix(in srgb, var(--accent) 60%, transparent);
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    animation: orbit 18s linear infinite;
}

.hero-orbit::after {
    position: absolute;
    top: 25%;
    left: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 22px var(--cyan);
    content: "";
}

.orbit-one {
    width: min(80vw, 820px);
    aspect-ratio: 1;
}

.orbit-two {
    width: min(108vw, 1100px);
    aspect-ratio: 1;
    animation-direction: reverse;
    animation-duration: 28s;
}

@keyframes orbit {
    to { transform: rotate(1turn); }
}

.scroll-cue {
    position: absolute;
    z-index: 2;
    bottom: 2rem;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 0.67rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.scroll-cue span {
    position: relative;
    width: 1px;
    height: 2.5rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.16);
}

.scroll-cue span::after {
    position: absolute;
    top: -50%;
    width: 100%;
    height: 50%;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    content: "";
    animation: scroll-cue 1.8s ease-in-out infinite;
}

@keyframes scroll-cue {
    to { top: 110%; }
}

.story-thread {
    position: absolute;
    z-index: 1;
    top: 100vh;
    left: 50%;
    width: 40px;
    height: calc(100% - 100vh);
    transform: translateX(-50%);
    pointer-events: none;
}

.story-thread svg {
    width: 100%;
    height: 100%;
}

.story-thread path {
    vector-effect: non-scaling-stroke;
    fill: none;
}

.thread-base {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.thread-light {
    stroke: url("#thread-gradient");
    stroke: var(--purple);
    stroke-width: 2;
    stroke-dasharray: 8 20;
    filter: drop-shadow(0 0 5px var(--purple));
}

.story-chapter {
    display: grid;
    align-items: center;
}

.story-chapter::before {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 15%;
    width: 26rem;
    height: 26rem;
    transform: translateY(-50%);
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    filter: blur(90px);
    content: "";
}

.story-chapter:nth-of-type(even)::before {
    right: 12%;
    left: auto;
}

.chapter-grid {
    position: relative;
    z-index: 2;
    display: grid;
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(3rem, 9vw, 9rem);
}

.story-chapter:nth-of-type(even) .chapter-heading {
    order: 2;
}

.story-chapter:nth-of-type(even) .chapter-body {
    order: 1;
}

.chapter-heading h2,
.section-intro h2,
.contact-panel h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    letter-spacing: -0.055em;
    line-height: 1;
    text-wrap: balance;
}

.chapter-subtitle {
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.25rem);
}

.chapter-body {
    padding: clamp(1.6rem, 4vw, 3.2rem);
    border: 1px solid var(--border);
    border-radius: 2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28), inset 0 1px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px);
}

.rich-copy {
    color: #c5c3d0;
    font-size: clamp(1rem, 1.6vw, 1.13rem);
}

.skills-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skills-cloud span {
    padding: 0.75rem 1rem;
    border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    box-shadow: 0 0 26px color-mix(in srgb, var(--accent) 8%, transparent);
    font-size: 0.86rem;
}

.chapter-media {
    position: relative;
    margin-top: 2rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1.4rem;
}

.chapter-media img {
    width: 100%;
    max-height: 430px;
    object-fit: cover;
}

.chapter-media p {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 3rem 1.2rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 0.85rem;
}

.section-intro {
    max-width: 800px;
    margin: 0 auto clamp(4rem, 8vw, 7rem);
    text-align: center;
}

.section-intro > p:last-child {
    color: var(--muted);
}

.timeline-section {
    overflow: hidden;
}

.timeline {
    position: relative;
    max-width: 1040px;
    margin: 0 auto;
}

.timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: linear-gradient(transparent, var(--purple) 10%, var(--cyan) 90%, transparent);
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.45);
    content: "";
}

.timeline-event {
    position: relative;
    width: calc(50% - 3rem);
    margin-bottom: 5rem;
    padding: 1.8rem;
    border: 1px solid var(--border);
    border-radius: 1.4rem;
    background: var(--panel);
    backdrop-filter: blur(16px);
}

.timeline-right {
    margin-left: calc(50% + 3rem);
}

.timeline-dot {
    position: absolute;
    top: 2.2rem;
    right: -3.4rem;
    width: 0.8rem;
    height: 0.8rem;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--purple);
    box-shadow: 0 0 0 1px var(--purple), 0 0 18px var(--purple);
}

.timeline-right .timeline-dot {
    right: auto;
    left: -3.4rem;
    background: var(--cyan);
    box-shadow: 0 0 0 1px var(--cyan), 0 0 18px var(--cyan);
}

.timeline-date {
    margin: 0;
    color: var(--cyan);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.timeline-type {
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.timeline-event h3 {
    margin: 0.7rem 0 0.5rem;
    font-size: 1.35rem;
}

.timeline-event > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.gallery-section {
    min-height: auto;
}

.story-reel {
    display: flex;
    max-width: var(--max-width);
    margin: 0 auto 3rem;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.75rem 0.2rem 1.5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}

.reel-item {
    flex: 0 0 92px;
    border: 0;
    background: none;
    color: white;
    cursor: pointer;
    scroll-snap-align: start;
}

.reel-item {
    position: relative;
}

.reel-item img,
.reel-item video {
    width: 78px;
    height: 78px;
    margin: 0 auto 0.6rem;
    padding: 3px;
    border: 2px solid transparent;
    border-radius: 50%;
    background: linear-gradient(var(--bg), var(--bg)) padding-box,
        linear-gradient(135deg, var(--cyan), var(--purple), var(--pink)) border-box;
    object-fit: cover;
    transition: transform 180ms ease, filter 180ms ease;
}

.reel-item:hover img,
.reel-item:hover video {
    transform: scale(1.06);
    filter: drop-shadow(0 0 10px var(--purple));
}

.video-badge {
    position: absolute;
    top: 52px;
    right: 7px;
    display: grid !important;
    width: 1.35rem;
    height: 1.35rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(3, 11, 10, 0.82);
    font-size: 0.52rem !important;
}

.reel-item span {
    display: block;
    overflow: hidden;
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-grid {
    display: grid;
    max-width: var(--max-width);
    margin: 0 auto;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

.gallery-card {
    position: relative;
    min-height: 280px;
    grid-column: span 4;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    background: var(--panel-solid);
    color: white;
    cursor: pointer;
}

.gallery-card:nth-child(5n + 1),
.gallery-card:nth-child(5n + 4) {
    grid-column: span 8;
}

.gallery-card img,
.gallery-card video {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 300ms ease;
}

.gallery-card:hover img,
.gallery-card:hover video {
    transform: scale(1.06);
    filter: saturate(1.15);
}

.gallery-video-mark {
    position: absolute;
    z-index: 2;
    top: 1rem;
    right: 1rem;
    display: grid;
    width: 2.8rem;
    height: 2.8rem;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50%;
    background: rgba(3, 11, 10, 0.6);
    backdrop-filter: blur(10px);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    background: linear-gradient(transparent 45%, rgba(5, 5, 12, 0.88));
    text-align: left;
    opacity: 0;
    transition: opacity 250ms ease;
}

.gallery-card:hover .gallery-overlay,
.gallery-card:focus-visible .gallery-overlay {
    opacity: 1;
}

.gallery-overlay small {
    color: var(--cyan);
}

.contact-section {
    display: grid;
    min-height: 92vh;
    place-items: center;
}

.contact-panel {
    display: grid;
    width: min(100%, var(--max-width));
    padding: clamp(2rem, 6vw, 5rem);
    border: 1px solid rgba(139, 92, 246, 0.22);
    border-radius: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.1), transparent 24rem),
        radial-gradient(circle at 90% 90%, rgba(139, 92, 246, 0.16), transparent 28rem),
        rgba(13, 13, 27, 0.82);
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.36);
    grid-template-columns: minmax(0, 1fr) minmax(340px, 0.85fr);
    gap: clamp(3rem, 8vw, 8rem);
}

.contact-panel > div > p:not(.chapter-number) {
    color: var(--muted);
}

.contact-email {
    display: inline-block;
    margin-top: 1.4rem;
    border-bottom: 1px solid var(--cyan);
    color: var(--cyan);
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.85rem 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    outline: none;
    background: transparent;
    color: white;
    resize: vertical;
    transition: border-color 180ms ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--cyan);
}

.honey-field {
    position: absolute !important;
    left: -10000px !important;
}

.form-status {
    margin: 0;
    font-size: 0.85rem;
}

.form-status-success { color: #5ee6a8; }
.form-status-error { color: #fb7185; }

.site-footer {
    display: flex;
    max-width: var(--max-width);
    margin: 0 auto;
    justify-content: space-between;
    padding: 2rem 1.25rem 3rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.77rem;
}

.site-footer div {
    display: flex;
    gap: 1.2rem;
}

.site-footer a:hover {
    color: var(--cyan);
}

.gallery-modal {
    width: min(1080px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1.8rem;
    background: #0d0d1b;
    color: white;
}

.gallery-modal[open] {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
    animation: modal-in 280ms ease both;
}

.gallery-modal::backdrop {
    background: rgba(2, 2, 8, 0.86);
    backdrop-filter: blur(12px);
}

@keyframes modal-in {
    from { transform: translateY(20px) scale(0.98); opacity: 0; }
}

.modal-image-wrap {
    min-height: 520px;
    background: #05050b;
}

.modal-image-wrap img,
.modal-image-wrap video {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 2rem);
    object-fit: contain;
}

.modal-image-wrap video {
    background: #020806;
}

.modal-copy {
    align-self: center;
    padding: 2.4rem;
}

.modal-copy h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 2rem;
    line-height: 1.15;
}

.modal-copy > p:last-child {
    color: var(--muted);
}

.modal-close {
    position: absolute;
    z-index: 4;
    top: 1rem;
    right: 1rem;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: rgba(7, 7, 17, 0.72);
    color: white;
    cursor: pointer;
    font-size: 1.3rem;
    backdrop-filter: blur(12px);
}

.reveal {
    transform: translateY(40px);
    opacity: 0;
    filter: blur(10px);
    transition: transform 850ms cubic-bezier(0.22, 1, 0.36, 1), opacity 850ms ease, filter 850ms ease;
    transition-delay: var(--reveal-delay, 0ms);
}

.reveal-delay {
    --reveal-delay: 120ms;
}

.reveal.visible {
    transform: translateY(0);
    opacity: 1;
    filter: blur(0);
}

/* Living world: alpine landscapes, aurora, and deep-space atmosphere */
.world-atmosphere {
    position: fixed;
    z-index: -2;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora {
    position: absolute;
    width: 75vw;
    height: 38vw;
    border-radius: 50%;
    opacity: 0.13;
    filter: blur(75px);
    mix-blend-mode: screen;
    will-change: transform;
}

.aurora-one {
    top: -18vw;
    left: -8vw;
    background: conic-gradient(from 140deg, transparent, var(--leaf), var(--cyan), transparent 64%);
    animation: aurora-drift 18s ease-in-out infinite alternate;
}

.aurora-two {
    top: 25vh;
    right: -28vw;
    background: conic-gradient(from 250deg, transparent, var(--blue), var(--purple), transparent 68%);
    animation: aurora-drift 24s ease-in-out -8s infinite alternate-reverse;
}

@keyframes aurora-drift {
    to { transform: translate3d(8vw, 6vh, 0) rotate(8deg) scale(1.12); }
}

.hero {
    isolation: isolate;
    background:
        linear-gradient(180deg, rgba(3, 11, 10, 0.08) 55%, var(--bg) 100%),
        radial-gradient(ellipse at 50% 68%, rgba(124, 207, 138, 0.13), transparent 38%),
        radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 34rem);
}

.hero::before {
    background-image:
        radial-gradient(circle, rgba(235, 250, 242, 0.68) 0 1px, transparent 1.4px),
        radial-gradient(circle, rgba(235, 250, 242, 0.34) 0 0.7px, transparent 1px);
    background-position: 0 0, 23px 19px;
    background-size: 73px 73px, 47px 47px;
    mask-image: linear-gradient(black, transparent 88%);
}

.hero-landscape {
    position: absolute;
    z-index: 0;
    right: 0;
    bottom: 0;
    left: 0;
    height: 42%;
    overflow: hidden;
    opacity: 0.72;
    pointer-events: none;
}

.mountain {
    position: absolute;
    inset: auto -8% 0;
    height: 100%;
    transform-origin: bottom;
    clip-path: polygon(0 100%, 0 78%, 12% 57%, 22% 74%, 38% 19%, 47% 53%, 58% 29%, 70% 69%, 82% 42%, 100% 76%, 100% 100%);
}

.mountain-back {
    bottom: 5%;
    background: linear-gradient(155deg, rgba(128, 170, 166, 0.3), rgba(19, 55, 45, 0.08) 58%);
    filter: blur(1px);
}

.mountain-front {
    height: 78%;
    background: linear-gradient(145deg, #17382d, #071611 58%, #030b0a);
    clip-path: polygon(0 100%, 0 82%, 17% 54%, 29% 76%, 45% 31%, 53% 64%, 64% 47%, 76% 75%, 91% 49%, 100% 65%, 100% 100%);
}

.horizon-glow {
    position: absolute;
    right: 15%;
    bottom: 22%;
    width: 32rem;
    height: 8rem;
    border-radius: 50%;
    background: rgba(239, 199, 119, 0.14);
    filter: blur(55px);
}

.hero-content {
    padding-bottom: 8vh;
}

.hero h1 {
    background: linear-gradient(120deg, var(--snow) 15%, #b9e4d0 45%, #a7cde1 67%, #eee8cf);
    background-clip: text;
}

.story-chapter {
    isolation: isolate;
}

.story-chapter::after {
    position: absolute;
    z-index: -1;
    right: 4%;
    bottom: 8%;
    width: 14rem;
    height: 20rem;
    border: 1px solid rgba(124, 207, 138, 0.08);
    border-radius: 70% 30% 68% 32% / 35% 58% 42% 65%;
    content: "";
    transform: rotate(24deg);
}

.chapter-grid--visual {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: clamp(1.4rem, 3vw, 3rem);
}

.chapter-grid--visual .chapter-heading {
    align-self: end;
    grid-column: 1 / span 5;
}

.chapter-grid--visual .chapter-body {
    align-self: start;
    grid-column: 1 / span 5;
}

.chapter-grid--visual .chapter-media {
    grid-column: 7 / -1;
    grid-row: 1 / span 2;
}

.story-chapter.has-media:nth-of-type(even) .chapter-heading,
.story-chapter.has-media:nth-of-type(even) .chapter-body {
    grid-column: 8 / -1;
    order: initial;
}

.story-chapter.has-media:nth-of-type(even) .chapter-media {
    grid-column: 1 / span 6;
    order: initial;
}

.chapter-grid--prose {
    max-width: 940px;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 4rem);
}

.text-only .chapter-heading {
    max-width: 820px;
}

.text-only .chapter-body {
    max-width: 760px;
    margin-left: clamp(0rem, 8vw, 7rem);
    padding: 0 0 0 clamp(1.5rem, 4vw, 3.5rem);
    border-width: 0 0 0 1px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.chapter-body {
    background:
        linear-gradient(135deg, rgba(216, 241, 224, 0.055), rgba(7, 25, 20, 0.25)),
        rgba(9, 28, 23, 0.46);
}

.chapter-media {
    z-index: 1;
    margin: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    perspective: 1000px;
}

.image-reveal {
    position: relative;
    min-height: clamp(430px, 61vw, 720px);
    overflow: hidden;
    border: 1px solid rgba(218, 244, 226, 0.16);
    border-radius: clamp(1.4rem, 3vw, 2.8rem);
    box-shadow: 0 45px 100px rgba(0, 0, 0, 0.44), 0 0 70px color-mix(in srgb, var(--accent) 8%, transparent);
    transform: rotateY(var(--tilt-x, 0deg)) rotateX(var(--tilt-y, 0deg));
    transform-style: preserve-3d;
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 500ms ease;
}

.image-reveal::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 25%, rgba(255, 255, 255, 0.13), transparent 58%);
    content: "";
    pointer-events: none;
    transform: translateX(-120%);
    transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chapter-media:hover .image-reveal {
    box-shadow: 0 55px 130px rgba(0, 0, 0, 0.52), 0 0 90px color-mix(in srgb, var(--accent) 14%, transparent);
}

.chapter-media:hover .image-reveal::after {
    transform: translateX(120%);
}

.chapter-media img,
.chapter-media video {
    width: 100%;
    height: 100%;
    min-height: inherit;
    max-height: none;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), filter 500ms ease;
}

.chapter-media:hover img,
.chapter-media:hover video {
    transform: scale(1.035);
    filter: saturate(1.08) contrast(1.02);
}

.chapter-media figcaption {
    position: absolute;
    z-index: 2;
    right: 1.2rem;
    bottom: 1.2rem;
    left: 1.2rem;
    padding: 3rem 1.2rem 1rem;
    border-radius: 0 0 1.5rem 1.5rem;
    background: linear-gradient(transparent, rgba(2, 11, 8, 0.82));
    color: var(--snow);
    font-size: 0.82rem;
}

.image-coordinate {
    position: absolute;
    top: 1.5rem;
    right: -1.6rem;
    color: rgba(218, 244, 226, 0.42);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    writing-mode: vertical-rl;
}

.timeline {
    --timeline-progress: 0%;
}

.timeline::before {
    background: linear-gradient(to bottom, var(--leaf) var(--timeline-progress), rgba(255, 255, 255, 0.08) var(--timeline-progress));
    box-shadow: 0 0 18px rgba(115, 215, 197, 0.3);
}

.timeline-event {
    overflow: hidden;
    padding: 0;
    background: linear-gradient(145deg, rgba(14, 43, 34, 0.82), rgba(6, 20, 17, 0.78));
    box-shadow: 0 24px 65px rgba(0, 0, 0, 0.24);
    transform-style: preserve-3d;
}

.timeline-event.visible {
    transform: translateY(0) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), opacity 850ms ease, filter 850ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.timeline-event:hover {
    border-color: rgba(115, 215, 197, 0.34);
    box-shadow: 0 35px 85px rgba(0, 0, 0, 0.34), 0 0 38px rgba(115, 215, 197, 0.07);
}

.timeline-copy {
    padding: 1.8rem;
}

.timeline-copy > p:last-child {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.timeline-image {
    height: 240px;
    overflow: hidden;
}

.timeline-image img,
.timeline-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1), filter 400ms ease;
}

.timeline-event:hover .timeline-image img,
.timeline-event:hover .timeline-image video {
    transform: scale(1.06);
    filter: saturate(1.12);
}

.timeline-event.text-only .timeline-copy {
    padding: 2.2rem;
}

.timeline-event[data-event-type="education"] { --event-color: var(--blue); }
.timeline-event[data-event-type="career"] { --event-color: var(--cyan); }
.timeline-event[data-event-type="achievement"] { --event-color: var(--sun); }
.timeline-event[data-event-type="personal"] { --event-color: var(--pink); }
.timeline-event[data-event-type="life"] { --event-color: var(--leaf); }

.timeline-event .timeline-date,
.timeline-event .timeline-type {
    color: var(--event-color, var(--cyan));
}

.timeline-event .timeline-dot,
.timeline-right .timeline-dot {
    background: var(--event-color, var(--leaf));
    box-shadow: 0 0 0 1px var(--event-color, var(--leaf)), 0 0 20px var(--event-color, var(--leaf));
}

.gallery-card {
    transform-style: preserve-3d;
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), border-color 300ms ease, box-shadow 300ms ease;
}

.gallery-card.visible {
    transform: translateY(0) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
}

.gallery-card:hover {
    border-color: rgba(124, 207, 138, 0.34);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38), 0 0 35px rgba(124, 207, 138, 0.08);
}

.contact-panel {
    border-color: rgba(115, 215, 197, 0.2);
    background:
        radial-gradient(circle at 10% 10%, rgba(124, 207, 138, 0.11), transparent 24rem),
        radial-gradient(circle at 90% 90%, rgba(111, 166, 217, 0.13), transparent 28rem),
        rgba(7, 22, 18, 0.86);
}

/* Printable résumé */
.resume-page {
    min-height: 100vh;
    padding: 2rem;
    background: #0b0b16;
}

.resume-toolbar {
    display: flex;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    justify-content: space-between;
}

.resume-sheet {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(2rem, 7vw, 5rem);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    color: #171722;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    padding-bottom: 2.2rem;
    border-bottom: 3px solid #171722;
}

.resume-header h1 {
    margin: 0.2rem 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(2.8rem, 7vw, 5rem);
    letter-spacing: -0.06em;
    line-height: 0.95;
}

.resume-header .eyebrow {
    color: #6d28d9;
}

.resume-header address {
    align-self: flex-end;
    font-style: normal;
    text-align: right;
}

.resume-section {
    padding: 2rem 0;
    border-bottom: 1px solid #dedee6;
}

.resume-section h2 {
    margin: 0 0 0.7rem;
    color: #6d28d9;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.resume-section h3 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.resume-section p {
    margin: 0;
    color: #4f4f5e;
}

.resume-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.resume-skills span {
    padding: 0.35rem 0.65rem;
    border: 1px solid #d6d2e8;
    border-radius: 999px;
    font-size: 0.78rem;
}

.resume-event {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 1.5rem;
    margin-top: 1.2rem;
}

.resume-event time {
    color: #6d28d9;
    font-size: 0.8rem;
    font-weight: 700;
}

@media (max-width: 820px) {
    :root { --header-height: 64px; }

    .cursor-glow { display: none; }

    .site-header {
        top: 0.7rem;
        width: calc(100% - 1.4rem);
        padding-inline: 1rem;
        border-color: var(--border);
        background: rgba(7, 7, 17, 0.75);
        backdrop-filter: blur(18px);
    }

    .nav-toggle {
        display: grid;
        width: 2.5rem;
        height: 2.5rem;
        place-content: center;
        gap: 0.38rem;
    }

    .nav-toggle span:not(.sr-only) {
        display: block;
        width: 1.25rem;
        height: 1px;
        background: white;
    }

    #primary-nav {
        position: absolute;
        top: calc(100% + 0.5rem);
        right: 0;
        left: 0;
        display: grid;
        padding: 0.8rem;
        transform: translateY(-8px);
        border: 1px solid var(--border);
        border-radius: 1rem;
        background: rgba(7, 7, 17, 0.94);
        opacity: 0;
        visibility: hidden;
        backdrop-filter: blur(20px);
        transition: 180ms ease;
    }

    .nav-open #primary-nav {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    #primary-nav a {
        padding: 0.75rem;
    }

    #primary-nav .nav-cta {
        margin: 0.35rem 0 0;
        text-align: center;
    }

    .hero h1 {
        font-size: clamp(3.3rem, 16vw, 6rem);
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 300px;
        margin-inline: auto;
    }

    .scroll-cue { display: none; }

    .story-thread { left: 1.45rem; }

    .chapter-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .chapter-grid--visual .chapter-heading,
    .chapter-grid--visual .chapter-body,
    .chapter-grid--visual .chapter-media,
    .story-chapter.has-media:nth-of-type(even) .chapter-heading,
    .story-chapter.has-media:nth-of-type(even) .chapter-body,
    .story-chapter.has-media:nth-of-type(even) .chapter-media {
        grid-column: 1;
        grid-row: auto;
    }

    .chapter-grid--visual .chapter-heading { order: 1; }
    .chapter-grid--visual .chapter-media { order: 2; }
    .chapter-grid--visual .chapter-body { order: 3; }

    .text-only .chapter-body {
        margin-left: 0;
    }

    .image-reveal {
        min-height: clamp(360px, 115vw, 620px);
    }

    .image-coordinate {
        display: none;
    }

    .story-chapter:nth-of-type(even) .chapter-heading,
    .story-chapter:nth-of-type(even) .chapter-body {
        order: initial;
    }

    .chapter-body {
        border-radius: 1.4rem;
    }

    .timeline::before {
        left: 0.4rem;
    }

    .timeline-event,
    .timeline-right {
        width: calc(100% - 2.5rem);
        margin: 0 0 2.5rem 2.5rem;
    }

    .timeline-dot,
    .timeline-right .timeline-dot {
        top: 2rem;
        right: auto;
        left: -2.5rem;
    }

    .gallery-card,
    .gallery-card:nth-child(5n + 1),
    .gallery-card:nth-child(5n + 4) {
        min-height: 240px;
        grid-column: span 6;
    }

    .gallery-card img,
    .gallery-card video {
        min-height: 240px;
    }

    .gallery-overlay {
        opacity: 1;
    }

    .contact-panel {
        grid-template-columns: 1fr;
    }

    .gallery-modal[open] {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .modal-image-wrap {
        min-height: 50vh;
    }
}

@media (max-width: 520px) {
    .chapter { padding-inline: 1.1rem; }

    .brand { font-size: 0.87rem; }

    .chapter-heading h2,
    .section-intro h2,
    .contact-panel h2 {
        font-size: clamp(2.35rem, 12vw, 3.5rem);
    }

    .gallery-grid { gap: 0.6rem; }

    .gallery-card,
    .gallery-card:nth-child(5n + 1),
    .gallery-card:nth-child(5n + 4) {
        min-height: 180px;
        border-radius: 1rem;
        grid-column: span 6;
    }

    .gallery-card img,
    .gallery-card video { min-height: 180px; }

    .gallery-overlay { padding: 0.9rem; }

    .gallery-overlay strong { font-size: 0.78rem; }

    .site-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .resume-page { padding: 0; }

    .resume-toolbar {
        padding: 0.8rem;
    }

    .resume-header {
        flex-direction: column;
    }

    .resume-header address {
        align-self: auto;
        text-align: left;
    }

    .resume-event {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

@media print {
    @page { size: A4; margin: 12mm; }

    .resume-page {
        padding: 0;
        background: white;
    }

    .resume-toolbar {
        display: none;
    }

    .resume-sheet {
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .resume-section,
    .resume-event {
        break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        transform: none;
        opacity: 1;
        filter: none;
    }
}
