/* 
  EDITORIAL DESIGN SYSTEM 
  Concept: Digital Magazine / Product Manifest
*/

:root {
    /* DEFAULT: LIGHT (Warm Precision) */
    --bg-paper: #F2F0ED;
    /* The distinct warm grey/beige of high-end paper */
    --bg-surface: #FFFFFF;

    --text-ink: #111111;
    /* Sharp Black */
    --text-charcoal: #333333;
    --text-muted: #737373;

    --accent-organic: #D96C4E;
    /* Burnt Orange */
    --accent-forest: #2D4D38;
    /* Deep Green */

    --line-hairline: rgba(0, 0, 0, 0.08);
    --line-focus: rgba(0, 0, 0, 1);

    /* Grid */
    --sidebar-width: 320px;
    --max-content-width: 1400px;
}

[data-theme="dark"] {
    /* DARK: Obsidian */
    --bg-paper: #0E0E0E;
    --bg-surface: #1C1C1C;

    --text-ink: #E0E0E0;
    /* Soft White */
    --text-charcoal: #A0A0A0;
    --text-muted: #666666;

    --line-hairline: rgba(255, 255, 255, 0.12);
    --line-focus: rgba(255, 255, 255, 0.9);

    --accent-organic: #E08D79;
    /* Muted Terracotta */
    --accent-forest: #4E8563;
}

/* RESET */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
    /* Prevent horizontal scroll from animations */
}

/* SCROLL ANIMATIONS */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
    /* Cinematic Blur Start */
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity, filter;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    /* Focus */
}

.display-heading span {
    display: block;
    /* For line-by-line reveal */
    animation: textRefine 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.display-heading span:nth-child(1) {
    animation-delay: 0.1s;
}

.display-heading span:nth-child(2) {
    animation-delay: 0.2s;
}

.display-heading span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes textRefine {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: var(--bg-paper);
    color: var(--text-ink);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    transition: background-color 0.3s ease;
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: 1px solid var(--line-hairline);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem 1rem;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
}

.theme-btn:hover {
    border-color: var(--text-ink);
    color: var(--text-ink);
    background: var(--bg-surface);
}

.theme-label {
    opacity: 0.6;
}

/* SYSTEM STATUS WIDGET (Sidebar) */
.system-status-widget {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid var(--line-hairline);
}

.status-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-label {
    color: var(--text-muted);
}

.status-value {
    color: var(--text-ink);
    font-weight: 500;
}

.blink-dot {
    color: var(--accent-organic);
    animation: blink 1.5s infinite;
    margin-right: 4px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.theme-btn-compact {
    background: transparent;
    border: 1px solid var(--line-hairline);
    color: var(--text-muted);
    padding: 0.2rem 0.5rem;
    font-family: inherit;
    font-size: 0.7rem;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 0.5rem;
    transition: all 0.2s;
}

.theme-btn-compact:hover {
    border-color: var(--text-ink);
    color: var(--text-ink);
}

/* TYPOGRAPHY SYSTEM */
h1,
h2,
h3,
h4 {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    /* Editorial weight */
    font-variation-settings: "SOFT" 50, "WONK" 0;
}

.display-heading {
    font-size: clamp(3rem, 5vw, 6rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text-ink);
}

.highlight-serif {
    font-style: italic;
    color: var(--accent-organic);
}

.mono-label,
.col-id,
.year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.method-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-organic);
    opacity: 0.9;
}

/* MAIN LAYOUT GRID */
.layout-grid {
    display: flex;
    min-height: 100vh;
    max-width: var(--max-content-width);
    margin: 0 auto;
}

/* SIDEBAR (Sticky) */
.identity-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line-hairline);
    flex-shrink: 0;
    background: var(--bg-paper);
    /* Sticky needs bg */
    z-index: 20;
}

.brand {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 600;
}

.editorial-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.editorial-nav.nav-wheel {
    --wheel-step: 52px;
    height: 212px;
    position: relative;
    overflow: hidden;
    display: block;
    gap: 0;
    perspective: 1000px;
    -webkit-mask-image: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.22) 10%,
            rgba(0, 0, 0, 1) 28%,
            rgba(0, 0, 0, 1) 72%,
            rgba(0, 0, 0, 0.22) 90%,
            transparent 100%);
    mask-image: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.22) 10%,
            rgba(0, 0, 0, 1) 28%,
            rgba(0, 0, 0, 1) 72%,
            rgba(0, 0, 0, 0.22) 90%,
            transparent 100%);
}

.editorial-nav.nav-wheel .nav-link {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform-origin: center center;
    will-change: transform, opacity;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.34s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        padding-left 0.2s ease;
}

.nav-link {
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.2s;
    border-left: 1px solid transparent;
    padding-left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-ink);
    padding-left: 10px;
    /* Slight nudge */
    border-left: 2px solid var(--accent-organic);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--accent-forest);
    font-weight: 500;
    margin-top: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--accent-forest);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* CONTENT STREAM */
.content-stream {
    flex-grow: 1;
    overflow: hidden;
    /* For float containment */
}

/* Hero Section */
.hero-statement {
    padding: 6.5rem 6rem;
    min-height: 78vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.manifesto-text {
    margin-top: 2.75rem;
    max-width: 600px;
    font-size: 1.25rem;
    color: var(--text-charcoal);
}

.manifesto-text p {
    margin-bottom: 1.5rem;
}

.manifesto-text a {
    color: var(--text-ink);
    text-decoration: underline;
    text-decoration-color: var(--accent-organic);
    text-underline-offset: 4px;
}

/* Ticker Divider */
.ticker-divider {
    border-top: 1px solid var(--line-hairline);
    border-bottom: 1px solid var(--line-hairline);
    padding: 1.5rem 6rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ticker-line {
    flex-grow: 1;
    height: 1px;
    background: var(--line-hairline);
}

.stat-group {
    display: flex;
    gap: 1rem;
}

.mono-val {
    color: var(--text-ink);
}

/* Section Blocks */
.section-block {
    padding: 8rem 6rem;
    border-bottom: 1px solid var(--line-hairline);
}

.block-header {
    display: flex;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 4rem;
}

.block-header h2 {
    font-size: 3rem;
    line-height: 1;
}

.h-line {
    flex-grow: 1;
    height: 1px;
    background: var(--line-hairline);
    margin-bottom: 10px;
}

/* Ship Log (Table) */
.ship-log-table {
    display: flex;
    flex-direction: column;
}

.log-row {
    display: grid;
    grid-template-columns: 0.8fr 1.5fr 1fr;
    padding: 2.5rem 0;
    border-top: 1px solid var(--line-hairline);
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    opacity: 0.8;
    /* Default cinema dim */
}

.log-row:hover {
    background: transparent;
    border-left: none;
    /* Reset old magnetic */
    padding-left: 0;

    transform: scale(1.01) translateX(10px);
    opacity: 1;
}

.ship-log-table:hover .log-row:not(:hover) {
    opacity: 0.4;
    /* Focus effect on others */
}

.col-date {
    color: var(--accent-organic);
}

.arrow-icon {
    display: inline-block;
    margin-left: 0.5rem;
    transition: transform 0.4s ease;
    opacity: 0;
}

.log-row:hover .arrow-icon {
    opacity: 1;
    transform: translateX(5px);
}

.col-role {
    font-size: 1rem;
    color: var(--text-charcoal);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.repo-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    opacity: 0.4;
    color: var(--text-ink);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    margin-left: auto;
    /* Push to right if needed */
    margin-right: 1.5rem;
    /* Space before arrow */
    padding-bottom: 2px;
    transition: all 0.2s;
}

.repo-link:hover {
    opacity: 1;
    border-color: var(--accent-organic);
    color: var(--accent-organic);
}

/* Case Study Feature */
.case-study-feature {
    display: block;
    border: 1px solid var(--line-hairline);
    background: var(--bg-surface);
    padding: 2.5rem;
    color: var(--text-ink);
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.case-study-feature:hover {
    transform: translateY(-3px);
    border-color: var(--accent-organic);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.case-study-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.case-study-tag {
    color: var(--accent-organic);
}

.case-study-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    margin-bottom: 0.75rem;
}

.case-study-subtitle {
    color: var(--text-charcoal);
    font-size: 1.1rem;
    max-width: 720px;
    margin-bottom: 2rem;
}

.case-study-meta-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-hairline);
    border-bottom: 1px solid var(--line-hairline);
    margin-bottom: 1.5rem;
}

.case-study-meta-item {
    padding: 1rem;
    border-right: 1px solid var(--line-hairline);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
}

.case-study-meta-item:last-child {
    border-right: none;
}

.case-study-meta-value {
    color: var(--text-ink);
    font-size: 0.95rem;
}

.case-study-highlights {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.case-study-highlights li {
    position: relative;
    padding-left: 1.25rem;
    color: var(--text-charcoal);
    line-height: 1.5;
}

.case-study-highlights li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-organic);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
}

.case-study-cta {
    color: var(--accent-organic);
}

/* Experience Timeline */
.experience-timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--line-hairline);
    transition: border-color 0.4s ease;
    align-items: flex-start;
}

.timeline-item:hover {
    border-left-color: var(--accent-organic);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
}

.timeline-company {
    font-size: 1.5rem;
    color: var(--text-ink);
    margin: 0;
}

.timeline-role {
    font-family: 'Inter', sans-serif;
    color: var(--text-charcoal);
    font-weight: 500;
}

.timeline-role::before {
    content: '—';
    margin-right: 1rem;
    color: var(--text-muted);
}

.timeline-date {
    margin-left: auto;
    color: var(--accent-organic);
}

.timeline-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--text-charcoal);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 800px;
}

.timeline-bullets li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.timeline-bullets li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
}

/* Philosophy Grid */
.method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.method-col h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.method-p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* Resume Split Layout */
.resume-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

/* Left: Small Preview */
.resume-col-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resume-preview-box {
    width: 100%;
    height: 400px;
    /* Small box size */
    background: var(--bg-surface);
    border: 1px solid var(--text-ink);
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.pdf-obj {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.download-btn-full {
    display: block;
    width: 100%;
    text-align: center;
    padding: 1rem;
    background: var(--text-ink);
    color: var(--bg-paper);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.download-btn-full:hover {
    opacity: 0.9;
}

/* Right: Bio */
.bio-heading {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-ink);
}

.bio-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-charcoal);
    margin-bottom: 1.5rem;
}

.bio-values {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.value-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--line-hairline);
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 8rem 6rem;
    background: var(--text-ink);
    color: var(--bg-paper);
}

.giant-mail-link {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: clamp(2rem, 5vw, 4.5rem);
    /* Reduced for longer email */
    color: var(--bg-paper);
    text-decoration: none;
    line-height: 1;
    margin-top: 2rem;
    transition: color 0.3s;
}

.giant-mail-link:hover {
    color: var(--accent-organic);
}

/* TOOLKIT BENTO GRID */
.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 1.5rem;
}

.toolkit-item {
    border: 1px solid var(--line-hairline);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Changed from space-between */
    gap: 1rem;
    /* Add consistent gap */
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--bg-surface);
}

.toolkit-item:hover {
    border-color: var(--text-ink);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

/* Span utility */
.col-span-2 {
    grid-column: span 2;
}

.toolkit-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent-organic);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.toolkit-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-ink);
    background: var(--bg-paper);
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}

.toolkit-item:hover .tech-mono {
    background: var(--text-ink);
    color: var(--bg-paper);
}

.footer-meta {
    margin-top: 6rem;
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    opacity: 0.6;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* Replaces margin-left on individual links */
}

.social-links a {
    color: inherit;
    text-decoration: none;
    display: flex;
    /* Centers the SVG */
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.social-links a:hover {
    color: var(--accent-organic);
    transform: translateY(-2px);
}

.social-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* PREVIEW WINDOW (Hidden by default, shown by JS) */
#project-preview-window {
    position: fixed;
    top: 20%;
    right: 5%;
    width: 300px;
    height: 400px;
    z-index: 50;
    pointer-events: none;
    mix-blend-mode: normal;
    /* Changed from multiply to normal for dark mode safety */
    transition: opacity 0.3s;
    opacity: 0;
}

#project-preview-window.active {
    opacity: 1;
}

.preview-inner {
    background: var(--bg-surface);
    padding: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--text-ink);
    transform: rotate(2deg);
}

.preview-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    display: block;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--text-ink);
    color: var(--text-ink);
    padding-bottom: 0.25rem;
}

.preview-box {
    width: 100%;
    height: 300px;
    background: #000;
    /* Placeholder */
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    #project-preview-window {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .layout-grid {
        flex-direction: column;
    }

    .identity-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid var(--line-hairline);
        padding: 1.5rem;
        gap: 1rem;
    }

    .role-meta {
        margin-left: auto;
        text-align: right;
    }

    .role-meta p {
        font-size: 0.9rem;
    }

    .status-indicator {
        justify-content: flex-end;
        margin-top: 0.4rem;
        font-size: 0.8rem;
    }

    .editorial-nav,
    .system-status-widget {
        display: none;
        /* Simplify for mobile header */
    }

    .identity-sidebar .editorial-nav.nav-wheel {
        display: none !important;
        height: 0;
        overflow: hidden;
    }

    .hero-statement,
    .section-block,
    .ticker-divider,
    footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-statement {
        min-height: auto;
        padding-top: 3.75rem;
        padding-bottom: 3.75rem;
    }

    .section-block {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .ticker-divider {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .ticker-line {
        order: 4;
        width: 100%;
    }

    .stat-group {
        gap: 0.5rem;
    }

    .block-header {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .block-header h2 {
        font-size: clamp(2rem, 7vw, 2.6rem);
    }

    .h-line {
        order: 3;
        width: 100%;
        margin-bottom: 0;
    }

    .log-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.5rem 0;
    }

    .col-role {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.55rem;
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    .repo-link {
        margin-left: 0;
        margin-right: 0;
        opacity: 0.85;
    }

    .arrow-icon {
        display: none;
    }

    .col-id,
    .col-impact,
    .col-action {
        display: none;
    }

    .method-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .resume-split-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .resume-preview-box {
        height: 300px;
        /* Even smaller on mobile */
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-role::before {
        content: '';
        margin-right: 0;
    }

    .timeline-date {
        margin-left: 0;
    }

    .bio-heading {
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }

    .bio-text {
        font-size: 1rem;
        line-height: 1.65;
    }

    /* Toolkit Responsive */
    .toolkit-grid {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .case-study-meta-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }

    .case-study-meta-item:nth-child(2) {
        border-right: none;
    }

    .case-study-meta-item:nth-child(-n+2) {
        border-bottom: 1px solid var(--line-hairline);
    }

    footer {
        padding-top: 5rem;
        padding-bottom: 4rem;
    }

    .giant-mail-link {
        font-size: clamp(1.7rem, 8.2vw, 3rem);
        overflow-wrap: anywhere;
    }

    .footer-meta {
        margin-top: 2.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .social-links {
        gap: 1rem;
    }

    .col-span-2 {
        grid-column: span 1;
        /* Reset spans */
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .identity-sidebar {
        padding: 1rem;
    }

    .brand {
        font-size: 1.35rem;
    }

    .hero-statement,
    .section-block,
    .ticker-divider,
    footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .display-heading {
        font-size: clamp(2.2rem, 11vw, 3.2rem);
        line-height: 1.08;
    }

    .hero-statement {
        padding-top: 3.25rem;
        padding-bottom: 3.25rem;
    }

    .manifesto-text {
        margin-top: 2rem;
        font-size: 1.02rem;
    }

    .ticker-divider {
        font-size: 0.72rem;
    }

    .case-study-feature {
        padding: 1.25rem;
    }

    .case-study-title {
        font-size: clamp(1.75rem, 9vw, 2.25rem);
    }

    .case-study-subtitle {
        font-size: 0.98rem;
        margin-bottom: 1.25rem;
    }

    .toolkit-item {
        padding: 1rem;
    }

    .tech-mono {
        font-size: 0.8rem;
    }

}

@media (max-width: 640px) {
    .case-study-feature {
        padding: 1.5rem;
    }

    .case-study-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .case-study-meta-grid {
        grid-template-columns: 1fr;
    }

    .case-study-meta-item {
        border-right: none;
        border-bottom: 1px solid var(--line-hairline);
        padding: 1rem;
    }

    .case-study-meta-item:nth-child(-n+2) {
        border-bottom: 1px solid var(--line-hairline);
    }

    .case-study-meta-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 560px) {
    .identity-sidebar {
        align-items: flex-start;
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    .role-meta {
        margin-left: 0;
        width: 100%;
        text-align: left;
    }

    .status-indicator {
        justify-content: flex-start;
    }

    .hero-statement {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .section-block {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .ticker-divider {
        padding-top: 0.85rem;
        padding-bottom: 0.85rem;
    }

    .case-study-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .case-study-meta-grid {
        grid-template-columns: 1fr;
    }

    .case-study-meta-item {
        border-right: none;
        border-bottom: 1px solid var(--line-hairline);
    }

    .case-study-meta-item:last-child {
        border-bottom: none;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .method-col h4 {
        font-size: 1.3rem;
    }

    .footer-cta h2 {
        font-size: 1.8rem;
    }
}

/* MODAL OVERLAY */
#modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

/* SPEC SHEET MODAL STYLING */
.modal-container {
    background: var(--bg-paper);
    width: 90%;
    max-width: 800px;
    /* Wider for spec sheet */
    padding: 0;
    /* Let inner content handle padding */
    border: 1px solid var(--text-ink);
    box-shadow: 20px 20px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-paper);
    border: 1px solid var(--line-hairline);
    color: var(--text-ink);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
}

.close-btn:hover {
    background: var(--bg-surface);
}

.spec-sheet {
    display: flex;
    flex-direction: column;
}

.spec-header {
    background: var(--bg-surface);
    padding: 3rem;
    border-bottom: 1px solid var(--line-hairline);
}

.spec-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    color: var(--accent-organic);
}

.spec-title {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    line-height: 1.1;
    color: var(--text-ink);
}

.spec-grid-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    border-top: 1px solid var(--line-hairline);
    padding-top: 1.5rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-box .label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-box .val {
    font-weight: 500;
    color: var(--text-ink);
}

.spec-body {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.spec-section h4 {
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.spec-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 65ch;
    color: var(--text-charcoal);
}

@media (max-width: 768px) {
    .modal-container {
        width: calc(100% - 1.5rem);
        max-height: calc(100vh - 1.5rem);
        box-shadow: none;
    }

    .close-btn {
        top: 0.75rem;
        right: 0.75rem;
    }

    .spec-header,
    .spec-body {
        padding: 1.5rem;
    }

    .spec-meta {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .spec-title {
        font-size: 1.7rem;
        margin-bottom: 1.25rem;
    }

    .spec-grid-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding-top: 1rem;
    }
}



/* SELECTION HIGHLIGHT (Luxury) */
::selection {
    background: var(--accent-organic);
    color: white;
}
/* Utility: Under Construction Tag */
.construction-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent-organic);
    border: 1px solid var(--accent-organic);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    margin-left: 0.5rem;
    vertical-align: middle;
    display: inline-block;
    text-transform: uppercase;
}
