:root {
  --ink: #173b63;
  --panel: #e8f0f8;
  --line: #b8cade;
  --paper: #f7f4eb;
  --muted: #61758b;
  --acid: #2f65ad;
  --blue: #72a6d8;
  --orange: #d25242;
}

body {
  background: #f7f4eb;
  color: #17324f;
  background-image:
    radial-gradient(circle at 8px 8px, rgba(47, 101, 173, .035) 1px, transparent 1.5px);
  background-size: 24px 24px;
}

.dr-cullen-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.skip-link,
.brand-mark,
.primary {
  background: var(--ink);
  color: #fffdf7;
}

.site-header {
  height: 84px;
  background: rgba(247, 244, 235, .94);
  border-color: var(--line);
}

.brand {
  flex: 0 0 auto;
}

.brand-logo {
  display: block;
  width: 167px;
  height: auto;
}

.site-header nav a { color: #61758b; }
.site-header nav a:hover,
.site-header nav a:focus { color: var(--ink); }
.availability span {
  background: #d25242;
  box-shadow: 0 0 0 5px rgba(210, 82, 66, .12);
}

.language-toggle {
  flex: 0 0 auto;
  border: 1px solid #9eb3c8;
  background: transparent;
  color: #173b63;
  padding: 8px 11px;
  font: 500 .7rem/1 "DM Mono", monospace;
  letter-spacing: .06em;
  cursor: pointer;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  background: #173b63;
  color: #fffdf8;
  outline: none;
}

html[lang="ja"] body {
  font-family: "Noto Sans JP", Manrope, system-ui, sans-serif;
  line-height: 1.8;
}

html[lang="ja"] h1,
html[lang="ja"] h2,
html[lang="ja"] h3 {
  letter-spacing: -.035em;
}

@media (max-width: 650px) {
  .site-header {
    height: 74px;
  }

  .brand-logo {
    width: 134px;
  }

  .availability { display: none; }

  .language-toggle { padding: 8px 9px; }
}

.hero {
  position: relative;
}

.hero::before { display: none; }

.eyebrow { color: #2f65ad; }
.hero h1 em,
.contact h2 em { color: #2f65ad; }
.intro { color: #526a83; }
.text-link { color: #173b63; }

.hero-game {
  position: relative;
  min-width: 0;
  align-self: stretch;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.game-title {
  position: absolute;
  top: 3px;
  left: 50%;
  z-index: 3;
  width: 100%;
  margin: 0;
  transform: translateX(-50%);
  color: #294968;
  text-align: center;
  font: 500 1.02rem/1.3 "Noto Sans JP", Manrope, sans-serif;
  letter-spacing: .015em;
}

.game-hud {
  position: absolute;
  inset: 66px 25px auto;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.game-hud p {
  width: 92px;
  margin: 0;
  padding: 10px 14px;
  background:
    radial-gradient(ellipse at center, rgba(163, 192, 221, .66) 0 54%, transparent 72%);
  color: #fffdf8;
  text-align: center;
  font: 400 .8rem/1.2 "DM Mono", monospace;
}

.game-hud span,
.game-hud strong { display: block; }
.game-hud strong { margin-top: 6px; font-size: 1rem; }

#panda-game {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  background: transparent;
  outline: none;
  touch-action: none;
  cursor: none;
}

#panda-game:focus-visible {
  outline: 2px dashed #7898b9;
  outline-offset: -8px;
}

.game-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  z-index: 3;
  margin: 0;
  transform: translateX(-50%);
  color: #56718c;
  white-space: nowrap;
  font: 400 .74rem/1.4 "DM Mono", monospace;
}

.game-controls span {
  margin: 0 10px;
  color: #173b63;
  font-size: 1.35rem;
}

.game-replay {
  position: absolute;
  top: 52%;
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  border: 1px solid #173b63;
  background: #fffdf8;
  color: #173b63;
  padding: 11px 18px;
  font: 600 .8rem Manrope, sans-serif;
  cursor: pointer;
}

.game-replay:hover,
.game-replay:focus-visible { background: #173b63; color: #fffdf8; }

.work-section {
  background: #fffdf8;
  color: #17324f;
  border-top: 1px solid #c9d7e5;
}
.work-section .eyebrow { color: #2f65ad; }
.section-heading > p,
.project-copy > p:not(.project-number) { color: #5a6f84; }
.filters { border-color: #c9d7e5; }
.filter { border-color: #9eb3c8; color: #173b63; }
.filter:hover,
.filter:focus-visible,
.filter.active {
  background: #173b63;
  color: #fffdf7;
  border-color: #173b63;
}
.project {
  background: #fffefb;
  border-color: #c6d3df;
  box-shadow: 0 10px 30px rgba(23, 59, 99, .055);
}
.project-number { color: #2f65ad; }
.tags li { border-color: #b8cade; }

.dialogue-visual { background: linear-gradient(145deg, #416f9f, #173b63); }
.speech { background: #fffdf7; border-color: #9db4ca; color: #173b63; }
.speech.one { color: #173b63; }
.speech.two { border-color: #f1b7ae; color: #b94235; }
.pulse { border-color: #f4cbc4; }
.pulse::after { background: #d25242; }
.choice-visual { background: #dfeaf4; }
.path { background: #6f8fac; }
.outcome { border-color: #d25242; color: #173b63; }
.project-visual > p { color: #56718c; }
.project-visual > p strong { color: #173b63; }
.explore-visual { background: linear-gradient(#b9d2e8 0 45%, #dfeaf4 45%); }
.horizon { background: #527ba4; }
.hotspot { color: #c84b3b; }
.action-visual { background: repeating-linear-gradient(90deg, #dfeaf4, #dfeaf4 39px, #d1e0ed 40px); }
.meter { background: #b8cade; }
.meter span,
.target i { background: #2f65ad; }
.target,
.target::before { border-color: #2f65ad; }
.feedback { color: #c84b3b; }
.input,
.response { color: #526a83; }

.approach { color: #17324f; }
.approach-intro > p:last-child,
.process p { color: #61758b; }
.process,
.process li { border-color: #b8cade; }
.process li > span { color: #c84b3b; }

.about {
  background: #173b63;
  color: #fffdf7;
  box-shadow: 18px 18px 0 #d8e5f1;
}
.portrait-card {
  background:
    linear-gradient(135deg, rgba(255,255,255,.42), transparent),
    #79a8d2;
  border-color: #9fc0de;
  overflow: hidden;
  isolation: isolate;
}
.about-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 63% 46%;
  transform: none;
  z-index: 0;
}
.portrait-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(transparent, rgba(8, 25, 43, .8));
  z-index: 1;
  pointer-events: none;
}
.portrait-initial { color: #fffdf7; }
.coordinate,
.about-copy > p { color: #c6d8e9; }
.coordinate { z-index: 2; color: #fffdf7; text-shadow: 0 1px 4px rgba(0,0,0,.55); }
.about-copy .large { color: #fffdf7; }
.about-note { border-left: 2px solid #d25242; padding-left: 18px; }
.skill-lines span { border-color: #6f91b2; }
.about-actions { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.about-button { min-width: 165px; background: #fffdf7; color: #173b63; }
.about-download { color: #dceaf5; font-size: .84rem; font-weight: 700; text-decoration: none; }
.about-download:hover,
.about-download:focus-visible { text-decoration: underline; }

.contact {
  background: #dceaf5;
  color: #17324f;
  border-top: 1px solid #b8cade;
  border-bottom: 1px solid #b8cade;
}
.contact .eyebrow { color: #c84b3b; }
.contact h2 em { color: #2f65ad; }
.light { background: #173b63; color: #fffdf7; }

footer {
  color: #61758b;
}

.project.featured.case-study-card {
  display: block;
  overflow: hidden;
}
.case-study-link {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  color: inherit;
  text-decoration: none;
}
.project-grid > .case-study-card:nth-child(even) .case-study-link {
  grid-template-columns: .8fr 1.2fr;
}
.project-grid > .case-study-card:nth-child(even) .project-copy {
  grid-column: 1;
  grid-row: 1;
}
.project-grid > .case-study-card:nth-child(even) .project-visual {
  grid-column: 2;
  grid-row: 1;
}
.rockclimb-visual {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
  background: #efd78b !important;
}
.rockclimb-visual .rockclimb-card-art {
  display: block;
  flex: 0 0 190%;
  width: 190%;
  max-width: none;
  height: 100%;
  margin-left: -90%;
  object-fit: cover;
  object-position: right center;
}
.case-study-cta {
  display: inline-block;
  margin-top: 24px;
  color: #2f65ad;
  font-weight: 700;
}
.case-study-link:hover .case-study-cta,
.case-study-link:focus-visible .case-study-cta { text-decoration: underline; }
.case-study-link:focus-visible { outline: 3px solid #2f65ad; outline-offset: -3px; }

@media (max-width: 850px) {
  .hero-game { min-height: 500px; }
  .about { box-shadow: 10px 10px 0 #d8e5f1; }
  .case-study-link { display: block; }
  .project-grid > .case-study-card:nth-child(even) .project-copy,
  .project-grid > .case-study-card:nth-child(even) .project-visual {
    grid-column: auto;
    grid-row: auto;
  }
  .rockclimb-visual { min-height: 0 !important; }
}

@media (max-width: 520px) {
  .hero-game { min-height: 420px; }
  .game-title { top: 12px; font-size: .88rem; }
  .game-hud { inset: 58px 5px auto; }
  .game-controls { bottom: 3px; font-size: .64rem; }
}

/* Category filtering takes precedence over featured card layout. */
.project-grid > .project.hidden { display: none; }

/* Technical capabilities and concise project contribution summaries. */
.capabilities{max-width:var(--max);margin:0 auto;padding:55px 28px 65px;border-top:1px solid var(--line)}
.capabilities-lead{display:grid;grid-template-columns:1fr 1fr;gap:60px;align-items:start;margin-bottom:32px}
.capabilities h2{font-size:clamp(2.1rem,3.7vw,3.4rem);line-height:1.05;letter-spacing:-.045em;font-weight:600;margin:0;max-width:550px}
.capabilities-lead>p{margin:0;color:#526a83;font-size:1rem;line-height:1.8;max-width:580px}
.capability-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:25px}
.capability{border-top:1px solid var(--line);padding-top:18px;min-width:0}
.capability-number{font:400 .68rem 'DM Mono',monospace;color:var(--acid)}
.capability h3{font-size:1.03rem;line-height:1.4;margin:12px 0 18px;letter-spacing:-.015em}
.capability ul{padding:0 0 0 16px;margin:0;color:#526a83;font-size:.87rem;line-height:1.7}
.capability li+li{margin-top:10px}.capability li::marker{color:var(--acid)}
.capability-note{margin:28px 0 0;max-width:950px;font-size:.8rem;line-height:1.7;color:var(--muted)}
.project-evidence{border-top:1px solid var(--line);margin:20px 0 0;padding-top:15px;font-size:.8rem;line-height:1.6}
.project-evidence>div+div{margin-top:12px}.project-evidence dt{font:500 .61rem/1.5 'DM Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:#2f65ad}
.project-evidence dd{margin:5px 0 0;color:#49617a;overflow-wrap:anywhere}
.case-evidence{display:grid;grid-template-columns:1fr 1fr;gap:30px;padding:22px 0;border-bottom:1px solid var(--line);margin-bottom:26px}
.case-evidence>div+div{margin-top:0}.case-evidence dd{font-size:.95rem}
@media(max-width:1000px){.capability-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 35px}}
@media(max-width:700px){.capabilities-lead{grid-template-columns:1fr;gap:24px}.capabilities{padding:40px 20px 45px}.capability-grid{gap:28px 22px}.capability h3{font-size:1rem}.capability ul{font-size:.85rem}}
@media(max-width:480px){.capability-grid,.case-evidence{grid-template-columns:1fr}.capability h3{margin-bottom:12px}.case-evidence{gap:18px}}

/* Keep the Playground tab reachable in the existing compact header. */
@media(max-width:850px){.site-header nav:has(a[href="playground.html"]){display:flex;gap:0}.site-header nav a{display:none}.site-header nav a[href="playground.html"]{display:inline;font-size:.75rem}.site-header{gap:12px}.site-header .language-toggle{flex-shrink:0}}
