*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { outline: none; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: none; }

/* ── Design tokens ───────────────────────────────────────── */
:root {
    /* Page */
    --bg:    #f4efe6;
    --ink:   #1c1814;
    --rust:  #df6036;

    /* Overlay & panel surfaces */
    --surface:      #1e1a16;
    --surface-mid:  #202020;
    --surface-deep: #181818;

    /* Browser chrome */
    --browser-outer:  #1a1a1a;
    --browser-topbar: #252525;
    --browser-urlbar: #333333;
    --browser-accent: #5b5bd6;

    /* Specialty backgrounds */
    --workspace-bg: #8bc7d0;
    --archive-bg:   #ff8271;

    /* Typography — swap --font-d for a display face if desired */
    --font-d: 'Inter', sans-serif;
    --font-b: 'Inter', sans-serif;
}

html { overflow-x: hidden; scroll-behavior: auto; background: var(--workspace-bg); overscroll-behavior: none; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-b);
    font-size: 15px;
    font-weight: 300;
    overflow-x: hidden;
    overscroll-behavior: none;
}

/* ── Page veil ───────────────────────────────────────────── */
#page-veil {
    position: fixed; inset: 0; z-index: 10000;
    background: var(--bg);
    transition: opacity 0.5s ease;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    #page-veil { transition: none; }
}

/* ── Cursor ──────────────────────────────────────────────── */
#cur, #cur-ring { display: none; }

/* Reset button appearance for .b-dot used as close button */
button.b-dot {
    appearance: none; -webkit-appearance: none;
    border: none; padding: 0; font: inherit;
}

/* ── Progress bar ────────────────────────────────────────── */
#scroll-bar {
    position: fixed; bottom: 0; left: 0;
    height: 2px; width: 100%;
    background: var(--ink); z-index: 300;
    transform: scaleX(0); transform-origin: left;
    transition: transform .05s linear;
}

/* ── Hero ────────────────────────────────────────────────── */
#hero {
    position: relative; width: 100%; height: 100vh; height: 100dvh;
    overflow: hidden; background: var(--bg);
}

/* Layer 1: SVG workspace */
#svg-container {
    position: absolute; inset: 0; z-index: 1;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#svg-container svg { width: 100%; height: 100%; display: block; }

.workspace-hint {
    position: absolute; bottom: 28px; left: 50%;
    transform: translateX(-50%);
    z-index: 2; opacity: 0;
    font-size: 11px; letter-spacing: .2em;
    text-transform: uppercase; white-space: nowrap;
    pointer-events: none;
}

/* Layer 2: Lottie */
#lottie-hero {
    position: absolute; inset: 0; z-index: 3;
    overflow: hidden;
}
#lottie-hero svg { width: 100% !important; height: 100% !important; display: block; }

/* Layer 3: Scroll cue */
.hero-foot {
    position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%);
    z-index: 4; padding: 0 0 36px;
}
.scroll-cue {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 13px; letter-spacing: .14em;
    text-transform: uppercase;
    white-space: nowrap;
    color: #fff;
}
.scroll-arrow {
    display: flex; align-items: center; justify-content: center;
    animation: arrow-bounce 1.8s ease-in-out infinite;
}
@keyframes arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(7px); }
}

/* ── Tooltip ─────────────────────────────────────────────── */
#tooltip {
    position: fixed; z-index: 9500;
    background: var(--ink); color: #fff;
    font-family: var(--font-b);
    font-size: 11px; letter-spacing: .08em;
    padding: 7px 13px; border-radius: 6px;
    pointer-events: none; opacity: 0;
    transform: translate(-50%, -140%);
    white-space: nowrap;
    transition: opacity .18s;
}
#tooltip.show { opacity: 1; }

/* ── Backdrop ────────────────────────────────────────────── */
#backdrop {
    position: fixed; inset: 0;
    background: rgba(28,24,20,.52);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 300; opacity: 0; pointer-events: none;
}

/* ── Overlays shared ─────────────────────────────────────── */
.overlay {
    position: fixed; z-index: 400;
    opacity: 0; pointer-events: none;
    top: 50%; left: 50%;
}
.panel {
    background: var(--surface);
    border-radius: 22px; padding: 44px;
    box-shadow: 0 32px 100px rgba(0,0,0,.45), 0 0 0 1px rgba(244,239,230,.08);
    position: relative;
    max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
    color: var(--bg);
}
.panel { scrollbar-width: thin; scrollbar-color: rgba(244,239,230,.18) transparent; }
.panel::-webkit-scrollbar       { width: 4px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: rgba(244,239,230,.18); border-radius: 2px; }

.close-btn {
    position: absolute; top: 18px; right: 18px;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(244,239,230,.08); border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; line-height: 1; color: rgba(244,239,230,.6);
    cursor: pointer; transition: background .2s, color .2s;
}
.close-btn:hover { background: rgba(244,239,230,.18); color: var(--bg); }

.p-tag {
    font-size: 11px; letter-spacing: .22em;
    text-transform: uppercase; color: var(--rust); margin-bottom: 10px;
}
.p-title {
    font-family: var(--font-d);
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 300; line-height: 1.1; margin-bottom: 20px;
}
.p-title em { font-style: italic; color: var(--rust); }
.p-body { font-size: 15px; line-height: 1.9; color: rgba(244,239,230,.72); }
.p-body + .p-body { margin-top: 14px; }

/* ── Browser chrome ──────────────────────────────────────── */
#ov-computer { width: min(1480px, 96vw); }
.browser {
    background: var(--browser-outer); border-radius: 22px;
    overflow: hidden; box-shadow: 0 32px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(244,239,230,.08);
    display: flex; flex-direction: column;
    height: min(92vh, 960px);
    position: relative;
}
.browser-bar {
    background: var(--browser-topbar); padding: 10px 16px; flex-shrink: 0;
    display: flex; align-items: center; gap: 8px;
}
.b-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.b-dot:nth-child(1) { background: #ff5f57; transition: filter .18s; }
.b-dot:nth-child(1):hover { filter: brightness(1.3); }
.b-dot:nth-child(2) { background: #febc2e; }
.b-dot:nth-child(3) { background: #28c840; }
.b-url {
    flex: 1; background: var(--browser-urlbar); border-radius: 6px;
    padding: 4px 12px; margin: 0 10px;
    font-size: 12px; font-family: var(--font-b);
    color: rgba(255,255,255,.55); letter-spacing: .02em;
}

.browser-tabs {
    background: var(--surface-mid); padding: 8px 16px; flex-shrink: 0;
    display: flex; gap: 6px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.b-tab {
    padding: 5px 16px; border-radius: 100px;
    font-size: 13px; font-family: var(--font-b);
    cursor: pointer; border: none;
    background: rgba(255,255,255,.06);
    color: rgba(255,255,255,.55);
    transition: background .2s, color .2s;
}
.b-tab.active { background: var(--browser-accent); color: #fff; }
.b-tab:hover:not(.active) { background: rgba(255,255,255,.1); color: rgba(255,255,255,.8); }

.browser-body {
    flex: 1; display: flex; min-height: 0;
    background: var(--surface-deep); overflow: hidden;
}
.b-sidebar {
    width: clamp(200px, 24%, 280px); flex-shrink: 0;
    background: var(--surface-mid);
    border-right: 1px solid rgba(255,255,255,.06);
    padding: 14px 0;
    overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
    transition: width .26s ease, opacity .2s ease, padding .26s ease;
}
.b-sidebar.closed { width: 0; opacity: 0; padding: 0; overflow: hidden; }
.b-sidebar .b-section-group:last-child {
    position: sticky; bottom: 0;
    background: var(--surface-mid);
    border-top: 1px solid rgba(255,255,255,.06);
    padding-top: 12px; margin-top: 8px;
}
.b-sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin-bottom: 8px;
}
.b-back {
    font-size: 13px; color: rgba(255,255,255,.55); white-space: nowrap;
    background: none; border: none; cursor: pointer;
    font-family: var(--font-b); padding: 0;
    transition: color .18s;
}
.b-back:hover { color: rgba(255,255,255,.85); }
.b-toggle-btn {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.52);
    display: flex; align-items: center; justify-content: center;
    padding: 5px; border-radius: 6px;
    transition: background .18s, color .18s;
}
.b-toggle-btn:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.b-section-group { padding: 10px 10px 4px; }
.b-group-label {
    font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: rgba(255,255,255,.52); padding: 0 4px;
    margin-bottom: 4px; white-space: nowrap;
}
.b-proj, .b-sec {
    display: block; width: 100%; text-align: left;
    border: none; background: none;
    font-family: var(--font-b); font-size: 13px;
    color: rgba(255,255,255,.48);
    padding: 7px 10px; border-radius: 8px;
    cursor: pointer; white-space: nowrap;
    transition: background .16s, color .16s;
}
.b-proj:hover, .b-sec:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); }
.b-proj.active { background: var(--browser-accent); color: #fff; }
.b-sec.active  { background: rgba(255,255,255,.1); color: #fff; }
.b-main {
    flex: 1; background: var(--surface-deep);
    position: relative; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain;
}
.b-sticky-toggle {
    position: sticky; top: 0; height: 0; z-index: 2; overflow: visible;
}
.b-toggle-closed {
    display: none; position: absolute; top: 12px; left: 12px;
}
.b-toggle-btn.b-toggle-closed {
    background: var(--surface-mid);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px; padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.b-toggle-btn.b-toggle-closed:hover { background: rgba(255,255,255,.12); }

/* ── Case study content ──────────────────────────────────── */
.b-content {
    padding: clamp(16px, 3vw, 36px) clamp(8px, 1.5vw, 20px);
    max-width: 1100px; margin-inline: auto;
}
.bc-tag {
    font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
    color: var(--bc-color, var(--browser-accent));
    color: color-mix(in srgb, var(--bc-color, var(--browser-accent)) 60%, white 40%);
    margin-bottom: 10px;
}
.bc-title {
    font-family: var(--font-d); font-size: clamp(32px, 3.5vw, 52px);
    font-weight: 300; line-height: 1.05; color: var(--bg); margin-bottom: 10px;
}
.bc-subtitle {
    font-size: 15px; line-height: 1.85; color: rgba(244,239,230,.62);
    margin-bottom: 20px;
}
.bc-meta-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px; background: rgba(255,255,255,.06);
    border-radius: 14px; overflow: hidden; margin-bottom: 20px;
}
.bc-meta-item { background: var(--surface); padding: 12px 16px; }
.bc-meta-label {
    font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: rgba(255,255,255,.48); margin-bottom: 3px;
}
.bc-meta-value { font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.82); }
.bc-divider { height: 1px; background: rgba(255,255,255,.06); margin: 0 0 20px; }
.bc-section-heading {
    font-family: var(--font-d); font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 300; font-style: italic; color: var(--bg); margin-bottom: 16px;
}
.bc-body {
    font-size: 15px; line-height: 1.9; color: rgba(244,239,230,.62);
    margin-bottom: 28px;
}
.bc-rendered p {
    font-size: 15px; line-height: 1.9; color: rgba(244,239,230,.62);
    margin-bottom: 20px;
}
.bc-rendered ul {
    list-style: none; padding: 0; margin: 0 0 28px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
}
.bc-rendered li {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
    border-radius: 0 0 14px 14px; padding: 18px 20px;
}
.bc-rendered li strong { display: block; font-size: 13px; color: rgba(255,255,255,.88); margin-bottom: 5px; font-weight: 500; }
.bc-rendered li p, .bc-rendered li { font-size: 13px; line-height: 1.7; color: rgba(255,255,255,.55); }
.bc-rendered table { width: 100%; border-collapse: separate; border-spacing: 12px 0; margin: 4px -12px 28px; }
.bc-rendered th, .bc-rendered td { padding: 20px 16px; text-align: center; }
.bc-rendered thead th {
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px 14px 0 0;
    font-family: var(--font-d); font-size: clamp(26px, 2.8vw, 38px);
    font-weight: 300; color: var(--bc-color, rgba(255,255,255,.8));
    color: color-mix(in srgb, var(--bc-color, rgba(255,255,255,.8)) 55%, white 45%);
}
.bc-rendered tbody td {
    background: rgba(255,255,255,.025); border: 1px solid rgba(255,255,255,.07);
    border-top: none; border-radius: 0 0 14px 14px;
    font-size: 12px; line-height: 1.7; color: rgba(255,255,255,.55);
    letter-spacing: .06em; text-wrap: balance;
}
.bc-rendered hr { display: none; }
.bc-section { scroll-margin-top: 20px; }
.bc-section + .bc-section { margin-top: 8px; }

/* ── Work grid ───────────────────────────────────────────── */
.bc-work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px; margin-top: 32px;
}
.bc-proj-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px; overflow: hidden;
    cursor: pointer;
    transition: border-color .22s, transform .22s, background .22s;
    display: flex; flex-direction: column;
}
.bc-proj-card:hover {
    border-color: var(--bc-color, rgba(255,255,255,.3));
    background: rgba(255,255,255,.06);
    transform: translateY(-4px);
}
.bc-proj-card-img {
    width: 100%; height: 160px;
    background-size: cover; background-position: center;
    flex-shrink: 0;
}
.bc-proj-card-body { padding: 24px 26px 26px; flex: 1; display: flex; flex-direction: column; }
.bc-proj-card-type {
    font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: rgba(255,255,255,.48); margin-bottom: 10px;
}
.bc-proj-card-title {
    font-family: var(--font-d); font-size: clamp(22px, 2.2vw, 32px);
    font-weight: 300; color: #fff; flex: 1; margin-bottom: 20px;
}
.bc-proj-card-foot {
    display: flex; align-items: center; justify-content: space-between;
}
.bc-proj-card-year { font-size: 12px; color: rgba(255,255,255,.48); letter-spacing: .1em; }
.bc-proj-card-arrow {
    font-size: 18px; color: rgba(255,255,255,.25);
    transition: color .2s, transform .2s;
}
.bc-proj-card:hover .bc-proj-card-arrow {
    color: var(--bc-color, rgba(255,255,255,.6)); transform: translateX(5px);
}

/* ── Coming soon tab ─────────────────────────────────────── */
.bc-coming-soon {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100%; padding: 80px 40px; text-align: center;
}
.bc-coming-soon-eyebrow {
    font-family: var(--font-b); font-size: 11px;
    letter-spacing: .22em; text-transform: uppercase;
    color: var(--rust); margin-bottom: 28px;
}
.bc-coming-soon-title {
    font-family: var(--font-d);
    font-size: clamp(72px, 14vw, 128px);
    font-weight: 300; color: #fff;
    line-height: .9; letter-spacing: -.02em;
    margin-bottom: 32px;
}
.bc-coming-soon-body {
    font-family: var(--font-b); font-size: 13px;
    color: rgba(255,255,255,.35); max-width: 260px; line-height: 1.7;
}

/* ── Photo gallery (horizontal scroll + filmstrip) ───────── */
.b-main.gallery-active { overflow: hidden; }
.b-main.gallery-active #b-content {
    height: 100%; padding: 0; max-width: none;
    display: flex; flex-direction: column;
}
/* ── Flipbook embed ───────────────────────────────────────────────────────── */
.bc-flipbook-embed {
    width: 100%; background: #1a1208;
    border-radius: 10px; overflow: hidden;
    margin-bottom: 28px;
}
.bc-flipbook-stage {
    width: 100%; min-height: 300px;
    display: flex; align-items: center; justify-content: center;
}
.bc-gallery-wrap {
    display: flex; flex-direction: column;
    height: 100%; overflow: hidden;
}
.bc-gallery-header {
    padding: 20px 28px 10px; flex-shrink: 0;
}
.bc-gallery-main {
    flex: 1; min-height: 0;
    position: relative; /* anchors arrow buttons */
}
.bc-gallery-scroll {
    width: 100%; height: 100%;
    overflow: hidden;
    position: relative;
    display: flex; align-items: stretch;
}
.bc-gallery-photo {
    display: none;
    width: 100%; flex-shrink: 0;
    align-items: center; justify-content: center;
    padding: 12px 56px; box-sizing: border-box;
}
.bc-gallery-photo.active {
    display: flex;
    animation: gallery-fade .25s ease;
}
@keyframes gallery-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.bc-gallery-photo img {
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}
.bc-gallery-counter {
    position: absolute; bottom: 10px; left: 50%;
    transform: translateX(-50%);
    font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
    color: rgba(255,255,255,.45);
    pointer-events: none; z-index: 2;
    white-space: nowrap;
}
.bc-gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%; z-index: 2;
    background: rgba(20,18,16,.72);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.82); font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s, color .18s, opacity .2s;
}
.bc-gallery-arrow:hover { background: rgba(255,255,255,.15); color: #fff; }
.bc-gallery-arrow-l { left: 10px; }
.bc-gallery-arrow-r { right: 10px; }
.bc-gallery-strip {
    height: 82px; flex-shrink: 0;
    background: rgba(0,0,0,.45);
    border-top: 1px solid rgba(255,255,255,.06);
    overflow-x: auto; overflow-y: hidden;
    display: flex; align-items: center;
    gap: 4px; padding: 7px 12px;
    scrollbar-width: none;
}
.bc-gallery-strip::-webkit-scrollbar { display: none; }
.bc-thumb {
    width: 64px; height: 64px; flex-shrink: 0;
    border-radius: 5px; overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer; padding: 0;
    background: rgba(255,255,255,.05);
    transition: border-color .18s;
}
.bc-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    opacity: .45; transition: opacity .18s;
}
.bc-thumb.active { border-color: rgba(255,255,255,.7); }
.bc-thumb.active img,
.bc-thumb:hover img { opacity: 1; }

/* ── Photo lightbox (inside .browser) ───────────────────── */
.bc-photo-lb {
    position: absolute; inset: 0; z-index: 60;
    background: rgba(0,0,0,.9);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity .22s;
}
.bc-photo-lb.open { opacity: 1; pointer-events: all; }
.bc-photo-lb-img {
    max-width: 82%; max-height: 82%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    display: block;
}
.bc-photo-lb-close {
    position: absolute; top: 18px; right: 18px;
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,.12); border: none;
    color: rgba(255,255,255,.75); font-size: 14px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s, color .18s;
}
.bc-photo-lb-close:hover { background: rgba(255,255,255,.22); color: #fff; }
.bc-photo-lb-prev,
.bc-photo-lb-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,.1); border: none;
    color: rgba(255,255,255,.75); font-size: 18px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .18s, color .18s;
}
.bc-photo-lb-prev { left: 18px; }
.bc-photo-lb-next { right: 18px; }
.bc-photo-lb-prev:hover,
.bc-photo-lb-next:hover { background: rgba(255,255,255,.2); color: #fff; }

/* ── Modal widths ────────────────────────────────────────── */
#ov-headphones { width: min(520px, 93vw); }
#ov-calendar   { width: min(680px, 93vw); }

/* ── Browser slim (music + calendar) ────────────────────── */
.browser-slim { height: min(88vh, 780px); }
.browser-body-embed {
    flex: 1; min-height: 0;
    display: flex; flex-direction: column;
    align-items: center;
}
.browser-body-embed .p-tag,
.browser-body-embed .p-title { flex-shrink: 0; width: 100%; text-align: left; }
.browser-body-embed .p-title { color: #f4efe6; }
.browser-body-music    { padding: 20px 16px 16px; }
.browser-body-calendar { padding: 20px 24px 0; }
.browser-body-embed .calendly-embed,
.browser-body-embed iframe { flex: 1; min-height: 0; width: 100%; display: block; }

.spotify-embed  { border-radius: 10px; }
.calendly-embed { min-width: 280px; display: flex; flex-direction: column; }

/* ── About ───────────────────────────────────────────────── */
.p-contact { margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.p-email   { color: var(--rust); text-decoration: none; }
.about-chip { display: inline-flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.chip {
    background: rgba(244,239,230,.07); border-radius: 100px;
    padding: 6px 14px; font-size: 13px;
    color: rgba(244,239,230,.75); border: 1px solid rgba(244,239,230,.12);
}
.social-icon {
    display: inline-flex; align-items: center; justify-content: center;
    color: rgba(244,239,230,.65); transition: color .2s; text-decoration: none;
}
.social-icon:hover { color: var(--bg); }

/* ── Education ───────────────────────────────────────────── */
.edu-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.edu-item {
    display: flex; gap: 20px; align-items: center;
    background: rgba(0,0,0,.12); border-radius: 14px; padding: 18px 20px;
}
.edu-year   { font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
              color: var(--rust); min-width: 36px; padding-top: 3px; }
.edu-degree { font-size: 15px; font-weight: 400; color: rgba(244,239,230,.92); margin-bottom: 4px; }
.edu-detail { font-size: 13px; color: rgba(244,239,230,.55); margin-bottom: 4px; }
.edu-school { font-size: 13px; font-style: italic; color: rgba(244,239,230,.55); }

/* ── Hobbies ─────────────────────────────────────────────── */
.hobby-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.h-tag {
    background: rgba(244,239,230,.07); border: 1px solid rgba(244,239,230,.12);
    border-radius: 100px; padding: 7px 15px;
    font-size: 13px; color: rgba(244,239,230,.78);
}

/* ── Archive folder ──────────────────────────────────────── */
#ov-archivefolder { width: 100vw; height: 100vh; overflow: hidden; }

.archive-scene {
    position: relative; width: 100%; height: 100%; overflow: hidden;
    background: var(--archive-bg);
}
.archive-bg {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    pointer-events: none; -webkit-user-select: none; user-select: none; z-index: 5;
}
.archive-back {
    position: absolute; top: 28px; left: 28px; z-index: 20;
    display: flex; align-items: center; gap: 8px;
    background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.18); border-radius: 100px;
    padding: 10px 20px; color: rgba(255,255,255,.92);
    font-family: var(--font-b); font-size: 13px; letter-spacing: .06em;
    cursor: pointer; transition: background .2s, color .2s;
}
.archive-back:hover { background: rgba(0,0,0,.58); color: #fff; }

#archive-cards { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.archive-card {
    position: absolute; pointer-events: all;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 16px 56px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.07);
    -webkit-user-select: none; user-select: none; will-change: transform; cursor: pointer;
    transition: box-shadow .2s; z-index: 1;
}
.archive-card:hover {
    box-shadow: 0 24px 72px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.14);
}
.archive-card-img {
    width: 100%; background-size: cover; background-position: center;
}
.archive-card-foot {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 12px 12px 10px;
    background: linear-gradient(to top, rgba(0,0,0,.78) 0%, rgba(0,0,0,.32) 60%, transparent 100%);
}
.archive-card-genre {
    font-size: 9px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--card-accent, var(--rust)); margin-bottom: 2px;
}
.archive-card-title {
    font-family: var(--font-d); font-size: 12px;
    font-weight: 300; color: #fff; line-height: 1.2;
}
.archive-card-year { font-size: 9px; color: rgba(255,255,255,.65); margin-top: 2px; }

.archive-lb {
    position: absolute; inset: 0; z-index: 50;
    background: rgba(0,0,0,.86); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .28s;
}
.archive-lb.open { opacity: 1; pointer-events: all; }
.archive-lb-close {
    position: absolute; top: 28px; right: 28px;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.1); border: none;
    color: rgba(255,255,255,.65); font-size: 15px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.archive-lb-close:hover { background: rgba(255,255,255,.22); color: #fff; }
.archive-lb-card {
    border-radius: 18px; overflow: hidden; position: relative;
    max-height: 85vh; box-shadow: 0 48px 120px rgba(0,0,0,.7);
}
.archive-lb-img { width: 100%; height: 100%; background-size: cover; background-position: center; }
.archive-lb-info {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 44px;
    background: linear-gradient(to top, rgba(0,0,0,.82) 0%, transparent 100%);
    opacity: 0; transition: opacity .25s;
}
.archive-lb-card:hover .archive-lb-info { opacity: 1; }
.archive-lb-genre {
    font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--lb-accent, var(--rust)); margin-bottom: 10px;
}
.archive-lb-title {
    font-family: var(--font-d); font-size: clamp(28px, 3.5vw, 46px);
    font-weight: 300; color: #fff; line-height: 1.05; margin-bottom: 5px;
}
.archive-lb-year { font-size: 13px; color: rgba(255,255,255,.62); }

/* ── Case study images ───────────────────────────────────── */
.bc-img-hero {
    width: 100%; aspect-ratio: 16/7;
    background: linear-gradient(135deg, var(--bc-color, var(--browser-accent)) 0%, transparent 100%);
    border-radius: 14px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    background-size: cover; background-position: center;
}
.bc-img-hero-inner {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    color: rgba(255,255,255,.18);
}
.bc-img-hero-inner svg { width: 44px; height: 44px; }
.bc-img-hero-inner span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }

.bc-img-ph {
    width: 100%; aspect-ratio: 16/9;
    background: rgba(255,255,255,.03);
    border: 1px dashed rgba(255,255,255,.1);
    border-radius: 14px; margin-bottom: 28px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
}
.bc-img-ph svg { width: 36px; height: 36px; color: rgba(255,255,255,.14); }
.bc-img-ph-label {
    font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    color: rgba(255,255,255,.35);
}
.bc-img-real {
    width: 100%; border-radius: 14px; margin-bottom: 28px;
    display: block; object-fit: cover;
}
/* consecutive images in a section flow into a 2-col grid */
.bc-rendered p:has(> .bc-img-real) + p:has(> .bc-img-real),
.bc-rendered p:has(> .bc-img-real) {
    margin-bottom: 0;
}
.bc-rendered p:has(> .bc-img-real) .bc-img-real { margin-bottom: 0; }
.bc-img-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 28px;
    align-items: start;
}
.bc-img-grid .bc-img-real {
    width: 100%; height: auto;
    margin-bottom: 0; border-radius: 10px;
}
.bc-img-grid .bc-img-real:first-child {
    grid-column: 1 / -1;
}

/* ── Mobile wall ─────────────────────────────────────────── */

/* ── Pegboard popups ─────────────────────────────────────── */
.peg-frame {
    width: min(1100px, 90vw, calc(84vh * (1400 / 972)));
    aspect-ratio: 1400 / 972;
    position: relative;
    background: url('images/Popup_Design.svg') center / 100% 100% no-repeat;
    border-radius: 22px;
}
.peg-content {
    position: absolute;
    left: 23.97%; top: 11.31%;
    right: 26.70%; bottom: 11.08%;
    overflow: hidden;
    padding: 20px 24px;
    color: #2a1e14;
}

.peg-close { position: absolute; top: 8px; right: 8px; z-index: 10;
             background: rgba(0,0,0,.35); color: rgba(255,255,255,.85); }
.peg-close:hover { background: rgba(0,0,0,.55); color: #fff; }

.peg-content .p-tag   { color: #9a4a1a; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 8px; }
.peg-content .p-title { font-family: var(--font-d); font-size: clamp(20px, 3vw, 36px); font-weight: 300; line-height: 1.15; color: #2a1e14; margin-bottom: 14px; }
.peg-content .p-title em { font-style: italic; color: #c0521a; }
.peg-content .p-body  { font-size: clamp(12px, 1.05vw, 14px); line-height: 1.7; color: #4a3525; margin-bottom: 10px; }
.peg-content .p-email { color: #9a4a1a; text-decoration: none; }
.peg-content .p-contact { color: #4a3525; margin-top: 14px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.peg-content .social-icon { color: rgba(58,42,26,.55); }
.peg-content .social-icon:hover { color: #2a1e14; }
.peg-content .chip { background: rgba(58,42,26,.08); color: #4a3525; border-color: rgba(58,42,26,.2); }
.peg-content .h-tag  { background: rgba(58,42,26,.08); color: #4a3525; border-color: rgba(58,42,26,.2); }

.peg-centered { text-align: center; }
.peg-centered .cat-facts { text-align: left; }
.peg-content .cat-name { font-family: var(--font-d); font-size: clamp(28px, 4vw, 48px); font-weight: 300; font-style: italic; color: #2a1e14; margin-bottom: 6px; }
.peg-content .cat-sub  { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #9a4a1a; margin-bottom: 26px; }
.peg-content .cat-fact { font-size: clamp(13px, 1.2vw, 14px); line-height: 1.75; color: #4a3525; margin-bottom: 0; }
.peg-content .edu-year   { color: #9a4a1a; }
.peg-content .edu-degree { color: #2a1e14; }
.peg-content .edu-detail { color: #6b4e35; }
.peg-content .edu-school { color: #6b4e35; }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Hero and all scene layers: full teal on mobile */
    #hero,
    #lottie-hero,
    #svg-container { background: var(--workspace-bg); }

    /* Scale Lottie up so the landscape scene fills most of the portrait screen */
    #lottie-hero svg {
        transform: scale(1.6);
        transform-origin: center center;
    }

    /* Workspace hint: ensure it's readable over the teal bar */
    .workspace-hint { color: #1a3d42; }

    /* ── Fullscreen overlays ── */
    .overlay {
        width: 100vw; width: 100dvw;
        height: 100vh; height: 100dvh;
        border-radius: 0;
    }

    /* Peg-frame: flex column — SVG strips at top/bottom, paper fills middle */
    .peg-frame {
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
        border-radius: 0;
        background: #9f5200; /* pegboard brown fills side margins */
        background-image: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Top strip: extends past paper edge so pins visually overlap the paper */
    .peg-frame::before {
        content: '';
        width: 100%;
        aspect-ratio: 690 / 75; /* 75 > 71.72 (pin bottom in SVG) — full pin visible */
        background: url('images/Mobile_Pegboard-Popup.svg') top center / 100% auto no-repeat;
        flex-shrink: 0;
        z-index: 1; /* paints on top of .peg-content so pins show over the paper */
    }

    /* Paper area: negative top margin pulls it up under the extended strip */
    .peg-content {
        position: relative;
        left: auto; top: auto; right: auto; bottom: auto;
        flex: 1;
        min-height: 0;
        background: #efddae;
        margin: -2.12vw 2.81% 0 3.67%; /* -2.12vw ≈ -(75-60.39)/690 × 100vw */
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding: 24px 18px 14px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    }

    /* Bottom strip: lower pegboard edge */
    .peg-frame::after {
        content: '';
        width: 100%;
        aspect-ratio: 690 / 55.79;
        background: url('images/Mobile_Pegboard-Popup.svg') bottom center / 100% auto no-repeat;
        flex-shrink: 0;
    }

    /* Close button: floats in the top-right pegboard strip */
    .peg-close {
        position: absolute;
        top: calc(2px + env(safe-area-inset-top, 0px));
        right: 10px;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        font-size: 15px;
        background: rgba(0,0,0,.4);
        color: rgba(255,255,255,.9);
        z-index: 1;
    }
    .peg-close:hover { background: rgba(0,0,0,.55); }

    /* Browser overlays (calendar, portfolio) also go fullscreen */
    #ov-computer,
    #ov-calendar { width: 100vw; width: 100dvw; }
    .browser,
    .browser-slim {
        border-radius: 0;
        height: 100vh; height: 100dvh;
    }

    /* Headphones / Spotify: give the panel room */
    .panel { max-height: 100vh; max-height: 100dvh; border-radius: 0; padding: 72px 24px 32px; }

    /* Scroll cue: smaller on mobile */
    .hero-foot { padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }

    /* Teal everywhere on mobile — no cream/white showing through overscroll or gaps */
    html, body { background: var(--workspace-bg); }
}
