/* Base Reset & Variables */
:root {
    --bg-color: #fcfcfc;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --border-color: #eaeaea;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Layout */
.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header & Navigation */
.site-header {
    padding: 32px 0;
    margin-bottom: 64px;
}

.navigation {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link.active {
    color: var(--text-primary);
    position: relative;
}

/* Subtle indicator for active link */
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--text-primary);
}

/* Hero Section */
.hero {
    margin-bottom: 56px;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.hero-subtitle strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Content */
.content p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 65ch; /* Optimal reading length */
}

/* Ivory and graphite preserve the reading-first identity; forest green marks actions.
   Serif headings bring a personal editorial voice. ENERGY 2 / RHYTHM 2 / MOTION 3.
   Only the neural sculpture and two short captions move, keeping body text stable. */
html:has(body.portfolio) { scroll-behavior: smooth; }
.portfolio {
    --paper: #f4f3ed;
    --ink: #232b28;
    --muted: #606b64;
    --accent: #315b46;
    --rule: #d6dad0;
    background: var(--paper);
    color: var(--ink);
    isolation: isolate;
}
.portfolio ::selection { background: #d5e2cf; color: #203a2c; }
.portfolio [hidden] { display: none !important; }
.portfolio a { color: inherit; }
.portfolio a, .portfolio button { -webkit-tap-highlight-color: transparent; }
.portfolio button { font: inherit; color: inherit; cursor: pointer; }
.portfolio :focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.portfolio .shell { width: min(1280px, calc(100% - 112px)); margin-inline: auto; }
#ai-bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.skip-link { position: fixed; top: -100px; left: 24px; padding: 12px 20px; background: var(--paper); z-index: 20; }
.skip-link:focus { top: 16px; }
.portfolio-header { position: relative; z-index: 5; }
.header-inner { display: flex; align-items: center; min-height: 112px; border-bottom: 1px solid var(--rule); gap: 40px; }
.wordmark { font-size: 31px; font-weight: 650; letter-spacing: -1.8px; text-decoration: none; }
.wordmark span { color: var(--accent); }
.portfolio-nav { display: flex; gap: 34px; margin-left: auto; }
.portfolio-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; text-decoration: none; color: var(--muted); }
.portfolio-nav a:hover, .portfolio-nav a[aria-current] { color: var(--ink); }
.portfolio-nav a[aria-current]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--accent); }
.motion-toggle { display: inline-flex; gap: 10px; align-items: center; background: transparent; border: 0; border-left: 1px solid var(--rule); min-height: 44px; padding-left: 24px; font-size: 11px !important; }
.motion-symbol { width: 9px; height: 11px; border-inline: 2px solid currentColor; }
.motion-toggle[aria-pressed="true"] .motion-symbol { width: 0; border: 6px solid transparent; border-left: 8px solid currentColor; border-right: 0; }
.hero-stage { position: relative; min-height: 790px; min-height: max(770px, calc(100svh - 112px)); display: flex; align-items: center; padding-block: 74px 122px; }
.hero-copy { position: relative; width: 62%; z-index: 1; }
.eyebrow { font-size: 11px; letter-spacing: .07em; color: var(--muted); margin-bottom: 32px; }
.slide h1, .slide h2, .section-heading h2, .closing-row h2, .detail-heading { font-family: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Book Antiqua", Georgia, serif; font-weight: 400; letter-spacing: -.055em; }
.slide h1, .slide h2 { font-size: clamp(64px, 6.8vw, 102px); line-height: 1.025; margin: 0 0 30px; }
.portfolio em { font-weight: 400; color: var(--accent); }
.slide p { max-width: 390px; font-size: 15px; line-height: 1.85; color: var(--muted); margin-bottom: 25px; }
.slide strong { color: var(--ink); font-weight: 500; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: 30px; font-size: 13px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--accent); }
.text-link span { font-size: 20px; transition: transform 180ms ease; }
.text-link:hover span { transform: translate(2px, -2px); }
.slider-controls { display: flex; gap: 30px; align-items: center; margin-top: 40px; }
.slide-count { display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
#slide-current { color: var(--ink); }
.count-divider { width: 40px; height: 1px; background: var(--rule); }
.slider-buttons { display: flex; gap: 8px; }
.slider-buttons button { width: 44px; height: 44px; border: 1px solid #adb8ac; border-radius: 50%; background: var(--paper); transition: background 180ms, color 180ms; font-size: 18px; }
.slider-buttons button:hover { background: var(--ink); color: var(--paper); }
.art-caption { position: absolute; right: 0; bottom: 145px; width: 230px; will-change: transform; }
.caption-line { display: block; width: 48px; height: 1px; background: #84947f; margin-bottom: 20px; }
.art-caption p { font-family: Georgia, serif; font-size: 21px; line-height: 1.4; letter-spacing: -.025em; }
.art-caption > span:last-child { display: block; font-size: 10px; color: var(--muted); margin-top: 12px; }
.scroll-cue { position: absolute; bottom: 32px; left: 0; display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; font-size: 10px; color: var(--muted) !important; }
.scroll-track { width: 1px; height: 30px; background: var(--accent); }
.thought-section { position: relative; border-block: 1px solid var(--rule); background: rgba(244, 243, 237, .89); padding-block: 105px 112px; scroll-margin-top: 30px; }
.thought-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 100px; align-items: start; }
.section-heading h2 { font-size: clamp(32px, 3.2vw, 46px); line-height: 1.2; }
.thought-copy { padding-top: 5px; }
.thought-copy p { font-size: 15px; line-height: 1.95; color: var(--muted); }
.thought-copy p + p { margin-top: 24px; }
.closing-section { padding-block: 104px 110px; }
.closing-section .eyebrow { margin-bottom: 25px; }
.closing-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.closing-row h2 { font-size: clamp(46px, 5vw, 72px); line-height: 1.08; }
.solid-link { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 13px 26px; background: var(--accent); color: #fff !important; border: 1px solid var(--accent); border-radius: 3px; text-decoration: none; font-size: 13px; transition: background 180ms; }
.solid-link:hover { background: #234332; }
.portfolio-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--rule); padding-block: 30px; font-size: 11px; color: var(--muted); }
.portfolio-footer a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 5px; text-decoration-color: #adb8ac; }
.detail-main { min-height: calc(100svh - 220px); padding-block: 100px 140px; }
.detail-content { max-width: 690px; }
.detail-heading { font-size: clamp(60px, 7vw, 100px); line-height: 1.05; margin-bottom: 38px; }
.detail-content > p:not(.eyebrow) { font-size: 18px; line-height: 1.85; color: var(--muted); max-width: 570px; margin-bottom: 30px; }
.contact-address { display: inline-block; font-family: Georgia, serif; font-size: clamp(25px, 3.5vw, 44px); text-underline-offset: 9px; text-decoration-thickness: 1px; margin-bottom: 32px; overflow-wrap: anywhere; }
@media (min-width: 1600px) {
    .hero-stage { min-height: 850px; }
}
@media (max-width: 1000px) {
    .portfolio .shell { width: calc(100% - 64px); }
    .header-inner { gap: 24px; }
    .portfolio-nav { gap: 24px; }
    .hero-copy { width: 68%; }
    .art-caption { width: 190px; }
    .thought-layout { gap: 48px; }
}
@media (max-width: 680px) {
    .portfolio .shell { width: calc(100% - 40px); }
    .header-inner { min-height: 106px; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; padding-block: 14px 10px; }
    .wordmark { font-size: 27px; }
    .portfolio-nav { order: 3; width: 100%; margin: 0; gap: 27px; }
    .portfolio-nav a { font-size: 12px; }
    .motion-toggle { padding-left: 0; border: 0; margin-left: auto; }
    .hero-stage { min-height: 930px; padding-block: 56px 320px; align-items: flex-start; }
    .hero-copy { width: 100%; }
    .eyebrow { margin-bottom: 25px; }
    .slide h1, .slide h2 { font-size: clamp(47px, 9.7vw, 66px); line-height: 1.1; margin-bottom: 25px; }
    .slide p { max-width: 340px; font-size: 14px; }
    .slider-controls { margin-top: 28px; }
    .art-caption { right: 0; bottom: 97px; width: 180px; }
    .art-caption p { font-size: 19px; }
    .art-caption > span:last-child { font-size: 9px; }
    .thought-section { padding-block: 64px; }
    .thought-layout { grid-template-columns: 1fr; gap: 34px; }
    .section-heading h2 { font-size: 34px; }
    .thought-copy p { font-size: 14px; }
    .closing-section { padding-block: 65px; }
    .closing-row { flex-direction: column; align-items: flex-start; gap: 32px; }
    .closing-row h2 { font-size: 51px; }
    .portfolio-footer { align-items: flex-start; gap: 4px 20px; padding-block: 25px; }
    .portfolio-footer p { width: 100%; }
    .detail-main { padding-block: 64px 100px; }
    .detail-content > p:not(.eyebrow) { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    html:has(body.portfolio) { scroll-behavior: auto; }
    .portfolio *, .portfolio *::before, .portfolio *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
    .portfolio [data-parallax] { transform: none !important; }
}
