@charset "UTF-8";

:root {
  --paper: #050b10;
  --ink: #f2f3f3;
  --muted: #89939a;
  --line: #303b42;
  --blue: #00a6e6;
  --gutter: clamp(20px, 3.2vw, 52px);
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.page-shell { width: min(100%, 1800px); margin: 0 auto; padding: 0 var(--gutter); }
.masthead { min-height: 268px; display: grid; grid-template-columns: 1.55fr .9fr 1.35fr .62fr; border-bottom: 1px solid var(--ink); align-items: stretch; }
.wordmark { text-transform: uppercase; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 24px 24px 26px 0; font-size: clamp(52px, 6.2vw, 98px); line-height: .77; letter-spacing: -.085em; font-weight: 800; }
.wordmark > span:last-child { position: relative; display: inline-block; }
.wordmark-accent { display: block; width: 1.35em; height: .42em; margin-top: .12em; background: var(--blue); }
.role-block, .intro-block, .main-nav { border-left: 1px solid var(--line); display: flex; align-items: center; }
.role-block { padding: 20px clamp(20px, 3vw, 44px); }
.role { margin: 0; font-size: clamp(25px, 2.7vw, 42px); line-height: .92; font-weight: 750; letter-spacing: -.055em; }
.intro-block { padding: 24px clamp(22px, 4vw, 62px); }
.intro-block p { max-width: 420px; margin: 0; font-size: clamp(19px, 2vw, 29px); line-height: 1.12; letter-spacing: -.045em; }
.main-nav { padding: 24px clamp(18px, 3vw, 42px); flex-direction: column; align-items: stretch; justify-content: center; gap: 13px; }
.main-nav a { display: flex; justify-content: space-between; align-items: center; font-size: clamp(18px, 1.7vw, 25px); font-weight: 700; letter-spacing: -.04em; }
.main-nav a span { color: var(--blue); font-size: 1.05em; line-height: .8; margin-left: 8px; transition: transform .2s ease; }
.contact-line a span { color: var(--blue); font-size: 1.35em; line-height: .7; transition: transform .2s ease; }
.main-nav a:hover span, .contact-line a:hover span { transform: translate(3px,-3px); }
.work-section { padding: 24px 0 46px; }
.section-heading { display: flex; align-items: center; gap: 24px; margin: 0 0 30px; min-height: 42px; }
.section-marker { display: block; width: 76px; height: 24px; flex: 0 0 auto; background: var(--blue); }
.section-heading h1, .section-heading h2 { margin: 0; font-size: clamp(27px, 2.5vw, 38px); line-height: 1; letter-spacing: -.06em; font-weight: 750; }
.section-note { margin: 0 0 0 auto; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 34px 28px; }
.project-card { display: block; text-align: left; border: 0; padding: 0; background: transparent; color: inherit; cursor: pointer; min-width: 0; }
.project-image { position: relative; display: block; overflow: hidden; aspect-ratio: 1.34 / 1; background: #10191f; border: 1px solid #3b474f; box-sizing: border-box; }
.project-image.fit { background: transparent; }
.project-image.fit img { object-fit: cover; object-position: center; }
.project-card:hover .project-image.fit img, .project-card:focus-visible .project-image.fit img { transform: none; }
.project-image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 0%; transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.project-image.portrait img { object-fit: cover; object-position: 50% 0%; }
.project-card:hover .project-image img, .project-card:focus-visible .project-image img { transform: scale(1.035); }
.project-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 5px; }
.project-caption { display: flex; flex-direction: column; gap: 3px; padding-top: 9px; }
.project-caption strong { font-size: clamp(16px, 1.45vw, 21px); line-height: 1; font-weight: 750; letter-spacing: -.045em; }
.project-caption span { font-size: 14px; line-height: 1.25; color: #c4cbd0; letter-spacing: -.02em; }
.work-footnote { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin: 40px 0 0; padding-top: 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.about-section { border-top: 1px solid var(--ink); padding: 26px 0 56px; }
.about-section .section-heading { margin-bottom: 30px; }
.about-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 8vw, 120px); padding-left: 100px; }
.about-lead { max-width: 580px; margin: 0; font-size: clamp(28px, 3.5vw, 52px); line-height: .98; letter-spacing: -.065em; font-weight: 650; }
.about-copy { max-width: 620px; font-size: 16px; line-height: 1.42; letter-spacing: -.02em; }
.about-copy p { margin: 0 0 13px; }
.site-footer { border-top: 1px solid var(--ink); padding: 24px 0 18px; }
.footer-bio { display: grid; grid-template-columns: 76px minmax(220px, 1fr); gap: 24px; align-items: center; max-width: 900px; margin-bottom: 28px; }
.footer-marker { display: block; width: 76px; height: 24px; background: var(--blue); flex: 0 0 auto; }
.footer-bio p { max-width: 560px; margin: 0; font-size: 18px; line-height: 1.18; letter-spacing: -.035em; font-weight: 700; }
.footer-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.footer-meta > div { padding: 15px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.footer-meta > div:first-child { border-left: 0; padding-left: 0; }
.footer-meta strong { font-size: 14px; font-weight: 750; letter-spacing: -.03em; }
.footer-meta span { font-size: 14px; line-height: 1.25; color: #c4cbd0; }
.footer-meta a:hover { text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 3px; }
.contact-line { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; border-bottom: 1px solid var(--line); }
.contact-line > span { font-size: clamp(18px, 2vw, 26px); letter-spacing: -.04em; }
.contact-line a { font-size: clamp(25px, 3vw, 40px); font-weight: 750; letter-spacing: -.06em; }
.copyright { display: flex; justify-content: space-between; padding-top: 12px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }
.copyright a:hover { color: var(--blue); }
.project-dialog { border: 0; padding: 0; width: min(94vw, 1100px); max-width: none; max-height: 92vh; background: #1b1b1b; color: #f5f5f2; box-shadow: 0 18px 80px #0008; }
.project-dialog::backdrop { background: #111d; backdrop-filter: blur(4px); }
.dialog-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #444; }
.dialog-toolbar p { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.dialog-controls { display: flex; gap: 6px; }
.dialog-controls button { width: 36px; height: 32px; border: 1px solid #555; background: transparent; color: #f5f5f2; cursor: pointer; font-size: 20px; line-height: 1; }
.dialog-controls button:hover { background: var(--blue); border-color: var(--blue); color: white; }
.dialog-image-wrap { max-height: calc(92vh - 58px); overflow: auto; display: block; background: #242424; text-align: center; }
.dialog-image-wrap img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; }
@media (max-width: 1050px) {
  .masthead { grid-template-columns: 1.25fr .8fr 1.2fr .65fr; min-height: 225px; }
  .wordmark { font-size: clamp(48px, 6.2vw, 70px); }
  .role-block { padding-inline: 22px; }
  .intro-block { padding-inline: 24px; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .about-layout { padding-left: 0; }
}
@media (max-width: 760px) {
  .masthead { grid-template-columns: 1fr 1fr; min-height: 0; }
  .wordmark { min-height: 180px; font-size: clamp(56px, 11.5vw, 84px); }
  .role-block { border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px; }
  .intro-block { border-left: 0; padding: 22px 22px 22px 0; min-height: 135px; }
  .main-nav { min-height: 135px; padding: 20px 0 20px 22px; border-bottom: 1px solid var(--line); }
  .main-nav a { font-size: 19px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .section-heading { gap: 14px; }
  .section-marker { width: 46px; height: 18px; }
  .about-layout { grid-template-columns: 1fr; gap: 22px; }
  .about-lead { max-width: 620px; }
  .footer-meta { grid-template-columns: repeat(2, 1fr); }
  .footer-meta > div:nth-child(3) { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .footer-meta > div:nth-child(4) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .page-shell { padding-inline: 18px; }
  .masthead { grid-template-columns: 1fr 1fr; }
  .wordmark { min-height: 150px; font-size: clamp(50px, 12.5vw, 64px); }
  .role { font-size: 25px; }
  .role-block { padding: 16px; }
  .intro-block { padding: 18px 14px 18px 0; min-height: 118px; }
  .intro-block p { font-size: 17px; }
  .main-nav { min-height: 118px; padding: 15px 0 15px 14px; gap: 8px; }
  .main-nav a { font-size: 17px; }
  .project-grid { gap: 24px 12px; }
  .project-image { aspect-ratio: 1.1 / 1; }
  .project-caption strong { font-size: 16px; }
  .project-caption span { font-size: 12px; }
  .section-note { display: none; }
  .work-footnote { font-size: 9px; }
  .footer-bio { grid-template-columns: 46px 1fr; gap: 14px; }
  .footer-marker { width: 46px; height: 14.5px; }
  .footer-bio p { font-size: 16px; }
  .footer-meta > div { padding: 13px 10px; }
  .footer-meta > div:nth-child(odd) { padding-left: 0; }
  .footer-meta strong, .footer-meta span { font-size: 12px; }
  .contact-line { align-items: flex-start; flex-direction: column; gap: 10px; }
  .copyright { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Theme selector */
.theme-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  margin: 0 0 7px;
}
.theme-swatch {
  appearance: none;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 0;
  cursor: pointer;
  position: relative;
  transition: transform .18s ease, outline-color .18s ease;
}
.theme-swatch:hover { transform: translateY(-2px); }
.theme-swatch:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.theme-swatch-white { background: #f8f8f6; }
.theme-swatch-gray { background: #ccc; }
.theme-swatch-dark { background: #050b10; }
.theme-swatch[aria-pressed="true"] {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}


/* Theme selector visibility refinement */
.theme-switcher {
  min-height: 28px;
  width: 100%;
  gap: 8px;
  margin: 0 0 5px;
}
.theme-switcher-label {
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.theme-swatch {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border: 1px solid #666;
}
.theme-swatch-white { background-color: #f8f8f6; }
.theme-swatch-gray { background-color: #ccc; }
.theme-swatch-dark { background-color: #050b10; }


/* Consistent external-link arrow: SVG avoids iOS emoji rendering. */
.arrow-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.arrow-icon svg { display: block; width: 1em; height: 1em; overflow: visible; }


/* iOS Safari: keep the project viewer toolbar inside the visible viewport. */
@media (max-width: 760px) {
  .project-dialog {
    position: fixed;
    inset: max(env(safe-area-inset-top), 8px) 0 max(env(safe-area-inset-bottom), 8px);
    width: 100vw;
    max-width: 100vw;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px);
    margin: auto;
    box-sizing: border-box;
  }
  .dialog-toolbar {
    position: relative;
    z-index: 1;
    min-height: 58px;
    box-sizing: border-box;
    gap: 10px;
  }
  .dialog-toolbar p {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .dialog-controls {
    flex: 0 0 auto;
  }
  .dialog-image-wrap {
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 90px);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}
