/* ==========================================================
   Editorial Portfolio — Dark default · Light toggle
   ========================================================== */

/* Shared tokens (both themes) */
:root {
    --white: #ffffff;
    --gold: #c8961a;
    --navy: #0d1b36;
    --cream: #f5f0e8;
    --cream-border: #ddd5bb;
    --gold-wash: rgba(200, 150, 26, 0.12);
    --navy-wash: rgba(13, 27, 54, 0.08);
    --text-muted: #666666;
    --topbar-h: 72px;
    --social-w: 56px;
    --mobile-gutter: 20px;
    --radius: 4px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --font-label: 'Montserrat', sans-serif;
}

/* ── DARK THEME (default — matches reference image) ── */
[data-theme="dark"] {
    --bg-body: #0a0a0a;
    --bg-hero: #0a0a0a;
    --bg-hero-photo: #1a1a1a;
    --bg-stats: #111111;
    --bg-footer: #0a0a0a;
    --bg-nav-drawer: #111111;
    --bg-content: #0a0a0a;
    --bg-content-alt: #111111;
    --bg-section: #0a0a0a;
    --bg-panel: transparent;

    --text-hero: #ffffff;
    --text-hero-muted: rgba(255, 255, 255, 0.72);
    --text-hero-subtle: rgba(255, 255, 255, 0.45);
    --text-hero-faint: rgba(255, 255, 255, 0.4);
    --text-content: rgba(255, 255, 255, 0.72);
    --text-heading: #ffffff;
    --text-section: rgba(255, 255, 255, 0.72);
    --text-section-heading: #ffffff;
    --text-section-muted: rgba(255, 255, 255, 0.45);
    --editorial-rule: rgba(255, 255, 255, 0.12);
    --accent: #c8961a;

    --topbar-text: #ffffff;
    --topbar-icon-border: rgba(255, 255, 255, 0.2);
    --topbar-scrolled: rgba(10, 10, 10, 0.92);
    --topbar-menu-line: #ffffff;

    --social-icon: rgba(255, 255, 255, 0.55);
    --social-icon-hover: #ffffff;
    --social-line: rgba(255, 255, 255, 0.2);
    --social-label: rgba(255, 255, 255, 0.45);

    --nav-link: rgba(255, 255, 255, 0.45);
    --nav-link-active: #ffffff;
    --nav-border: rgba(255, 255, 255, 0.06);

    --btn-solid-bg: #ffffff;
    --btn-solid-text: #0a0a0a;
    --btn-solid-border: #ffffff;
    --btn-solid-hover-bg: transparent;
    --btn-solid-hover-text: #ffffff;

    --btn-ghost-text: #ffffff;
    --btn-ghost-border: rgba(255, 255, 255, 0.45);
    --btn-ghost-hover-bg: rgba(255, 255, 255, 0.06);

    --stat-num: #ffffff;
    --stat-label: rgba(255, 255, 255, 0.4);
    --stats-border: rgba(255, 255, 255, 0.06);

    --progress-bar: #ffffff;
    --photo-placeholder-bg: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    --photo-placeholder-icon: rgba(255, 255, 255, 0.08);
    --hero-texture: rgba(255, 255, 255, 0.015);

    --footer-text: rgba(255, 255, 255, 0.5);
    --footer-name: #ffffff;
    --footer-role: rgba(255, 255, 255, 0.35);
    --footer-border: rgba(255, 255, 255, 0.08);
    --footer-social-border: rgba(255, 255, 255, 0.15);
    --footer-social-icon: rgba(255, 255, 255, 0.6);
    --footer-copy: rgba(255, 255, 255, 0.3);

    color-scheme: dark;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
    --bg-body: #ffffff;
    --bg-hero: #fafafa;
    --bg-hero-photo: #ececec;
    --bg-stats: #f3f3f3;
    --bg-footer: #0d1b36;
    --bg-nav-drawer: #ffffff;
    --bg-content: #ffffff;
    --bg-content-alt: #f5f5f5;
    --bg-section: #ffffff;
    --bg-panel: #ffffff;

    --text-hero: #0a0a0a;
    --text-hero-muted: #555555;
    --text-hero-subtle: #888888;
    --text-hero-faint: #aaaaaa;
    --text-content: #444444;
    --text-heading: #0a0a0a;
    --text-section: #555555;
    --text-section-heading: #0a0a0a;
    --text-section-muted: #888888;
    --editorial-rule: rgba(0, 0, 0, 0.1);
    --accent: #c8961a;

    --topbar-text: #0a0a0a;
    --topbar-icon-border: rgba(0, 0, 0, 0.15);
    --topbar-scrolled: rgba(255, 255, 255, 0.95);
    --topbar-menu-line: #0a0a0a;

    --social-icon: rgba(0, 0, 0, 0.45);
    --social-icon-hover: #0a0a0a;
    --social-line: rgba(0, 0, 0, 0.15);
    --social-label: rgba(0, 0, 0, 0.4);

    --nav-link: rgba(0, 0, 0, 0.4);
    --nav-link-active: #0a0a0a;
    --nav-border: rgba(0, 0, 0, 0.08);

    --btn-solid-bg: #0a0a0a;
    --btn-solid-text: #ffffff;
    --btn-solid-border: #0a0a0a;
    --btn-solid-hover-bg: transparent;
    --btn-solid-hover-text: #0a0a0a;

    --btn-ghost-text: #0a0a0a;
    --btn-ghost-border: rgba(0, 0, 0, 0.35);
    --btn-ghost-hover-bg: rgba(0, 0, 0, 0.04);

    --stat-num: #0d1b36;
    --stat-label: #777777;
    --stats-border: rgba(0, 0, 0, 0.06);

    --progress-bar: #0d1b36;
    --photo-placeholder-bg: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    --photo-placeholder-icon: rgba(0, 0, 0, 0.08);
    --hero-texture: rgba(0, 0, 0, 0.03);

    --footer-text: rgba(255, 255, 255, 0.6);
    --footer-name: #ffffff;
    --footer-role: rgba(255, 255, 255, 0.45);
    --footer-border: rgba(255, 255, 255, 0.1);
    --footer-social-border: rgba(255, 255, 255, 0.2);
    --footer-social-icon: rgba(255, 255, 255, 0.7);
    --footer-copy: rgba(255, 255, 255, 0.35);

    color-scheme: light;
}

/* Default to dark before JS (matches reference) */
html:not([data-theme]) {
    --bg-body: #0a0a0a;
    --bg-hero: #0a0a0a;
    --bg-hero-photo: #1a1a1a;
    --bg-stats: #111111;
    --bg-footer: #0a0a0a;
    --bg-nav-drawer: #111111;
    --text-hero: #ffffff;
    --text-hero-muted: rgba(255, 255, 255, 0.72);
    --text-hero-subtle: rgba(255, 255, 255, 0.45);
    --topbar-text: #ffffff;
    --topbar-menu-line: #ffffff;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--topbar-h);
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-content, #1a1a1a);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
    overflow-x: clip;
    min-width: 0;
}

main { min-width: 0; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: color var(--transition), opacity var(--transition); }

/* ── Scroll progress ── */
.scroll-progress {
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0;
    height: 2px;
    background: var(--progress-bar);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1200;
    transition: background var(--transition);
}

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 4vw, 48px) 0 calc(var(--social-w) + 20px);
    z-index: 1100;
    background: transparent;
    transition: background var(--transition);
}

.topbar.scrolled {
    background: var(--topbar-scrolled);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .topbar.scrolled {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-label);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--topbar-text);
    transition: color var(--transition);
}

.brand-accent {
    width: 3px;
    height: 18px;
    background: var(--accent, #c8961a);
    flex-shrink: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-theme,
.topbar-menu {
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--topbar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), border-color var(--transition);
    touch-action: manipulation;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.topbar-theme {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--topbar-icon-border);
    font-size: 0.95rem;
}

.topbar-theme:hover { border-color: var(--topbar-text); }

.topbar-menu {
    flex-direction: column;
    gap: 7px;
    width: 40px; height: 40px;
    padding: 0;
}

.topbar-menu span {
    display: block;
    height: 2px;
    background: var(--topbar-menu-line);
    transition: transform var(--transition), width var(--transition), background var(--transition);
}

.topbar-menu span:first-child { width: 28px; }
.topbar-menu span:last-child { width: 18px; margin-left: auto; }

.topbar-menu.open span:first-child {
    transform: translateY(4.5px) rotate(45deg);
    width: 24px;
}

.topbar-menu.open span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
    width: 24px;
    margin-left: 0;
}

[data-theme="light"] .theme-light { display: none; }
[data-theme="dark"] .theme-dark { display: none; }

/* ── Social rail ── */
.social-rail {
    position: fixed;
    top: 0; left: 0;
    width: var(--social-w);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1050;
    padding: var(--topbar-h) 0 24px;
}

.social-rail-icons {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.social-rail-icons a {
    color: var(--social-icon);
    font-size: 0.95rem;
    transition: color var(--transition);
}

.social-rail-icons a:hover { color: var(--social-icon-hover); }

.social-rail-line {
    width: 1px;
    height: 48px;
    background: var(--social-line);
}

.social-rail-label {
    font-family: var(--font-label);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--social-label);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

/* ── Nav drawer ── */
.nav-backdrop {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1150;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition), visibility var(--transition);
}

.nav-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-drawer {
    position: fixed;
    top: var(--topbar-h);
    right: 0;
    width: min(380px, 88vw);
    height: calc(100dvh - var(--topbar-h));
    max-height: calc(100dvh - var(--topbar-h));
    background: var(--bg-nav-drawer);
    z-index: 1160;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), background var(--transition), visibility var(--transition);
    border-left: 1px solid var(--nav-border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    visibility: hidden;
    overflow: hidden;
}

[data-theme="dark"] .nav-drawer { box-shadow: none; }

.nav-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

.nav-drawer-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 16px 0;
    min-height: 48px;
}

.nav-drawer-close {
    background: none;
    border: none;
    color: var(--topbar-text);
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.7;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity var(--transition);
    touch-action: manipulation;
}

.nav-drawer-close:hover { opacity: 1; }

.nav-drawer-scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 28px 20px;
}

.nav-drawer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    flex: 1;
    min-height: 0;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-drawer-list li {
    flex: 0 1 auto;
}

.nav-drawer-list a {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.28rem, 3.6vh, 1.95rem);
    font-weight: 500;
    line-height: 1.18;
    color: var(--nav-link);
    padding: clamp(1px, 0.55vh, 6px) 0;
    transition: color var(--transition), transform var(--transition);
}

.nav-drawer-list a:hover,
.nav-drawer-list a.active {
    color: var(--nav-link-active, var(--accent));
    transform: translateX(8px);
}

body.nav-open {
    overflow: hidden;
}

body.nav-open .topbar {
    z-index: 1180;
}

body.nav-open .topbar-theme,
body.nav-open .topbar-menu {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

@media (max-height: 720px) {
    .nav-drawer-header {
        min-height: 40px;
        padding-top: 6px;
    }

    .nav-drawer-scroll {
        padding: 4px 24px 12px;
    }

    .nav-drawer-list a {
        font-size: clamp(1.15rem, 3.2vh, 1.62rem);
        padding: clamp(1px, 0.45vh, 4px) 0;
    }
}

@media (max-height: 580px) {
    .nav-drawer-list a {
        font-size: clamp(1.05rem, 2.9vh, 1.38rem);
        line-height: 1.12;
    }
}

/* ── Hero split ── */
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    background: var(--bg-hero);
    transition: background var(--transition);
}

.hero-split-left {
    display: flex;
    align-items: center;
    padding: calc(var(--topbar-h) + 48px) clamp(32px, 5vw, 64px) 64px calc(var(--social-w) + 32px);
    background: var(--bg-hero);
    transition: background var(--transition);
}

.hero-split-label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-hero-faint);
    margin-bottom: 24px;
}

.hero-split-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 3.75rem);
    font-weight: 500;
    color: var(--text-hero);
    line-height: 1.15;
    margin-bottom: 16px;
    transition: color var(--transition);
}

.hero-split-role {
    font-size: 1.1rem;
    color: var(--text-hero-subtle);
    margin-bottom: 24px;
    min-height: 1.6rem;
}

.hero-split-role #typingText {
    color: var(--text-hero);
    font-weight: 500;
    opacity: 0.85;
}

.typing-cursor {
    color: var(--text-hero);
    animation: blink 1s step-end infinite;
}

.hero-split-desc {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-hero-muted);
    line-height: 1.85;
    width: 100%;
    max-width: none;
    margin-bottom: 40px;
}

.hero-split-content { max-width: 560px; }

.hero-split-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: var(--btn-solid-bg);
    color: var(--btn-solid-text);
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 2px solid var(--btn-solid-border);
    transition: all var(--transition);
}

.btn-white:hover {
    background: var(--btn-solid-hover-bg);
    color: var(--btn-solid-hover-text);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: transparent;
    color: var(--btn-ghost-text);
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid var(--btn-ghost-border);
    transition: all var(--transition);
}

.btn-ghost:hover {
    border-color: var(--btn-ghost-text);
    background: var(--btn-ghost-hover-bg);
}

.hero-split-right {
    position: relative;
    min-height: 50vh;
    background: var(--bg-hero-photo);
    overflow: hidden;
    transition: background var(--transition);
}

.hero-split-texture {
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 40px,
            var(--hero-texture) 40px,
            var(--hero-texture) 41px
        );
    pointer-events: none;
    z-index: 1;
}

.hero-split-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-split-photo .photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.hero-split-photo .photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--photo-placeholder-bg);
    font-size: 8rem;
    color: var(--photo-placeholder-icon);
}

.stats-band {
    background: var(--bg-stats);
    border-top: 1px solid var(--stats-border);
    padding: 48px 0;
    padding-left: var(--social-w);
    transition: background var(--transition), border-color var(--transition);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.stat-pill {
    text-align: center;
    padding: 16px;
}

.stat-num {
    display: block;
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 500;
    color: var(--stat-num);
    line-height: 1.1;
    transition: color var(--transition);
}

.stat-text {
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--stat-label);
    margin-top: 8px;
    display: block;
    transition: color var(--transition);
}

/* ── Editorial sections (reference layout) ── */
.section-editorial,
.content-area,
main > .section {
    background: var(--bg-section);
    color: var(--text-section);
}

.section {
    padding: 80px 0;
    padding-left: calc(var(--social-w) + 24px);
    padding-right: clamp(24px, 4vw, 48px);
}

.section-gray { background: var(--bg-content-alt); }

.editorial-wrap { max-width: 1100px; }

.editorial-page-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 500;
    color: var(--text-section-heading);
    margin-bottom: 20px;
    line-height: 1.1;
}

.editorial-rule {
    border: none;
    height: 1px;
    background: var(--editorial-rule);
    margin-bottom: 56px;
}

.editorial-row {
    display: grid;
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: clamp(32px, 5vw, 64px);
    margin-bottom: 56px;
    align-items: start;
}

.editorial-row > * { min-width: 0; }

.editorial-row:last-child { margin-bottom: 0; }

.editorial-label {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-section-heading);
    line-height: 1.3;
}

.editorial-body {
    font-size: 0.95rem;
    line-height: 1.9;
    color: var(--text-section);
    max-width: 640px;
}

/* Justified body copy — sitewide */
.editorial-body,
.hero-split-desc,
.timeline-line-desc,
.project-minimal p,
.quote-editorial p,
.service-panel p,
.blog-panel p,
.panel-text,
.panel-text p,
.project-body p,
.timeline-body p {
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.editorial-row > :last-child .editorial-body,
.editorial-row > :last-child .panel-text {
    max-width: none;
    width: 100%;
}

.editorial-meta {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.editorial-meta span,
.editorial-meta a {
    font-size: 0.88rem;
    color: var(--text-section-muted);
    overflow-wrap: anywhere;
}

.editorial-meta a:hover { color: var(--text-section-heading); }

/* Work timeline rows */
.timeline-editorial { display: flex; flex-direction: column; gap: 0; }

.timeline-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 32px;
    padding: 18px 0;
    border-bottom: 1px solid var(--editorial-rule);
    font-size: 0.92rem;
    color: var(--text-section-muted);
}

.timeline-line:first-child { padding-top: 0; }

.timeline-line strong {
    font-weight: 600;
    color: var(--text-section-heading);
    font-size: 0.95rem;
}

.timeline-line .tl-date {
    margin-left: auto;
    font-family: var(--font-label);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-section-muted);
}

.timeline-line-desc {
    width: 100%;
    font-size: 0.88rem;
    color: var(--text-section-muted);
    line-height: 1.7;
    padding-top: 4px;
}

/* Skills editorial */
.skill-editorial {
    padding: 14px 0;
    border-bottom: 1px solid var(--editorial-rule);
}

.skill-editorial:first-child { padding-top: 0; }

.skill-editorial-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: 10px;
}

.skill-editorial-head h4 {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-section-heading);
}

.skill-editorial-head span {
    font-size: 0.82rem;
    color: var(--text-section-muted);
}

.skill-editorial .progress-track {
    height: 2px;
    background: var(--editorial-rule);
}

.skill-editorial .progress-fill {
    background: var(--text-section-heading);
}

/* Project grid — minimal dark */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 32px;
    min-width: 0;
}

.project-minimal {
    border-bottom: 1px solid var(--editorial-rule);
    padding-bottom: 24px;
}

.project-minimal h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 12px 0 8px;
    color: var(--text-section-heading);
}

.project-minimal h3 a:hover { opacity: 0.7; }

.project-minimal p {
    font-size: 0.88rem;
    color: var(--text-section-muted);
    line-height: 1.65;
    margin: 0;
}

.project-minimal .project-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-content-alt);
}

/* Quote — minimal editorial */
.quote-editorial {
    padding: 32px 0;
    border-bottom: 1px solid var(--editorial-rule);
}

.quote-editorial p {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-section);
    line-height: 1.75;
    margin-bottom: 16px;
}

.quote-editorial .t-author strong {
    color: var(--text-section-heading);
    font-size: 0.85rem;
}

.quote-editorial .t-author span {
    font-size: 0.78rem;
    color: var(--text-section-muted);
}

/* Contact editorial */
.contact-editorial .form-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--editorial-rule);
    border-radius: 0;
    padding: 12px 0;
    color: var(--text-section-heading);
}

.contact-editorial .form-input:focus {
    border-color: var(--text-section-heading);
    outline: none;
}

.contact-editorial label {
    font-family: var(--font-label);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-section-muted);
}

.btn-editorial {
    display: inline-flex;
    padding: 14px 32px;
    background: var(--btn-solid-bg);
    color: var(--btn-solid-text);
    border: 2px solid var(--btn-solid-border);
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-editorial:hover {
    background: var(--btn-solid-hover-bg);
    color: var(--btn-solid-hover-text);
}

.btn-editorial-outline {
    background: transparent;
    color: var(--btn-ghost-text);
    border: 1px solid var(--btn-ghost-border);
}

.btn-editorial-outline:hover {
    background: var(--btn-ghost-hover-bg);
    border-color: var(--btn-ghost-text);
}

.section-intro { display: none; }

.section-tag { display: none; }

.section-heading {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 500;
    color: var(--text-section-heading);
    line-height: 1.2;
}

/* Legacy panels — transparent in dark editorial */
.panel {
    background: var(--bg-panel);
    border: none;
    padding: 0;
    box-shadow: none;
}

.panel:hover {
    transform: none;
    box-shadow: none;
}

.panel-text {
    color: var(--text-section);
    line-height: 1.9;
}

.contact-list li {
    border-color: var(--editorial-rule);
    color: var(--text-section-muted);
}

.contact-list i {
    background: transparent;
    color: var(--text-section-heading);
    width: auto;
    height: auto;
    padding: 0;
}

.contact-list a:hover { color: var(--text-section-heading); }

.contact-list { list-style: none; }

.identity-card,
.quote-card { display: none; }

.service-panel {
    padding: 24px 0;
    border-bottom: 1px solid var(--editorial-rule);
    text-align: left;
}

.service-panel .service-ico {
    margin: 0 0 12px;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--text-section-heading);
    font-size: 1.2rem;
    justify-content: flex-start;
}

.service-panel h3 {
    font-family: var(--font-display);
    color: var(--text-section-heading);
}

.service-panel p { color: var(--text-section-muted); }

.blog-panel {
    padding: 24px 0;
    border-bottom: 1px solid var(--editorial-rule);
}

.blog-date { color: var(--text-section-muted); }

.blog-panel h3 a { color: var(--text-section-heading); }

.read-link { color: var(--text-section-heading); }

.btn-primary {
    background: var(--btn-solid-bg);
    color: var(--btn-solid-text);
    border: 2px solid var(--btn-solid-border);
}

.btn-primary:hover {
    background: var(--btn-solid-hover-bg);
    color: var(--btn-solid-hover-text);
}

.btn-outline-primary {
    color: var(--btn-ghost-text);
    border-color: var(--btn-ghost-border);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--btn-ghost-hover-bg);
    color: var(--btn-ghost-text);
    border-color: var(--btn-ghost-text);
}

.filter-btn {
    background: transparent;
    border-color: var(--editorial-rule);
    color: var(--text-section-muted);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--btn-solid-bg);
    color: var(--btn-solid-text);
    border-color: var(--btn-solid-border);
}

/* ── Content area (legacy alias) ── */

.skill-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.skill-head h4 { font-size: 0.95rem; font-weight: 600; }

.skill-head small {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.skill-val {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.9rem;
}

.progress-track {
    height: 4px;
    background: var(--cream-border);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--navy);
    transition: width 1.2s ease;
}

/* Projects */
.project-panel { padding: 0; overflow: hidden; }

.project-img {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--cream);
}

.project-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-panel:hover .project-img img { transform: scale(1.05); }

.img-empty {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-muted);
    opacity: 0.4;
}

.project-body { padding: 22px; }

.badge-label {
    font-family: var(--font-label);
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--navy);
    background: var(--gold-wash);
    padding: 3px 8px;
}

.project-body h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 8px 0;
}

.project-body h3 a { color: var(--navy); }
.project-body h3 a:hover { color: var(--gold); }

.project-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Timeline */
.timeline-wrap { max-width: 760px; margin: 0 auto; }

.timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.timeline-year {
    font-family: var(--font-label);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    text-align: right;
    padding-top: 6px;
    letter-spacing: 0.05em;
}

.timeline-body h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.timeline-place {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.timeline-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Services */
.service-panel { padding: 32px 24px; text-align: center; }

.service-ico {
    width: 52px; height: 52px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    color: var(--gold);
    font-size: 1.3rem;
}

.service-panel h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.service-panel p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

/* Editorial service panels override legacy centered cards */
.section-editorial .service-panel {
    padding: 24px 0;
    text-align: left;
}

.section-editorial .service-panel .service-ico {
    margin: 0 0 12px;
    width: auto;
    height: auto;
    background: transparent;
    color: var(--text-section-heading);
    font-size: 1.2rem;
    justify-content: flex-start;
}

/* Blog */
.blog-date {
    font-family: var(--font-label);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.blog-panel h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 8px 0;
}

.blog-panel h3 a { color: var(--text-section-heading); }

.read-link {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-section-heading);
}

.read-link:hover { color: var(--gold); }

/* Buttons (content area) */
.btn-primary {
    background: var(--navy);
    border: none;
    color: var(--white);
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 28px;
    transition: all var(--transition);
}

.btn-primary:hover {
    background: #152a52;
    color: var(--white);
}

.btn-outline-primary {
    color: var(--navy);
    border: 2px solid var(--navy);
    background: transparent;
    font-family: var(--font-label);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 10px 26px;
    transition: all var(--transition);
}

.btn-outline-primary:hover {
    background: var(--navy);
    color: var(--white);
}

/* Contact form */
.contact-panel label {
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--cream-border);
    background: var(--bg-panel);
    color: var(--text-content);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--navy);
}

/* Footer */
.site-footer {
    background: var(--bg-footer);
    color: var(--footer-text);
    padding: 48px 0 28px;
    padding-left: var(--social-w);
    transition: background var(--transition);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--footer-border);
}

.footer-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--footer-name);
}

.footer-role {
    font-family: var(--font-label);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--footer-role);
    margin-top: 4px;
}

.footer-social a {
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--footer-social-border);
    color: var(--footer-social-icon);
    transition: all var(--transition);
}

.footer-social a:hover {
    border-color: var(--footer-name);
    color: var(--footer-name);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--footer-copy);
    text-align: center;
}

/* Inner pages */
.page-hero { padding-top: calc(var(--topbar-h) + 48px); }

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
}

.filter-btn {
    padding: 8px 20px;
    font-family: var(--font-label);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border: 1px solid var(--cream-border);
    background: var(--white);
    transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .hero-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-split-left {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        align-items: stretch;
        padding: calc(var(--topbar-h) + 24px) var(--mobile-gutter) 40px;
        order: 2;
        text-align: left;
    }

    .hero-split-content {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .hero-split-desc {
        max-width: none;
        width: 100%;
    }

    .hero-split-title {
        font-size: clamp(1.85rem, 7vw, 2.75rem);
        overflow-wrap: anywhere;
    }

    .project-minimal p,
    .blog-panel p,
    .quote-editorial p,
    .timeline-line-desc,
    .panel-text,
    .project-body p {
        width: 100%;
    }

    .hero-split-btns {
        justify-content: flex-start;
        width: 100%;
    }

    .hero-split-right {
        min-height: 42vh;
        order: 1;
    }

    .hero-split-photo .photo-placeholder {
        font-size: clamp(3rem, 18vw, 6rem);
    }

    .social-rail { display: none; }

    .topbar {
        padding-left: var(--mobile-gutter);
        padding-right: var(--mobile-gutter);
    }

    .topbar-brand {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: calc(100vw - 120px);
    }

    .nav-drawer-scroll { padding: 6px 20px 16px; }

    .nav-drawer-header { padding: 8px 12px 0; min-height: 44px; }

    .section {
        padding: 64px var(--mobile-gutter);
    }

    .stats-band {
        padding: 40px var(--mobile-gutter);
    }

    .site-footer {
        padding: 40px var(--mobile-gutter) 24px;
    }

    .section .container,
    .stats-band .container,
    .site-footer .container {
        padding-left: 0;
        padding-right: 0;
        max-width: 100%;
    }

    .stats-row { grid-template-columns: 1fr; gap: 16px; }

    .stat-num { font-size: clamp(2rem, 8vw, 2.8rem); }

    .editorial-row {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 40px;
    }

    .editorial-body {
        max-width: none;
        width: 100%;
    }

    .editorial-page-title {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .editorial-rule { margin-bottom: 36px; }

    .editorial-body,
    .hero-split-desc,
    .timeline-line-desc,
    .project-minimal p,
    .quote-editorial p,
    .service-panel p,
    .blog-panel p,
    .panel-text,
    .panel-text p,
    .project-body p,
    .timeline-body p {
        text-align: left;
        hyphens: auto;
    }

    .timeline-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .timeline-line .tl-date {
        margin-left: 0;
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-grid { grid-template-columns: 1fr; }

    .filter-tabs {
        justify-content: flex-start;
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.6rem;
    }

    .page-hero {
        padding-top: calc(var(--topbar-h) + 24px);
    }
}

@media (max-width: 575px) {
    :root { --mobile-gutter: 16px; }

    .hero-split-left {
        padding: calc(var(--topbar-h) + 16px) var(--mobile-gutter) 32px;
    }

    .hero-split-right { min-height: 36vh; }

    .hero-split-title { font-size: clamp(1.65rem, 8.5vw, 2rem); }

    .hero-split-btns { flex-direction: column; align-items: stretch; }

    .btn-white, .btn-ghost { width: 100%; text-align: center; }

    .section { padding: 48px var(--mobile-gutter); }

    .stats-band { padding: 32px var(--mobile-gutter); }

    .editorial-page-title { font-size: clamp(1.5rem, 8vw, 2rem); }

    .stat-num { font-size: clamp(1.75rem, 9vw, 2.4rem); }
}

@media (hover: none) {
    .timeline-line:hover {
        padding-left: 0;
    }

    .skill-editorial:hover,
    .project-minimal:hover,
    .quote-editorial:hover,
    .stat-pill:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Smooth theme switch */
body.theme-switching,
body.theme-switching *,
body.theme-switching *::before,
body.theme-switching *::after {
    transition-duration: 0.4s !important;
}

/* ── Animations ── */
.editorial-rule {
    transform-origin: left center;
}

.timeline-line {
    transition: padding-left 0.35s ease, border-color 0.35s ease, opacity 0.35s ease;
}

.timeline-line:hover {
    padding-left: 10px;
    border-color: var(--accent, #c8961a);
}

.skill-editorial {
    transition: transform 0.35s ease;
}

.skill-editorial:hover {
    transform: translateX(6px);
}

.project-minimal {
    transition: transform 0.35s ease;
}

.project-minimal:hover {
    transform: translateY(-4px);
}

.project-minimal .project-img {
    overflow: hidden;
}

.project-minimal .project-img img {
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-minimal:hover .project-img img {
    transform: scale(1.06);
}

.quote-editorial {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.quote-editorial:hover {
    transform: translateX(6px);
}

.service-panel,
.blog-panel {
    transition: transform 0.35s ease;
}

.service-panel:hover,
.blog-panel:hover {
    transform: translateX(6px);
}

.btn-white,
.btn-ghost,
.btn-primary,
.btn-outline-primary {
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-white:hover,
.btn-ghost:hover {
    transform: translateY(-3px);
}

.btn-white:active,
.btn-ghost:active {
    transform: translateY(-1px);
}

.social-rail-icons a {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-rail-icons a:hover {
    transform: translateY(-3px);
}

.brand-accent {
    animation: accentPulse 3s ease-in-out infinite;
}

@keyframes accentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.hero-split-photo .photo-img {
    will-change: transform;
}

.stat-pill {
    transition: transform 0.35s ease;
}

.stat-pill:hover {
    transform: translateY(-4px);
}

.stat-num {
    transition: color 0.35s ease;
}

.nav-drawer-list a {
    transition: color 0.25s ease, transform 0.25s ease;
}

.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: translateX(-100%);
    animation: shimmerBar 2s ease infinite;
}

[data-theme="light"] .progress-fill::after {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
}

@keyframes shimmerBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

.topbar {
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

.scroll-progress {
    transition: background 0.4s ease;
}

/* Initial state for GSAP scroll targets */
@media (prefers-reduced-motion: no-preference) {
    .editorial-page-title,
    .editorial-rule,
    .editorial-row,
    .timeline-line,
    .skill-editorial,
    .project-minimal,
    .quote-editorial,
    .service-panel,
    .blog-panel,
    .stat-pill,
    .contact-editorial,
    .section-editorial .btn-ghost,
    .section-editorial .btn-white {
        will-change: transform, opacity;
    }

    .project-minimal,
    .blog-panel,
    .quote-editorial,
    .service-panel,
    .skill-editorial {
        transform: translateZ(0);
    }
}

/* ── Custom cursor ── */
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    border: 1.5px solid rgba(200, 150, 26, 0.75);
    border-radius: 50%;
    background: rgba(200, 150, 26, 0.06);
    pointer-events: none;
    z-index: 100000;
    opacity: 0;
    transition: opacity 0.35s ease, width 0.35s ease, height 0.35s ease,
        border-color 0.35s ease, background 0.35s ease;
    will-change: transform;
}

.cursor-follower.visible {
    opacity: 1;
}

.cursor-follower.cursor-hover {
    width: 52px;
    height: 52px;
    border-color: rgba(200, 150, 26, 1);
    background: rgba(200, 150, 26, 0.12);
}

@media (hover: hover) and (pointer: fine) {
    body.has-custom-cursor,
    body.has-custom-cursor a,
    body.has-custom-cursor button,
    body.has-custom-cursor input,
    body.has-custom-cursor textarea,
    body.has-custom-cursor select,
    body.has-custom-cursor label,
    body.has-custom-cursor [role="button"] {
        cursor: none !important;
    }
}

@media (prefers-reduced-motion: reduce), (pointer: coarse) {
    .cursor-follower {
        display: none !important;
    }
}
