* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background-color: #fff;
    --text-color: #000;
    --accent: #F2511A;
}

body {
    font-family: 'dm-sans', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.3s, color 0.3s;
}

.main-content {
    padding: 0 40px;
    padding-top: 14%;
}

/* ── Dark mode ── */
.dark-mode { --background-color: #121212; --text-color: #fff; }
.dark-mode nav { background-color: var(--background-color) !important; }
.dark-mode nav a { color: var(--text-color) !important; }
.dark-mode nav a:hover { color: #121212 !important; }
.dark-mode nav a::before { background: #fff !important; }
.dark-mode hr { border-color: rgba(255,255,255,0.2) !important; }
.dark-mode .code-block { background-color: #1e1e1e; color: #d4d4d4; border-color: #333; }
.dark-mode .stat-box { border-color: rgba(255,255,255,0.1); }
.dark-mode .stat-callout { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.03); }
.dark-mode .section-divider { border-color: rgba(255,255,255,0.15); }
.dark-mode .section-divider span { background: #121212; color: rgba(255,255,255,0.4); }
.dark-mode .fullscreen-image-container { background-color: rgba(0,0,0,0.95); }
.dark-mode .comparison-row { border-color: rgba(255,255,255,0.1); }
.dark-mode .img-caption { color: var(--text-color); }
.dark-mode .comparison-label { color: var(--text-color); }
.dark-mode .stat-box p { color: var(--text-color); }
.dark-mode .stat-desc { color: var(--text-color); }
.dark-mode .quote-attribution { color: var(--text-color); }

/* ── Custom cursor ── */
html { cursor: none; }
a, button, [role="button"], input, label, select, textarea { cursor: none; }
.cursor {
    width: 12px; height: 12px;
    background: #040202;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    left: -20px; top: -20px;
    transform: translate(-50%, -50%);
    transition: width 0.18s ease, height 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}
.cursor.large { width: 20px; height: 20px; background: #F2511A; }
.cursor.hidden { opacity: 0; }

/* ── Nav ── */
nav {
    color: #000;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff;
    overflow: hidden;
}
nav a {
    float: left;
    display: block;
    width: 10%;
    font-family: "dm-sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #040202;
    text-decoration: none;
    text-align: center;
    padding: 14px 40px;
    position: relative;
    transition: color 0.25s ease;
    cursor: none;
}
nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #040202;
    border-radius: 20px;
    transform: scale(0.6);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: -1;
}
nav a:hover::before { transform: scale(0.6); opacity: 1; }
nav a:hover { color: #ffffff; }
.dark-mode nav { background-color: #121212 !important; }
.dark-mode nav a { color: #fff !important; }
.dark-mode nav a:hover { color: #121212 !important; }
.dark-mode nav a::before { background: #fff !important; }
.dark-mode-toggle {
    float: right;
    padding: 14px 40px;
    background: none;
    border: none;
    cursor: none;
    color: inherit;
    font-size: 16px;
}

/* ── Type ── */
p { max-width: 100%; font-size: 1rem; line-height: 1.5; margin-bottom: 20px; }
ul { font-size: 16px; line-height: 1.5; margin-bottom: 20px; padding-left: 20px; }
hr { margin-top: 10px; margin-bottom: 15px; border: none; border-top: 1px solid #000; }

/* ── Layout grids ── */
.container { max-width: 100%; margin: 0 auto; }
.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    margin-bottom: 80px;
}
.title-section { grid-column: 1 / 3; }
.subtitle-section { grid-column: 3 / 6; }
.title { font-size: 6rem; line-height: 1; font-weight: 400; margin-bottom: 20px; }
.subtitle { font-size: 3rem; line-height: 1.3; font-weight: 400; }

.details {
    grid-column: 1 / 2;
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 700;
    padding-right: 20px;
}
.details div { margin-bottom: 12px; }
.details p { font-weight: 400; }

.project-info { grid-column: 3 / 6; font-size: 1rem; line-height: 1.6; }
.project-info p { margin-bottom: 20px; }

/* ── Hero image / video ── */
.img-section {
    width: 100%;
    max-width: 100%;
    margin: 40px auto;
    overflow: hidden;
    text-align: center;
}
.hero-image {
    width: 90%;
    margin: 0 auto;
    display: block;
}
.hero-image video,
.hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* ── Figma / FigJam embeds ── */
.figjam-embed {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
    border-radius: 4px;
}

/* ── Content sections ── */
.content-section {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    margin: 40px 0;
    padding-top: 1.75rem;
}
.content-section img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 20px 0;
    border-radius: 4px;
}
.content-title {
    grid-column: 1 / 2;
    font-size: 1rem;
    font-weight: 400;
    /* NO grey — matches --text-color */
    color: var(--text-color);
}
.content-details { grid-column: 3 / 6; }
.content-details .big-text {
    font-size: 2.25rem;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 300;
}

/* ── Stat callouts ── */
.stat-callout-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 32px 0;
}
.stat-callout {
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 4px;
    padding: 24px 20px;
}
.stat-num {
    font-size: 3rem;
    font-weight: 200;
    line-height: 1;
    margin-bottom: 10px;
}
/* stat-desc: same as body text, no grey */
.stat-desc { font-size: 0.875rem; line-height: 1.5; }

/* ── Dual image row ── */
.dual-image-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}
.dual-img-wrap { display: flex; flex-direction: column; gap: 10px; }
.dual-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    cursor: pointer;
}
.screenshot-img { cursor: pointer; }

/* Image captions — dark, no grey */
.img-caption {
    font-size: 0.825rem;
    line-height: 1.4;
    /* same as body text */
    color: var(--text-color);
    opacity: 0.6;
}

/* ── Full-width quote rows (Research section) ── */
.quote-container-wide {
    width: 100%;
    margin: 40px 0 80px;
}
.quote-container-wide hr { border-top: 1px solid rgba(0,0,0,0.12); margin: 0; }
.dark-mode .quote-container-wide hr { border-top-color: rgba(255,255,255,0.15); }
.quote-row-wide {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 40px;
    padding: 28px 0;
}
.quote-row-wide .quote-number {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
    color: var(--text-color);
}
.quote-row-wide .quote-text {
    font-size: 1.1rem;
    line-height: 1.5;
    padding: 0;
}
.quote-row-wide .quote-attribution {
    font-style: italic;
    font-size: 0.85rem;
    opacity: 0.55;
    text-align: right;
    white-space: nowrap;
    padding: 0;
}

/* ── Quote container ── */
.quote-container { width: 100%; margin: 40px 0; }
.quote-container hr { border-top: 1px solid rgba(0,0,0,0.12); margin: 0; }
.quote-row {
    display: grid;
    grid-template-columns: 50px 4fr 1fr;
    gap: 20px;
}
.quote-number {
    padding: 20px 0;
    font-weight: 700;
    font-size: 0.8rem;
}
.quote-text { padding: 20px 0; font-size: 1rem; line-height: 1.5; }
/* quote-attribution: dark, slightly dimmed, no pure grey */
.quote-attribution {
    padding: 20px 0;
    text-align: right;
    font-style: italic;
    font-size: 0.85rem;
    opacity: 0.55;
}

/* ── Stats grid (flow steps) ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid rgba(0,0,0,0.1);
    margin-top: 40px;
}
.stat-box {
    padding: 40px 30px;
    border-right: 1px solid rgba(0,0,0,0.1);
    min-height: 380px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.stat-box:last-child { border-right: none; }
.large-number {
    font-size: 3.5rem;
    font-weight: 200;
    line-height: 1;
    opacity: 0.2;
}
.stat-title { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
/* stat-box p: same as body, no grey override */
.stat-box p { font-size: 0.9rem; line-height: 1.5; margin-bottom: 0; opacity: 0.75; }

/* ── Code block ── */
.code-block {
    background-color: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 20px 24px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre-wrap;
    color: #1a1a1a;
}

/* ── Section divider ── */
.section-divider {
    position: relative;
    text-align: center;
    margin: 80px 0 60px;
    border-top: 1px solid rgba(0,0,0,0.15);
}
.section-divider span {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--background-color);
    padding: 0 16px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.4;
}

/* ── Before/After comparison ── */
.comparison-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    margin: 60px 0;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.1);
}
.comparison-col { display: flex; flex-direction: column; gap: 12px; }
.comparison-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.comparison-col img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    cursor: pointer;
}
.comparison-arrow {
    font-size: 2rem;
    font-weight: 200;
    opacity: 0.3;
    text-align: center;
    white-space: nowrap;
}

/* ── Bottom wrap ── */
.bottomwrap {
    display: grid;
    grid-template-columns: 4fr 1fr;
    grid-template-areas:
        "empty"
        "bw";
    gap: 40px;
    margin: 40px 0 0px 0;
}
.bottomwrap a { color: var(--text-color); }
.bottomwrap a:hover { color: #F2511A; }
.bw { text-align: right; }
.bw a {
 
   
    color: var(--text-color);
    letter-spacing: 0.02em;
    display: inline-block;
    padding: 8px 0;
}
.bw a:hover { color: #F2511A; }

.content-details a {color: var(--text-color);}
.content-details a:hover {
    color: #F2511A;
}


/* ── Fullscreen viewer ── */
.fullscreen-image-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}
.fullscreen-viewer-image { max-width: 90%; max-height: 90%; object-fit: contain; }
.close-fullscreen-button {
    position: absolute;
    top: 20px; right: 20px;
    color: white;
    font-size: 20px;
    width: 40px; height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    border: 1.5px solid white;
    cursor: none;
}
.close-fullscreen-button:hover { background: rgba(255,255,255,0.1); }

/* ── Footer (exact from through.css) ── */
footer {
    background: #040202;
    color: #ffffff;
    padding: 60px 40px 0;
    position: relative;
    box-sizing: border-box;
}
.footer-content { max-width: 1440px; margin: 0 auto; }
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}
.footer-left { }
.footer-quote { font-size: 24px; font-weight: 300; line-height: 1.4; padding-bottom: 24px; }
.footer-byline { font-size: 16px; }
.footer-section h3 {
    font-size: 12px; font-weight: 300;
    letter-spacing: 0.5px; text-transform: uppercase;
    color: rgba(255,255,255,1); margin-bottom: 20px;
}
.footer-links { display: flex; flex-direction: column; gap: 16px; }
.footer-links a {
    font-size: 16px; color: rgba(255,255,255,0.6);
    text-decoration: none; cursor: none;
    transition: color 0.3s ease, opacity 0.3s;
}
.footer-links a:hover { color: #F2511A; opacity: 1; }
.experiments-section {
    padding: 40px 0 48px;
    border-top: 1px solid rgba(255,255,255,.25);
    background-image:
        linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
    background-size: 28px 28px;
}
.experiments-label {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    letter-spacing: .12em;
    color: #fff;
    display: inline-block;
    padding: 5px 12px;
    margin-bottom: 36px;
}
.bracket-comp {
    font-size: clamp(24px, 4.5vw, 60px);
    font-weight: 200;
    font-family: 'DM Sans', sans-serif;
    color: #fff;
    line-height: 1.05;
    letter-spacing: 0em;
    display: block;
    width: 100%;
}
.br { color: #fff; font-weight: 200; }
.name { color: rgba(255,255,255,.85); font-weight: 200; white-space: nowrap; }
.thumb {
    display: inline-block; vertical-align: middle;
    width: 1.3em; height: 0.82em;
    margin: 0 0.08em; overflow: hidden;
    position: relative; top: -0.04em;
    transition: transform .28s cubic-bezier(.2,0,.2,1), box-shadow .28s ease;
    cursor: none;
}
.thumb:hover { transform: scale(1.1) rotate(-2deg); box-shadow: 0 8px 28px rgba(0,0,0,.7); z-index: 5; }
.thumb div { width: 100%; height: 100%; }
.c1 { background: #EDB78E; }
.c2 { background-image: url('images/gravity-thumb.png'); background-size: cover; background-position: center; }
.c3 { background: #D1B045; }
.c4 { background: #F4EDDB; }
.exp-entry { text-decoration: none; color: inherit; display: inline; transition: opacity .18s; cursor: none; }
.exp-entry:hover { opacity: .6; }
.glyph {
    display: inline-block; font-size: 0.55em;
    color: rgba(255,255,255,.3); font-weight: 300;
    vertical-align: middle; margin: 0 0.15em;
    position: relative; top: -0.04em;
}
.footer-made { font-size: 12px; color: rgba(255,255,255,0.25); text-align: left; padding: 20px 0 32px; }

/* ── Process diagram ── */
.diagram-wrap {
    width: 90%;
    margin: 40px auto 80px;
    overflow-x: auto;
}
.process-diagram {
    width: 100%;
    height: auto;
    display: block;
}
.diag-label-top {
    font-family: 'dm-sans', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    fill: var(--text-color);
    opacity: 0.45;
}
.diag-box-visitor {
    fill: transparent;
    stroke: var(--text-color);
    stroke-width: 1;
    opacity: 0.18;
}
.diag-box-museum {
    fill: transparent;
    stroke: var(--text-color);
    stroke-width: 1;
    opacity: 0.18;
}
.diag-box-bridge {
    fill: var(--text-color);
    opacity: 0.06;
    stroke: var(--text-color);
    stroke-width: 1.5;
    opacity: 0.9;
}
/* override compound opacity for bridge fill vs stroke */
.process-diagram .diag-box-bridge {
    fill-opacity: 0.06;
    stroke-opacity: 0.9;
}
.diag-term {
    font-family: 'dm-sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    fill: var(--text-color);
}
.diag-sub {
    font-family: 'dm-sans', sans-serif;
    font-size: 10.5px;
    font-weight: 400;
    fill: var(--text-color);
    opacity: 0.5;
}
.diag-bridge-label {
    font-family: 'dm-sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    fill: var(--text-color);
}
.diag-bridge-sub {
    font-family: 'dm-sans', sans-serif;
    font-size: 11px;
    font-weight: 400;
    fill: var(--text-color);
    opacity: 0.65;
}


@media (max-width: 1200px) {
    .title { font-size: 4.5rem; }
    .subtitle { font-size: 2.25rem; }
}
@media (max-width: 992px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .content-section { grid-template-columns: repeat(3, 1fr); }
    .content-title { grid-column: 1 / 2; }
    .content-details { grid-column: 2 / 4; }
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-callout-row { grid-template-columns: 1fr 1fr; }
    .comparison-row { grid-template-columns: 1fr; }
    .comparison-arrow { transform: rotate(90deg); display: block; }
}
@media (max-width: 768px) {
    .main-content { padding: 20px; padding-top: 80px; }
    .grid { grid-template-columns: 1fr; gap: 20px; }
    .content-section { grid-template-columns: 1fr; gap: 20px; }
    .title-section, .subtitle-section, .details, .project-info,
    .content-title, .content-details { grid-column: 1 / -1; }
    .title { font-size: 3rem; }
    .subtitle { font-size: 1.5rem; }
    .content-details .big-text { font-size: 1.75rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .stat-box { border-right: none; border-bottom: 1px solid rgba(0,0,0,0.1); min-height: auto; }
    .stat-callout-row { grid-template-columns: 1fr; }
    .dual-image-row { grid-template-columns: 1fr; }
    .bottomwrap { grid-template-columns: 1fr; }
    .quote-row { grid-template-columns: 40px 1fr; }
    .quote-attribution { grid-column: 2; text-align: left; }
    .figjam-embed { height: 400px; }
    .hero-image { width: 100%; }
}
