:root {
  --bg: #ffffff;
  --text: #050505;
  --secondary: #484848;
  --muted: #b2b2b2;
  --line: #111111;
  --line-strong: 1px solid var(--line);
  --soft: #f2f2f2;
  --accent: #d8ff00;
  --red: #e8493a;
  --blue: #175fe8;
  --yellow: #f4d03f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 26px;
  min-height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 800;
}

.brand-base {
  color: var(--text);
}

.brand.has-section .brand-base {
  color: var(--muted);
  font-size: 16px;
}

.brand-suffix {
  color: var(--text);
  font-size: 24px;
}

.brand-mark,
.hero-symbol {
  display: block;
  border: 12px solid var(--text);
  border-top: 0;
  border-radius: 0 0 80px 80px;
}

.brand-mark {
  display: none;
  width: 42px;
  height: 26px;
  border-width: 8px;
  border-top: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  font-weight: 600;
}

.nav a {
  color: var(--muted);
  transition: color 160ms ease;
}

.nav a:hover,
.nav a:focus-visible,
.nav a.is-active {
  color: var(--text);
}

.language-switch {
  display: inline-flex;
  gap: 2px;
}

.language-switch button {
  width: 38px;
  height: 34px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
}

.language-switch button.is-active {
  border: 1px solid var(--line);
  color: #fff;
  background: #000;
}

.hero {
  --hero-window-edge: clamp(160px, 15vw, 260px);
  --photo-window-offset: 100px;
  position: relative;
  min-height: 820px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 36px;
  padding: 80px 0 92px;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  grid-column: 1 / -1;
  grid-row: 1;
  z-index: 1;
  width: calc(100vw - (var(--hero-window-edge) * 2));
  min-height: 300px;
  max-width: none;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.12),
    0 8px 18px rgba(0, 0, 0, 0.08);
  align-self: center;
  justify-self: center;
  margin-top: -100px;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 260ms ease;
}

.hero-copy.is-closed {
  display: none;
}

.hero-copy.is-dragged {
  position: fixed;
  left: var(--hero-drag-left);
  top: var(--hero-drag-top);
  z-index: 85;
  margin: 0;
}

.hero-copy:not(.is-dragged) {
  transform: translateX(-100px);
}

.hero-copy.is-dragging {
  cursor: grabbing;
}

.hero-window-bar {
  flex: 0 0 auto;
}

.hero-copy-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  text-align: left;
  padding: clamp(24px, 3.6vw, 52px) clamp(32px, 5vw, 76px) clamp(24px, 3.6vw, 52px) 18px;
}

.hero-window-bar p,
.hero-copy-content h1,
.hero-copy-content p,
.hero-copy-content .hero-links {
  text-align: left;
}

.hero-symbol {
  width: 112px;
  height: 72px;
  margin-bottom: 58px;
  display: none;
}

.role-line {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 28px;
  font-size: clamp(29px, 4.4vw, 60px);
  line-height: 0.93;
  letter-spacing: -0.03em;
}

h1 em { font-style: normal; background: var(--accent); }

.hero-copy-content > p:not(.role-line) {
  max-width: 23em;
  margin-bottom: 16px;
  color: var(--text);
  font-size: clamp(22px, 3.2vw, 36px);
  line-height: 1.42;
  letter-spacing: -0.02em;
}

.text-jitter span {
  display: inline-block;
  transform: translateY(0) rotate(0deg) scale(1);
  transform-origin: center;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.18, 1);
  will-change: transform;
}

.text-jitter span.is-jittering {
  transform: translateY(var(--jitter-lift, 0)) rotate(var(--jitter-rotate, 0deg)) scale(var(--jitter-scale, 1));
}

.hero-links {
  display: flex;
  gap: 18px;
  margin-top: 42px;
  font-weight: 800;
  align-items: center;
}

.hero-links a,
.contact-links a {
  display: inline-block;
  transform-origin: left center;
  transition: transform 180ms cubic-bezier(0.2, 0.8, 0.18, 1), margin-right 180ms ease;
}

.hero-links a:hover,
.hero-links a:focus-visible,
.contact-links a:hover,
.contact-links a:focus-visible {
  transform: scale(1.3);
  margin-right: 36px;
}

.hero-links a::after,
.contact-links a::after {
  content: " ->";
}

.feature-window {
  --intro-scale: 1;
  --intro-tilt: 0deg;
  --intro-text-drift: 0px;
  --intro-text-drop: 0px;
  --intro-text-rotate: 0deg;
  --intro-drag-left: auto;
  --intro-drag-top: auto;
  position: relative;
  grid-column: 2;
  grid-row: 1;
  z-index: 2;
  align-self: start;
  justify-self: end;
  width: 300px;
  max-width: 100%;
  margin: 116px calc(var(--hero-window-edge) - var(--photo-window-offset)) 0 0;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow:
    0 22px 55px rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.12);
  transform: rotate(var(--intro-tilt)) scale(var(--intro-scale));
  transform-origin: center;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 260ms ease;
  will-change: transform;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 19;
  width: 54px;
  height: 54px;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  animation: scrollCueDrop 1.8s ease-in-out infinite;
  transition: opacity 180ms ease;
}

.scroll-cue.is-hidden {
  opacity: 0;
  animation: none;
  pointer-events: none;
}

@keyframes scrollCueDrop {
  0% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
  58% {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
  59% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

.scroll-cue::before,
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(50% + 8px);
  width: 24px;
  height: 1px;
  background: var(--line);
}

.scroll-cue::before {
  left: calc(50% - 24px);
  transform-origin: right center;
  transform: rotate(45deg);
}

.scroll-cue::after {
  left: 50%;
  transform-origin: left center;
  transform: rotate(-45deg);
}

.scroll-cue:hover,
.scroll-cue:focus-visible {
  outline: 0;
}

.scroll-cue:hover::before,
.scroll-cue:hover::after,
.scroll-cue:focus-visible::before,
.scroll-cue:focus-visible::after {
  background: var(--line);
}

.feature-window:hover {
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.feature-window.is-pinned-small {
  position: fixed;
  right: 24px;
  top: var(--intro-fixed-top, 50%);
  z-index: 80;
  margin: 0;
  transform-origin: top right;
}

.feature-window.is-dragged {
  position: fixed;
  left: var(--intro-drag-left);
  top: var(--intro-drag-top);
  right: auto;
  bottom: auto;
  z-index: 90;
  margin: 0;
  transform-origin: top left;
}

.feature-window.is-dragging {
  cursor: grabbing;
  transition: box-shadow 180ms ease;
  user-select: none;
}

.feature-window.is-away-hidden {
  transform: translateX(calc(100% + 40px)) rotate(var(--intro-tilt)) scale(var(--intro-scale));
  pointer-events: none;
}

.window-bar {
  height: 54px;
  display: grid;
  grid-template-columns: 1fr 54px;
  border-bottom: 1px solid var(--line);
}

.window-bar p {
  margin: 0;
  padding: 16px 18px;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-bar button {
  position: relative;
  border: 0;
  border-left: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}

.window-bar button::before,
.window-bar button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 1px;
  background: var(--line);
}

.window-bar button::before { transform: translate(-50%, -50%) rotate(45deg); }
.window-bar button::after { transform: translate(-50%, -50%) rotate(-45deg); }

.window-bar button:hover,
.window-bar button:focus-visible {
  background: #000;
  outline: 0;
}

.window-bar button:hover::before,
.window-bar button:hover::after,
.window-bar button:focus-visible::before,
.window-bar button:focus-visible::after {
  background: #fff;
}

.feature-poster {
  min-height: 300px;
}

.intro-poster {
  position: relative;
  display: block;
  color: #fff;
  overflow: hidden;
  -webkit-user-drag: none;
}

.intro-poster img {
  width: 100%;
  height: 300px;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.intro-poster h2 {
  position: absolute;
  right: -12px;
  bottom: 16px;
  max-width: 320px;
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 0.98;
  text-align: right;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.42);
  transform: translate(var(--intro-text-drift), var(--intro-text-drop)) rotate(var(--intro-text-rotate));
  transition: transform 160ms cubic-bezier(0.12, 0.82, 0.18, 1.12);
  will-change: transform;
}

html[lang="en"] .intro-poster h2 {
  right: 18px;
}

.intro-poster h2 span {
  display: inline-block;
  transform: translate(0, 0) rotate(0deg);
  transform-origin: center;
  transition:
    font-size 180ms cubic-bezier(0.12, 0.82, 0.18, 1.12),
    margin 180ms cubic-bezier(0.12, 0.82, 0.18, 1.12),
    transform 180ms cubic-bezier(0.12, 0.82, 0.18, 1.12);
  will-change: font-size, margin, transform;
}

.poster-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}

.poster-head p { margin: 0; }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
  align-content: center;
}

.poster-grid span {
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 12%, transparent 13%), conic-gradient(from 90deg, var(--accent), transparent, var(--blue), transparent);
}

.feature-poster:not(.intro-poster) h2 {
  max-width: 460px;
  margin: 0;
  font-size: clamp(34px, 4vw, 62px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.works-section,
.about-section,
.contact-section {
  padding: 72px 0 0;
}

.about-section {
  border-top: var(--line-strong);
}

.section-title {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 18px;
  padding: 0 20px 18px;
}

.section-title p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.feature-window.is-closed {
  display: none;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.work-category-bar {
  display: flex;
  align-items: flex-end;
  min-height: 154px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.work-category-bar#design {
  border-top: var(--line-strong);
  margin-top: -1px;
}

.work-category-bar h3 {
  margin: 0;
  padding: 100px 20px 12px;
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
  font-weight: 800;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
}

.design-grid {
  border-top: 0;
}

.work-card {
  position: relative;
  min-height: 250px;
  height: 250px;
  display: grid;
  grid-template-rows: 150px 100px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.work-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  box-shadow:
    inset -1px 0 0 var(--line),
    inset 0 -1px 0 var(--line);
  pointer-events: none;
}

.design-grid .work-card[data-project="rainMatryoshka"]::before {
  box-shadow: inset -1px 0 0 var(--line);
}

.work-card::after {
  content: "open";
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 5;
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.work-card:hover::after,
.work-card:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.work-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.work-card.wide { grid-column: span 2; }
.work-card.tall { grid-row: span 1; min-height: 250px; }

.work-art,
.work-card img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  transform-origin: center;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.work-preview-image {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 100%;
  height: 150px;
  min-height: 150px;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 420ms ease,
    transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.work-preview-image.is-visible {
  opacity: 1;
}

.work-preview-image.is-fading {
  animation: workPreviewFade 1.5s ease-in-out forwards;
}

.work-preview-image.is-entering {
  animation: workPreviewEnter 1.5s ease-out forwards;
}

@keyframes workPreviewFade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes workPreviewEnter {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.work-card:hover .work-art,
.work-card:hover img,
.work-card:focus-visible .work-art,
.work-card:focus-visible img,
.work-card.is-opening .work-art,
.work-card.is-opening img {
  transform: scale(1.2);
}

.work-card.is-opening {
  z-index: 8;
}

.work-caption {
  position: relative;
  z-index: 2;
  height: 100px;
  display: grid;
  align-content: start;
  padding: 14px 14px 6px;
  background: #fff;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.work-caption p {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.work-caption h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-art { background: radial-gradient(circle at 25% 22%, #000 0 11%, transparent 12%), linear-gradient(135deg, #f7f7f7, #fff); }
.hud-art::before,
.hud-art::after,
.shop-art::before,
.product-art::before,
.system-art::before {
  content: "";
  position: absolute;
  inset: 42px;
  border: 1px solid var(--line);
}

.event-art { background: linear-gradient(145deg, var(--red), #ff9ca0 50%, #fff); }
.event-art::before {
  content: "";
  position: absolute;
  inset: 70px 34%;
  border-radius: 999px;
  background: #000;
  transform: rotate(18deg);
}

.shop-art {
  background:
    repeating-linear-gradient(90deg, transparent 0 18%, rgba(0, 0, 0, 0.08) 18% 18.5%, transparent 18.5% 25%),
    linear-gradient(135deg, #fff, #ebefff);
}

.icon-art {
  background:
    radial-gradient(circle at 28% 28%, #000 0 12%, transparent 13%),
    radial-gradient(circle at 70% 30%, var(--accent) 0 13%, transparent 14%),
    radial-gradient(circle at 35% 72%, var(--blue) 0 14%, transparent 15%),
    radial-gradient(circle at 75% 76%, var(--red) 0 13%, transparent 14%),
    #fff;
}

.product-art {
  background: linear-gradient(135deg, #f6f6f6, #dfeaff);
}

.poster-art {
  background:
    linear-gradient(90deg, #000 0 18%, transparent 18%),
    linear-gradient(145deg, #fff, #f5f5f5);
}

.poster-art::before {
  content: "TYPE";
  position: absolute;
  left: 32px;
  bottom: 46px;
  font-size: 84px;
  font-weight: 900;
  letter-spacing: -0.08em;
  transform: rotate(-12deg);
}

.system-art {
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    #fff;
  background-size: 64px 64px;
}

.about-body {
  padding: 58px 20px;
  border-top: 1px solid var(--line);
}

.about-body p {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(22px, 3.2vw, 36px);
  line-height: 1.42;
  letter-spacing: -0.02em;
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  border-top: 1px solid var(--line);
}

.resume-block {
  padding: 32px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.resume-block:nth-child(2n) {
  border-right: 0;
}

.resume-experience {
  grid-row: span 3;
}

.resume-label {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline article,
.education-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.timeline article:first-child,
.education-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.timeline h3,
.tool-columns h3,
.education-list h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.2;
}

.timeline p,
.tool-columns p,
.education-list p {
  margin: 0;
  color: var(--secondary);
  font-size: 15px;
  line-height: 1.65;
}

.timeline time,
.education-list time {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.skill-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  position: relative;
  padding-left: 18px;
  font-size: 17px;
  font-weight: 750;
  line-height: 1.45;
}

.skill-list li::before {
  content: "·";
  position: absolute;
  left: 0;
}

.tool-columns {
  display: grid;
  gap: 24px;
}

.contact-section {
  min-height: 560px;
  display: grid;
  align-content: center;
  border-bottom: 1px solid var(--line);
}

.contact-section > p {
  max-width: 880px;
  padding: 0 20px;
  font-size: clamp(28px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 28px 20px 0;
  font-size: 20px;
  font-weight: 800;
  align-items: center;
}

.project-modal[hidden] {
  display: none;
}

.idle-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  color: var(--text);
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
}

.idle-screen.is-active {
  opacity: 1;
  pointer-events: auto;
}

.idle-screen time {
  position: relative;
  display: inline-block;
  color: #fff;
  font-size: 300px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 0.5px #000;
  text-shadow:
    0.5px 0 0 #000,
    -0.5px 0 0 #000,
    0 0.5px 0 #000,
    0 -0.5px 0 #000;
}

.idle-screen time::after {
  content: attr(data-time);
  position: absolute;
  inset: 0;
  color: #fff;
  -webkit-text-stroke: 0;
  text-shadow: none;
  pointer-events: none;
}

.project-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  justify-items: center;
  align-items: start;
  padding: 30px 28px 28px;
}

.modal-dots {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 121;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  transform: translateX(-50%);
}

.modal-dot-filter {
  min-width: 0;
  min-height: 0;
  padding: 0 8px 0 0;
  border: 0;
  background: transparent;
  color: #8f8f8f;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.1;
}

.modal-dot-filter:hover,
.modal-dot-filter:focus-visible,
.modal-dot-filter.is-active {
  color: var(--text);
  outline: 0;
}

.modal-dot-list {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 12px;
}

.modal-dot-list:last-child {
  margin-right: 0;
}

.modal-dot-list button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #8f8f8f;
  cursor: pointer;
}

.modal-dot-list button.is-active {
  background: #000;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.modal-window {
  position: relative;
  z-index: 1;
  width: min(calc(100vw - 56px), max(320px, calc(100vw - 300px)));
  max-height: min(86vh, 920px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  grid-template-rows: 54px minmax(560px, auto) auto;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.22),
    0 12px 32px rgba(0, 0, 0, 0.16);
  overflow-x: hidden;
  overflow-y: auto;
}

.modal-bar {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 54px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.modal-bar::after {
  content: "";
  position: absolute;
  right: 53px;
  top: 0;
  width: 1px;
  height: 54px;
  background: var(--line);
  pointer-events: none;
}

.modal-bar p {
  margin: 0;
  padding: 16px 18px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-bar button {
  position: relative;
  border: 0;
  background: #fff;
  cursor: pointer;
  overflow: visible;
}

.modal-close-extension {
  display: none;
}

.modal-bar button::before,
.modal-bar button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 1px;
  background: var(--line);
}

.modal-bar button::before { transform: translate(-50%, -50%) rotate(45deg); }
.modal-bar button::after { transform: translate(-50%, -50%) rotate(-45deg); }

.modal-scroll-title {
  position: sticky;
  top: 0;
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  z-index: 12;
  margin: 0;
  padding: 15px 18px;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(-8px);
  transition: color 160ms ease, opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.modal-scroll-title.is-light {
  color: #fff;
}

.modal-scroll-title.is-dark {
  color: var(--text);
}

.modal-window.has-scroll-title .modal-scroll-title {
  opacity: 1;
  transform: translateY(0);
}

.modal-media {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  min-height: 560px;
  border-right: 1px solid var(--line);
  background: var(--soft);
}

.modal-media img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
  object-fit: cover;
}

.modal-gallery {
  grid-column: 1 / -1;
  grid-row: 3;
  min-width: 0;
  display: grid;
  gap: 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.modal-gallery img {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  display: block;
  border-bottom: 1px solid var(--line);
}

.modal-gallery iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #000;
}

.modal-gallery:empty {
  display: none;
}

.modal-gallery img:last-child,
.modal-gallery iframe:last-child {
  border-bottom: 0;
}

.modal-media .work-art {
  min-height: 560px;
}

.modal-content {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: clamp(26px, 5vw, 54px);
}

.modal-content > p:first-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-content h2 {
  margin: 0;
  font-size: var(--modal-title-size, clamp(38px, 5vw, 76px));
  line-height: 0.95;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.modal-content > p:nth-of-type(2) {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
}

.modal-content dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 28px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.modal-content div {
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.modal-content dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.modal-content dd {
  margin: 0;
  font-weight: 800;
}

.modal-nav {
  position: sticky;
  grid-column: 1 / -1;
  grid-row: 2;
  top: calc(50% - 30px);
  z-index: 6;
  height: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.modal-nav button {
  position: relative;
  width: 54px;
  height: 54px;
  min-height: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
}

.modal-nav button[data-modal-prev] {
  transform: translateX(-1px);
}

.modal-nav button[data-modal-next] {
  transform: translateX(1px);
}

.modal-nav button::before,
.modal-nav button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 1px;
  background: var(--line);
  transform-origin: center;
}

.modal-nav button[data-modal-prev]::before {
  transform: translate(-54%, calc(-50% - 9px)) rotate(-45deg);
}

.modal-nav button[data-modal-prev]::after {
  transform: translate(-54%, calc(-50% + 9px)) rotate(45deg);
}

.modal-nav button[data-modal-next]::before {
  transform: translate(-46%, calc(-50% - 9px)) rotate(45deg);
}

.modal-nav button[data-modal-next]::after {
  transform: translate(-46%, calc(-50% + 9px)) rotate(-45deg);
}

.modal-nav button:hover,
.modal-nav button:focus-visible {
  color: #fff;
  background: #000;
  outline: 0;
}

.modal-nav button:hover::before,
.modal-nav button:hover::after,
.modal-nav button:focus-visible::before,
.modal-nav button:focus-visible::after {
  background: #fff;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 14px;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    grid-column: 1;
    width: 100%;
    min-height: 280px;
    margin-top: 0;
  }

  .feature-window {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    box-shadow:
      0 20px 52px rgba(0, 0, 0, 0.18),
      0 8px 18px rgba(0, 0, 0, 0.12);
  }

  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .resume-grid {
    grid-template-columns: 1fr;
  }

  .resume-block,
  .resume-block:nth-child(2n) {
    border-right: 0;
  }

  .timeline article,
  .education-list article {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .timeline time,
  .education-list time {
    order: -1;
  }

  .profile-table div {
    border-bottom: 1px solid var(--line);
  }

  .modal-window {
    grid-template-columns: 1fr;
    grid-template-rows: 54px auto auto auto;
  }

  .modal-media {
    grid-column: 1;
    grid-row: 2;
    min-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .modal-content {
    grid-column: 1;
    grid-row: 3;
  }

  .modal-nav {
    grid-row: 2;
  }

  .modal-media img,
  .modal-media .work-art {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .brand span:last-child {
    display: none;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy {
    min-height: 280px;
  }

  .hero-copy-content {
    padding: 28px 28px 28px 18px;
  }

  .hero-symbol {
    margin-bottom: 38px;
  }

  .feature-poster {
    min-height: 300px;
  }

  .intro-poster img {
    height: 300px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .work-card.wide,
  .work-card.tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 250px;
  }

  .section-title {
    grid-template-columns: 1fr;
  }

  .project-modal {
    padding: 30px 12px 12px;
  }

  .modal-window {
    max-height: 90vh;
    grid-template-columns: 1fr;
    grid-template-rows: 54px auto auto auto;
    box-shadow:
      0 26px 70px rgba(0, 0, 0, 0.2),
      0 8px 24px rgba(0, 0, 0, 0.14);
  }

  .modal-media {
    grid-column: 1;
    grid-row: 2;
    min-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .modal-content {
    grid-column: 1;
    grid-row: 3;
  }

  .modal-content dl {
    grid-template-columns: 1fr;
  }

  .modal-gallery {
    grid-row: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-jitter span {
    transition: none;
  }
}
