@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; }
}

@layer base {
  :root {
    color-scheme: light;
    --paper: #f7f7f2;
    --ink: #202321;
    --muted: #626760;
    --accent: #304de3;
    --rule: #c9ccc3;
    --gutter: clamp(22px, 4.45vw, 72px);
    --max: 1440px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }
  html { scroll-behavior: smooth; scroll-padding-top: 32px; }
  body { font-size: 1.125rem; line-height: 1.5; overflow-wrap: break-word; }
  ::selection { color: white; background: var(--accent); }
  a { text-decoration-thickness: 1px; text-underline-offset: .2em; }
  a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; border-radius: 1px; }
  h1, h2, h3 { font-weight: 550; letter-spacing: -.045em; line-height: 1.08; text-wrap: balance; }
  h1 { font-size: clamp(3rem, 6.65vw, 6.25rem); }
  h2 { font-size: clamp(2.375rem, 4.1vw, 3.875rem); }
  h3 { font-size: clamp(1.6875rem, 2.35vw, 2.25rem); }
  em { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.055em; }
  p { max-width: 67ch; text-wrap: pretty; }
  button, input { font: inherit; }
}

@layer layout {
  .wrap { width: min(100%, var(--max)); padding-inline: var(--gutter); margin-inline: auto; }
  .site-header { display: flex; justify-content: space-between; align-items: flex-start; padding-block: 34px 26px; gap: 30px; }
  .brand { display: block; font-size: 1.375rem; line-height: 1.02; font-weight: 550; text-decoration: none; letter-spacing: -.035em; }
  .brand span { display: block; }
  .nav { display: flex; gap: 34px; align-items: center; font-size: 1.125rem; }
  .nav a { text-decoration: none; padding-block: 5px; }
  .nav a:hover { color: var(--accent); }
  .hero { padding-block: 74px 74px; }
  .hero h1 { max-width: 1250px; }
  .hero h1 span { display: block; }
  .hero h1 em { color: var(--accent); }
  .hero-bottom { display: grid; grid-template-columns: 1.5fr 1fr; gap: 72px; align-items: start; margin-top: 46px; }
  .hero-intro { font-size: clamp(1.25rem, 1.85vw, 1.6875rem); line-height: 1.38; max-width: 720px; letter-spacing: -.02em; }
  .engagement-interest { margin-top: 18px; font-size: 1rem; line-height: 1.5; color: var(--muted); }
  .hero-copy, .hero-side { min-width: 0; }
  .hero-side { justify-self: end; max-width: 370px; }
  .project-fit ul { list-style: none; padding: 0; margin: 22px 0 0; }
  .project-fit li + li { margin-top: 8px; }
  .project-fit a { display: inline-flex; align-items: baseline; gap: 10px; min-height: 26px; font-size: 1rem; line-height: 1.4; text-decoration: none; }
  .project-fit .arrow { font-size: 1.125rem; }
  .project-fit a:hover .link-label { text-decoration: underline; }
  .role { justify-self: end; padding-top: 4px; font-size: 1.125rem; }
  .role strong { font-weight: 550; display: block; }
  .role span { display: block; color: var(--muted); margin-top: 5px; }
  .section-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; border-top: 1px solid var(--rule); padding-block: 20px 34px; }
  .section-bar h2 { font-size: 1.4375rem; letter-spacing: -.025em; }
  .section-bar span { font-size: 0.9375rem; color: var(--muted); }
  .project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 38px; row-gap: 68px; }
  .project.wide { grid-column: 1 / -1; }
  .project-art { display: block; overflow: hidden; text-decoration: none; background: #e7e4f1; }
  .project-art svg { width: 100%; height: auto; transition: transform .35s ease; }
  .project.wide .project-art { aspect-ratio: 2.15; background: #e1e5fb; }
  .project.wide .project-art svg { width: 100%; height: 100%; object-fit: cover; }
  .project-info { padding-top: 23px; }
  .project-actions, .case-links, .profile-links { display: flex; flex-wrap: wrap; gap: 0 28px; }
  .project.wide .project-actions { grid-column: 2; }
  .project.wide .project-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 38px; }
  .project.wide .project-info .eyebrow { grid-column: 1 / -1; }
  .project.wide .project-info h3 { grid-row: span 2; font-size: clamp(2.375rem, 4.3vw, 3.875rem); }
  .project.wide .project-info p { margin-top: 0; }
  .project-info p { color: var(--muted); margin-top: 10px; font-size: 1.125rem; line-height: 1.45; }
  .section { padding-top: 114px; }
  .section-intro { margin-bottom: 35px; }
  .section-intro p { color: var(--muted); margin-top: 14px; font-size: 1.25rem; }
  .index { border-top: 1px solid var(--rule); }
  .index-item { display: grid; grid-template-columns: 1fr auto 24px; align-items: center; gap: 32px; padding: 26px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
  .index-item h3 { font-size: clamp(1.5625rem, 2.1vw, 2rem); }
  .index-item p { margin-top: 7px; color: var(--muted); font-size: 1.0625rem; }
  .index-item .status { color: var(--muted); font-size: 0.9375rem; text-align: end; }
  .index-item:hover h3 { color: var(--accent); }
  .about { display: grid; grid-template-columns: .9fr 1.1fr; gap: 85px; border-top: 1px solid var(--rule); padding-top: 48px; }
  .about h2 { max-width: 470px; font-size: clamp(3rem, 5.2vw, 4.75rem); }
  .about h2 em { display: block; color: var(--accent); }
  .about-copy { font-size: 1.25rem; line-height: 1.55; }
  .about-copy > p + p { margin-top: 22px; }
  .about-copy .background { color: var(--muted); font-size: 1.0625rem; }
  .timeline { margin-top: 35px; }
  .timeline > div { display: grid; grid-template-columns: 105px 1fr; gap: 16px; padding: 19px 0; border-top: 1px solid var(--rule); font-size: 1.0625rem; }
  .timeline dt { color: var(--muted); font-size: 0.9375rem; padding-top: 2px; }
  .timeline dd span { display: block; color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
  .contact { display: flex; justify-content: space-between; gap: 40px; align-items: center; margin-top: 100px; padding-block: 32px; border-block: 1px solid var(--rule); }
  .contact-copy { max-width: 520px; min-width: 0; }
  .contact-copy p { margin-top: 18px; font-size: 1.0625rem; line-height: 1.5; color: var(--muted); max-width: 46ch; }
  .contact h2 { font-size: clamp(2.75rem, 5.4vw, 4.875rem); }
  .contact-links { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
  .contact a { font-size: clamp(1.25rem, 2vw, 1.75rem); color: var(--accent); text-decoration: none; letter-spacing: -.035em; }
  .contact .contact-primary { display: inline-flex; align-items: center; gap: 16px; padding: 13px 21px; background: var(--accent); color: white; border: 1px solid var(--accent); border-radius: 4px; font-size: 1.125rem; letter-spacing: -.015em; }
  .contact-address { font-size: 1.125rem; line-height: 1.5; color: var(--ink); margin-block: 1px 7px; }
  .contact .contact-secondary { font-size: 1.125rem; letter-spacing: -.015em; }
  .contact a:hover .link-label { text-decoration: underline; }
  .site-footer { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding-block: 25px 32px; color: var(--muted); font-size: 0.875rem; }
  .site-footer a { text-decoration: none; }
  .case-intro { padding-top: 48px; }
  .breadcrumb { display: flex; gap: 12px; font-size: 0.9375rem; padding-bottom: 23px; border-bottom: 1px solid var(--rule); color: var(--muted); }
  .breadcrumb a { text-decoration: none; }
  .breadcrumb .current { color: var(--accent); }
  .case-intro h1 { margin-top: 32px; font-size: clamp(2.75rem, 5.7vw, 5.25rem); max-width: 1160px; }
  .case-intro h1 > span { display: block; }
  .case-intro h1 em { color: var(--ink); }
  .case-dek { display: grid; grid-template-columns: 1.3fr 1fr; gap: 70px; margin-top: 30px; align-items: start; }
  .case-dek > p { font-size: clamp(1.25rem, 1.9vw, 1.6875rem); line-height: 1.35; color: var(--muted); max-width: 39ch; }
  .case-role { padding-inline-start: 25px; border-inline-start: 1px solid var(--rule); font-size: 1.0625rem; line-height: 1.4; }
  .case-role strong { font-weight: 550; display: block; }
  .case-role span { display: block; color: var(--muted); margin-top: 7px; font-size: 0.9375rem; max-width: 45ch; }
  .case-visual { margin-top: 42px; }
  .case-visual .visual { overflow: hidden; aspect-ratio: 1000 / 650; }
  .case-visual svg { width: 100%; height: 100%; object-fit: cover; }
  figcaption { color: var(--muted); font-size: 0.8125rem; margin-top: 12px; line-height: 1.5; }
  .case-body { padding-top: 62px; }
  .story-section { display: grid; grid-template-columns: .65fr 1fr; gap: 90px; padding-block: 39px; border-top: 1px solid var(--rule); }
  .story-section h2 { font-size: clamp(1.75rem, 3vw, 2.6875rem); max-width: 12ch; }
  .story-copy { font-size: 1.25rem; line-height: 1.6; }
  .story-copy > p + p { margin-top: 20px; }
  .decisions { list-style: none; padding: 0; margin: 0; }
  .decisions li + li { margin-top: 26px; }
  .decisions h3 { font-size: 1.4375rem; letter-spacing: -.025em; margin-bottom: 8px; }
  .decisions p { color: var(--muted); font-size: 1.125rem; }
  .metric { margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--rule); }
  .metric strong { font-size: 4.5rem; font-weight: 500; letter-spacing: -.06em; color: var(--accent); display: block; line-height: 1; }
  .metric span { display: block; margin-top: 8px; font-size: 1.25rem; }
  .metric small { display: block; margin-top: 6px; color: var(--muted); font-size: 0.8125rem; }
  .stack { padding: 0; margin: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 1.0625rem; }
  .next-case { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding-block: 34px; margin-top: 35px; border-block: 1px solid var(--rule); text-decoration: none; }
  .next-case small { font-size: 0.875rem; display: block; color: var(--muted); margin-bottom: 10px; }
  .next-case strong { font-size: clamp(1.75rem, 3.3vw, 2.875rem); line-height: 1.1; font-weight: 500; letter-spacing: -.04em; }
  .next-case:hover strong { color: var(--accent); }
  .not-found { padding-block: 100px 160px; }
  .not-found p { margin-block: 25px; }
}

@layer components {
  .skip-link { position: absolute; top: 10px; left: 20px; z-index: 10; padding: 10px 18px; background: var(--ink); color: white; transform: translateY(-160%); }
  .skip-link:focus { transform: translateY(0); }
  .eyebrow { color: var(--muted); font-size: 0.75rem; font-weight: 550; letter-spacing: .075em; text-transform: uppercase; margin-bottom: 10px; }
  .text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); text-decoration: none; margin-top: 19px; font-size: 1.0625rem; font-weight: 500; min-height: 32px; }
  .text-link:hover .link-label { text-decoration: underline; }
  .arrow { display: inline-block; color: var(--accent); font-size: 1.625rem; line-height: 1; transition: transform .2s ease; }
  .illustration-note { color: var(--muted); font-size: 0.75rem; margin-top: 8px; }
  .external-arrow { display: inline-block; font-size: .8em; margin-inline-start: 5px; }
  .draft-mark { font-size: 0.75rem; letter-spacing: .035em; }
}

@layer responsive {
  @media (min-width: 1500px) { .hero { padding-top: 90px; } }
  @media (max-width: 1000px) {
    .hero { padding-block: 58px 62px; }
    .hero h1 { font-size: clamp(3.25rem, 6.7vw, 4.6875rem); }
    .hero-bottom { gap: 36px; }
    .role { font-size: 1rem; }
    .project-grid { gap: 52px 28px; }
    .project-info h3 { font-size: 1.75rem; }
    .about { gap: 45px; grid-template-columns: .8fr 1.2fr; }
    .about-copy { font-size: 1.125rem; }
    .case-dek { gap: 40px; }
    .contact { flex-direction: column; align-items: flex-start; gap: 26px; }
    .contact-links { align-items: flex-start; }
    .story-section { gap: 50px; grid-template-columns: .55fr 1fr; }
  }
  @media (max-width: 760px) {
    .site-header { padding-block: 26px 20px; gap: 20px; align-items: flex-start; }
    .brand { font-size: 1.125rem; }
    .nav { font-size: 0.9375rem; gap: 20px; }
    .hero { padding-block: 28px 40px; }
    .hero h1 { font-size: clamp(2rem, 6.5vw, 3rem); line-height: 1.08; letter-spacing: -.04em; }
    .hero h1 span { display: inline; }
    .hero-bottom { grid-template-columns: 1fr; gap: 28px; margin-top: 24px; }
    .hero-side { justify-self: start; max-width: none; }
    .hero-intro { font-size: 1.125rem; line-height: 1.45; max-width: 40ch; }
    .role { justify-self: start; font-size: 1rem; }
    .role strong, .role span { display: inline; }
    .role span::before { content: ' · '; }
    .section-bar { padding-block: 18px 26px; }
    .section-bar h2 { font-size: 1.3125rem; }
    .section-bar span { font-size: 0.75rem; }
    .project-grid { grid-template-columns: 1fr; row-gap: 46px; }
    .project.wide { grid-column: auto; }
    .project.wide .project-art { aspect-ratio: auto; }
    .project.wide .project-art svg { height: auto; }
    .project.wide .project-info { display: block; }
    .project.wide .project-info h3 { font-size: 2rem; }
    .project.wide .project-info p { margin-top: 10px; }
    .project-info { padding-top: 20px; }
    .project-info h3 { font-size: 1.875rem; }
    .section { padding-top: 78px; }
    .index-item { grid-template-columns: 1fr 24px; gap: 18px; padding-block: 23px; }
    .index-item .status { grid-column: 1; grid-row: 2; text-align: start; font-size: 0.8125rem; }
    .index-item > .arrow { grid-column: 2; grid-row: 1 / span 2; }
    .index-item p { font-size: 1rem; }
    .about { grid-template-columns: 1fr; gap: 32px; padding-top: 35px; }
    .about h2 { font-size: 3.25rem; max-width: 500px; }
    .about h2 em { display: inline; }
    .timeline > div { grid-template-columns: 90px 1fr; }
    .contact { margin-top: 66px; flex-direction: column; gap: 18px; padding-block: 25px; }
    .contact h2 { font-size: 3.25rem; }
    .contact a { font-size: 1.625rem; }
    .contact-links { align-items: flex-start; }
    .site-footer { align-items: flex-start; font-size: 0.75rem; padding-block: 22px 28px; }
    .case-intro { padding-top: 28px; }
    .case-intro h1 { font-size: clamp(2.625rem, 8.5vw, 4.0625rem); margin-top: 27px; }
    .case-dek { grid-template-columns: 1fr; gap: 25px; margin-top: 25px; }
    .case-dek > p { font-size: 1.3125rem; }
    .case-role { padding-inline-start: 18px; font-size: 1rem; }
    .case-visual { margin-top: 30px; }
    .case-visual .visual { aspect-ratio: auto; }
    .case-visual svg { height: auto; }
    .case-body { padding-top: 35px; }
    .story-section { grid-template-columns: 1fr; gap: 23px; padding-block: 29px; }
    .story-section h2 { font-size: 2rem; max-width: 100%; }
    .story-copy { font-size: 1.125rem; }
    .next-case { padding-block: 27px; }
  }
  @media (max-width: 400px) {
    .site-header { flex-wrap: wrap; row-gap: 12px; padding-block: 22px 16px; gap: 12px; }
    .nav { gap: 13px; font-size: 0.875rem; }
    .brand { font-size: 1rem; }
    .hero { padding-top: 20px; }
    .hero h1 { font-size: 2rem; }
    .hero-bottom { margin-top: 20px; }
    .role strong, .role span { display: block; }
    .role span::before { content: ''; }
    .site-footer { flex-direction: column; gap: 8px; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
  }
  @media (forced-colors: active) {
    a:focus-visible { outline-color: Highlight; }
  }
  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .project-art:hover svg { transform: scale(1.025); }
    a:hover .arrow { transform: translateX(4px); }
  }
  @media print {
    .site-header, .contact, .next-case, .skip-link { display: none; }
    .wrap { max-width: none; padding-inline: 0; }
    body { font-size: 12pt; }
    .case-intro { padding-top: 0; }
    .story-section { break-inside: avoid; }
  }
}
