:root {
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.008 272.668);
  --ink: oklch(0.17 0.015 272.668);
  --muted: oklch(0.47 0.025 272.668);
  --primary: oklch(0.545982 0.082913 272.668);
  --primary-dark: oklch(0.37 0.075 272.668);
  --accent: oklch(0.774009 0.135188 47.493);
  --rule: oklch(0.86 0.012 272.668);
  --white: oklch(1 0 0);
  --header-h: 70px;
  --mobile-nav-h: 0px;
  --page-pad: clamp(22px, 4vw, 64px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sky-ink: var(--ink);
  --sky-muted: color-mix(in oklch, var(--ink) 64%, transparent);
  --z-sky: 0;
  --z-view: 10;
  --z-header: 30;
  --z-nav: 40;
  --z-skip: 50;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

html {
  background: var(--primary);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--primary);
  font-family: "Noto Sans SC", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body[data-sky-tone="dark"] {
  --sky-ink: var(--white);
  --sky-muted: color-mix(in oklch, var(--white) 74%, transparent);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

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

::selection {
  color: var(--white);
  background: var(--primary);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: var(--z-skip);
  padding: 10px 14px;
  color: var(--white);
  background: var(--primary-dark);
  transform: translateY(-150%);
  transition: transform 180ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

#sky-stage {
  position: fixed;
  inset: 0;
  z-index: var(--z-sky);
  overflow: hidden;
  background: var(--primary);
}

#weather-canvas,
.sky-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#weather-canvas {
  z-index: 2;
}

.sky-fallback {
  z-index: 1;
  background: var(--primary);
}

.masthead {
  position: fixed;
  top: max(0px, env(safe-area-inset-top));
  right: 0;
  left: 0;
  z-index: var(--z-header);
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(200px, 0.8fr) auto auto;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 var(--page-pad);
  background: color-mix(in oklch, var(--white) 86%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--ink) 12%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: max-content;
  min-height: 44px;
  padding: 0;
  background: transparent;
  font-weight: 780;
  cursor: pointer;
}

.wordmark-mark {
  width: 10px;
  height: 10px;
  background: var(--accent);
}

.weather-brief {
  display: flex;
  gap: 12px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.weather-brief span:first-child {
  color: var(--primary-dark);
  font-weight: 780;
}

.desktop-nav {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
  align-items: center;
  margin-right: clamp(18px, 2.5vw, 34px);
}

.desktop-nav button {
  position: relative;
  min-height: 44px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 680;
  cursor: pointer;
}

.desktop-nav button::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 260ms var(--ease);
}

.desktop-nav button:hover,
.desktop-nav button[aria-current="page"] {
  color: var(--ink);
}

.desktop-nav button:hover::after,
.desktop-nav button[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.language-switcher {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  border: 1px solid color-mix(in oklch, var(--ink) 20%, transparent);
}

.language-switcher button {
  min-height: 38px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  cursor: pointer;
}

.language-switcher button + button {
  border-left: 1px solid color-mix(in oklch, var(--ink) 20%, transparent);
}

.language-switcher button[aria-pressed="true"] {
  color: var(--white);
  background: var(--primary);
}

.view-stack {
  position: fixed;
  inset: 0;
  z-index: var(--z-view);
}

.view {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  padding: calc(var(--header-h) + clamp(24px, 4vh, 48px)) var(--page-pad) clamp(24px, 4vh, 48px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(4vw, 0, 0);
  transition:
    opacity 280ms ease,
    transform 480ms var(--ease),
    visibility 280ms;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.view.is-backward {
  transform: translate3d(-4vw, 0, 0);
}

.view-home {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(270px, 0.5fr);
  align-items: end;
  color: var(--sky-ink);
}

.view-home::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: color-mix(in oklch, var(--primary-dark) 8%, transparent);
  pointer-events: none;
}

.home-copy {
  align-self: center;
  max-width: 850px;
  padding-top: 4vh;
}

.home-status {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 24px;
  color: var(--sky-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px color-mix(in oklch, var(--accent) 24%, transparent);
}

.home-copy h1 {
  margin: 0;
  font-size: clamp(4.5rem, 9vw, 6rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 2px 18px color-mix(in oklch, var(--white) 20%, transparent);
}

body[data-sky-tone="dark"] .home-copy h1 {
  text-shadow: 0 2px 18px color-mix(in oklch, var(--ink) 45%, transparent);
}

.home-copy h1 small {
  display: block;
  margin-top: 18px;
  color: var(--accent);
  font-size: 0.38em;
  line-height: 1;
}

.home-lede {
  max-width: 38rem;
  margin: 32px 0 0;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  font-weight: 560;
  line-height: 1.7;
  text-wrap: pretty;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.action-primary,
.action-quiet {
  display: inline-flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 18px;
  font-weight: 760;
  cursor: pointer;
  transition: transform 180ms var(--ease), color 180ms ease, background 180ms ease;
}

.action-primary {
  min-width: 175px;
  color: var(--white);
  background: var(--primary);
}

.action-primary:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

.action-quiet {
  color: var(--sky-ink);
  background: color-mix(in oklch, var(--white) 74%, transparent);
  border: 1px solid color-mix(in oklch, var(--sky-ink) 24%, transparent);
}

.action-quiet[aria-pressed="true"] {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.demo-icon {
  font-size: 1.2rem;
}

.time-console {
  align-self: end;
  justify-self: end;
  display: grid;
  justify-items: end;
  padding-bottom: 8px;
  color: var(--sky-ink);
}

#clock-time {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 300;
  line-height: 1;
}

#clock-date {
  margin-top: 10px;
  color: var(--sky-muted);
  font-size: 0.76rem;
}

.weather-attribution {
  margin-top: 5px;
  color: var(--sky-muted);
  font-size: 0.58rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-index {
  position: absolute;
  right: var(--page-pad);
  bottom: 20px;
  left: var(--page-pad);
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  color: var(--sky-muted);
  border-top: 1px solid color-mix(in oklch, var(--sky-ink) 25%, transparent);
  font-size: 0.68rem;
}

.view-content {
  display: grid;
  grid-template-columns: minmax(180px, 0.65fr) minmax(0, 3.35fr);
  gap: clamp(30px, 5vw, 90px);
  color: var(--ink);
  background: color-mix(in oklch, var(--white) 96%, var(--primary) 4%);
}

.view-heading {
  align-self: start;
  padding-top: clamp(12px, 3vh, 32px);
}

.view-heading p {
  margin: 0 0 16px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 760;
}

.view-heading h2 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.view-heading.compact h2 {
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.about-layout {
  align-self: center;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.7fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center;
  min-height: 0;
}

.about-portrait {
  position: relative;
  width: min(100%, 330px);
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
}

.about-portrait::after {
  position: absolute;
  inset: 0;
  content: "";
  background: color-mix(in oklch, var(--primary) 18%, transparent);
  mix-blend-mode: multiply;
}

.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.about-portrait figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 1;
  padding: 3px 8px;
  color: var(--white);
  background: var(--primary);
  font-size: 0.68rem;
}

.about-copy {
  max-width: 820px;
}

.about-lead {
  max-width: 30ch;
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 3.15rem);
  font-weight: 680;
  line-height: 1.45;
  text-wrap: pretty;
}

.about-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 46px);
  max-width: 700px;
  margin-top: clamp(28px, 4vh, 54px);
  color: var(--muted);
  font-size: 0.88rem;
}

.about-detail p {
  margin: 0;
}

.project-stage {
  align-self: center;
  min-width: 0;
  min-height: 0;
}

.project-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(32px, 5vw, 82px);
  align-items: center;
  animation: project-enter 420ms var(--ease) both;
}

@keyframes project-enter {
  from {
    opacity: 0;
    transform: translateX(28px);
    filter: blur(5px);
  }
}

.project-copy {
  max-width: 760px;
}

.project-kicker {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 760;
}

.project-copy h3 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2rem, 4.6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.project-copy > p {
  max-width: 60ch;
  margin: 24px 0;
  color: var(--muted);
  font-size: clamp(0.88rem, 1.05vw, 1rem);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-tags li {
  color: var(--primary-dark);
  font-size: 0.74rem;
  font-weight: 760;
}

.project-link {
  display: inline-flex;
  gap: 24px;
  align-items: center;
  min-height: 44px;
  margin-top: 22px;
  border-bottom: 1px solid currentColor;
  font-weight: 760;
}

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

.project-link.is-private {
  color: var(--muted);
  border-bottom-style: dotted;
  cursor: default;
}

.project-visual {
  position: relative;
  width: 100%;
  min-height: min(47vh, 440px);
  overflow: hidden;
  background: var(--surface);
}

.visual-workflow {
  display: grid;
  align-content: center;
  padding: clamp(24px, 4vw, 48px);
  background: var(--primary-dark);
}

.workflow-track {
  display: flex;
  gap: 6px;
  height: 92px;
}

.workflow-track span {
  height: 100%;
  background: var(--white);
}

.workflow-track span:nth-child(1) { flex: 1.4; }
.workflow-track span:nth-child(2) { flex: 0.55; background: var(--accent); }
.workflow-track span:nth-child(3) { flex: 1.05; }
.workflow-track span:nth-child(4) { flex: 0.8; background: var(--primary); }
.workflow-track span:nth-child(5) { flex: 1.2; }

.workflow-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: color-mix(in oklch, var(--white) 76%, transparent);
  font-size: 0.66rem;
}

.visual-skill {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
}

.visual-skill span {
  display: grid;
  place-items: center;
  color: var(--white);
  border-right: 1px solid color-mix(in oklch, var(--white) 20%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--white) 20%, transparent);
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  font-weight: 800;
}

.visual-skill span:nth-child(2),
.visual-skill span:nth-child(6) {
  background: var(--primary);
}

.visual-skill span:nth-child(5) {
  color: var(--ink);
  background: var(--accent);
}

.visual-gobang {
  display: grid;
  place-items: center;
  background:
    linear-gradient(to right, transparent 49%, var(--primary-dark) 49%, var(--primary-dark) 51%, transparent 51%),
    linear-gradient(to bottom, transparent 49%, var(--primary-dark) 49%, var(--primary-dark) 51%, transparent 51%),
    var(--surface);
  background-size: 38px 38px;
}

.gobang-stones {
  position: relative;
  width: 210px;
  height: 180px;
}

.stone {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
}

.stone.light {
  background: var(--white);
  border: 1px solid var(--rule);
}

.stone:nth-child(1) { top: 8px; left: 8px; }
.stone:nth-child(2) { top: 46px; left: 46px; }
.stone:nth-child(3) { top: 84px; left: 84px; }
.stone:nth-child(4) { top: 122px; left: 122px; }
.stone:nth-child(5) { top: 46px; left: 122px; }
.stone:nth-child(6) { top: 84px; left: 160px; }

.visual-dali img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-system {
  display: grid;
  grid-template-columns: 1fr 1fr;
  color: var(--white);
  background: var(--primary-dark);
}

.visual-system span {
  display: grid;
  place-items: center;
  border-right: 1px solid color-mix(in oklch, var(--white) 22%, transparent);
  border-bottom: 1px solid color-mix(in oklch, var(--white) 22%, transparent);
  font-size: 2rem;
  font-weight: 800;
}

.visual-system span:last-child {
  color: var(--ink);
  background: var(--accent);
}

.project-controls {
  position: absolute;
  right: var(--page-pad);
  bottom: clamp(22px, 3vh, 38px);
  display: flex;
  gap: 12px;
  align-items: center;
}

.project-controls button {
  width: 46px;
  height: 46px;
  color: var(--white);
  background: var(--primary);
  cursor: pointer;
}

.project-controls button:hover {
  background: var(--primary-dark);
}

#project-counter {
  min-width: 62px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.skill-tabs {
  position: absolute;
  left: var(--page-pad);
  bottom: clamp(24px, 4vh, 46px);
  display: grid;
  width: min(190px, 17vw);
  gap: 6px;
}

.skill-tabs button {
  min-height: 42px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  cursor: pointer;
}

.skill-tabs button[aria-selected="true"] {
  color: var(--white);
  background: var(--primary);
  border-color: var(--primary);
}

.skill-stage {
  align-self: center;
}

.skill-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 80px);
  align-items: center;
  animation: project-enter 380ms var(--ease) both;
}

.skill-panel h3 {
  max-width: 12ch;
  margin: 0;
  color: var(--primary);
  font-size: clamp(2.5rem, 5.8vw, 5.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.skill-panel ul {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-panel li {
  padding: 10px 14px;
  color: var(--primary-dark);
  background: color-mix(in oklch, var(--primary) 12%, var(--white));
  font-size: clamp(0.8rem, 1.1vw, 1rem);
  font-weight: 720;
}

.experience-stage {
  align-self: center;
  display: grid;
  max-width: 1000px;
}

.experience-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(180px, 1fr) minmax(0, 2fr);
  gap: clamp(20px, 4vw, 60px);
  padding: clamp(18px, 2.8vh, 30px) 0;
  border-top: 1px solid var(--rule);
}

.experience-item:last-child {
  border-bottom: 1px solid var(--rule);
}

.experience-date {
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 760;
}

.experience-place {
  font-weight: 780;
}

.experience-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.view-contact {
  display: grid;
  align-content: center;
  color: var(--white);
  background: var(--primary-dark);
}

.view-contact::after {
  position: absolute;
  right: -9vw;
  bottom: -28vw;
  width: 56vw;
  height: 56vw;
  content: "";
  border: clamp(38px, 6vw, 90px) solid color-mix(in oklch, var(--primary) 60%, transparent);
  border-radius: 50%;
}

.contact-copy {
  position: relative;
  z-index: 1;
  max-width: 850px;
}

.contact-copy > p:first-child {
  margin: 0 0 22px;
  color: color-mix(in oklch, var(--white) 70%, transparent);
  font-size: 0.78rem;
}

.contact-copy h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.5rem, 7.5vw, 6rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-wrap: balance;
}

.contact-copy > p:not(:first-child) {
  max-width: 58ch;
  margin: 28px 0;
  color: color-mix(in oklch, var(--white) 77%, transparent);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-link {
  display: inline-flex;
  gap: 34px;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 20px;
  color: var(--ink);
  background: var(--white);
  font-weight: 760;
}

.contact-link:hover {
  background: var(--accent);
}

.contact-link.secondary {
  color: var(--white);
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--white) 46%, transparent);
}

.contact-link.secondary:hover {
  color: var(--ink);
  background: var(--accent);
  border-color: var(--accent);
}

.contact-address {
  position: absolute;
  right: var(--page-pad);
  bottom: 24px;
  left: var(--page-pad);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  color: color-mix(in oklch, var(--white) 58%, transparent);
  border-top: 1px solid color-mix(in oklch, var(--white) 24%, transparent);
  font-size: 0.68rem;
}

.mobile-nav {
  display: none;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 24px;
  color: var(--white);
  background: var(--primary-dark);
  place-items: center;
}

.not-found {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 100svh;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
  color: var(--white);
  background: var(--primary-dark);
}

.not-found > p {
  margin: 0 0 18px;
  color: var(--accent);
  font-weight: 800;
}

.not-found h1 {
  margin: 0 0 36px;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

@media (max-width: 1040px) {
  .masthead {
    grid-template-columns: minmax(130px, 0.7fr) 1fr auto;
  }

  .weather-brief {
    display: none;
  }

  .view-content {
    grid-template-columns: minmax(150px, 0.55fr) minmax(0, 3.45fr);
    gap: 34px;
  }

  .project-slide {
    grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr);
    gap: 30px;
  }
}

@media (max-width: 760px) {
  :root {
    --header-h: 60px;
    --mobile-nav-h: 72px;
    --page-pad: 18px;
  }

  .masthead {
    top: max(0px, env(safe-area-inset-top));
    grid-template-columns: 1fr auto;
    min-height: var(--header-h);
    padding-right: 14px;
    padding-left: 14px;
  }

  .desktop-nav,
  .weather-brief {
    display: none;
  }

  .language-switcher {
    grid-template-columns: repeat(3, 36px);
  }

  .language-switcher button {
    min-height: 36px;
  }

  .view {
    padding:
      calc(var(--header-h) + env(safe-area-inset-top) + 16px)
      var(--page-pad)
      calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 14px);
  }

  .view-home {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
  }

  .home-copy {
    align-self: stretch;
    padding: 0 0 12vh;
  }

  .home-status {
    margin-bottom: 16px;
    font-size: 0.72rem;
  }

  .home-copy h1 {
    font-size: clamp(3.7rem, 19vw, 5.5rem);
  }

  .home-copy h1 small {
    margin-top: 12px;
  }

  .home-lede {
    max-width: 31rem;
    margin-top: 24px;
    font-size: 0.96rem;
  }

  .home-actions {
    margin-top: 24px;
  }

  .action-primary,
  .action-quiet {
    min-height: 46px;
    gap: 18px;
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .time-console {
    position: absolute;
    top: calc(var(--header-h) + env(safe-area-inset-top) + 20px);
    right: var(--page-pad);
    align-self: auto;
  }

  #clock-time {
    font-size: 2rem;
  }

  #clock-date {
    max-width: 160px;
    font-size: 0.6rem;
    text-align: right;
  }

  .weather-attribution {
    font-size: 0.52rem;
  }

  .home-index {
    display: none;
  }

  .view-content {
    display: block;
  }

  .view-heading {
    display: flex;
    gap: 12px;
    align-items: baseline;
    padding: 0;
    margin-bottom: 18px;
  }

  .view-heading p {
    order: 2;
    margin: 0;
    font-size: 0.68rem;
  }

  .view-heading h2,
  .view-heading.compact h2 {
    font-size: clamp(2.1rem, 11vw, 3.2rem);
  }

  .about-layout {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 18px;
    align-items: start;
  }

  .about-portrait {
    width: 112px;
  }

  .about-copy {
    min-width: 0;
  }

  .about-lead {
    font-size: clamp(1.05rem, 4.8vw, 1.32rem);
    line-height: 1.5;
  }

  .about-detail {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 18px;
    font-size: 0.76rem;
  }

  .project-slide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-copy {
    display: contents;
  }

  .project-kicker {
    order: 1;
    margin: 0;
    font-size: 0.66rem;
  }

  .project-copy h3 {
    order: 2;
    max-width: 18ch;
    font-size: clamp(1.55rem, 8vw, 2.3rem);
  }

  .project-visual {
    order: 3;
    min-height: 0;
    height: min(25vh, 190px);
  }

  .project-copy > p {
    order: 4;
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-size: 0.74rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .project-tags {
    order: 5;
    gap: 4px 10px;
  }

  .project-tags li {
    font-size: 0.62rem;
  }

  .project-link {
    order: 6;
    width: max-content;
    min-height: 36px;
    margin: 0;
    font-size: 0.74rem;
  }

  .project-controls {
    right: var(--page-pad);
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 14px);
  }

  .project-controls button {
    width: 40px;
    height: 40px;
  }

  .skill-tabs {
    position: static;
    display: flex;
    width: 100%;
    gap: 4px;
    margin-bottom: 22px;
  }

  .skill-tabs button {
    flex: 1;
    min-width: 0;
    min-height: 40px;
    padding: 0 5px;
    border: 1px solid var(--rule);
    font-size: 0.68rem;
    text-align: center;
  }

  .skill-panel {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .skill-panel h3 {
    font-size: clamp(2.5rem, 13vw, 4rem);
  }

  .skill-panel li {
    padding: 8px 10px;
    font-size: 0.74rem;
  }

  .experience-stage {
    display: grid;
  }

  .experience-item {
    grid-template-columns: 0.72fr 1fr;
    gap: 5px 14px;
    padding: 14px 0;
  }

  .experience-copy {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    line-height: 1.5;
  }

  .experience-date {
    font-size: 0.66rem;
  }

  .experience-place {
    font-size: 0.78rem;
  }

  .view-contact {
    align-content: center;
  }

  .view-contact::after {
    right: -38vw;
    bottom: -16vw;
    width: 108vw;
    height: 108vw;
    border-width: 46px;
  }

  .contact-copy h2 {
    font-size: clamp(2.8rem, 14vw, 4.4rem);
  }

  .contact-copy > p:not(:first-child) {
    margin: 22px 0;
    font-size: 0.82rem;
  }

  .contact-link {
    min-height: 46px;
    padding: 0 14px;
    font-size: 0.78rem;
  }

  .contact-address {
    right: var(--page-pad);
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 10px);
    left: var(--page-pad);
    font-size: 0.58rem;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-nav);
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    min-height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    padding: 4px 6px max(4px, env(safe-area-inset-bottom));
    background: color-mix(in oklch, var(--white) 92%, transparent);
    border-top: 1px solid color-mix(in oklch, var(--ink) 16%, transparent);
    backdrop-filter: blur(12px);
  }

  .mobile-nav button {
    display: grid;
    align-content: center;
    justify-items: center;
    min-width: 0;
    min-height: 56px;
    padding: 0 2px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
  }

  .mobile-nav button > span {
    font-size: 1rem;
    line-height: 1;
  }

  .mobile-nav button small {
    max-width: 100%;
    margin-top: 5px;
    overflow: hidden;
    font-size: 0.56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav button[aria-current="page"] {
    color: var(--primary-dark);
  }

  .mobile-nav button[aria-current="page"] > span {
    color: var(--accent);
  }
}

@media (max-width: 380px), (max-height: 700px) {
  .home-copy {
    padding-bottom: 7vh;
  }

  .home-copy h1 {
    font-size: 3.6rem;
  }

  .home-lede {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .project-visual {
    height: 20vh;
  }

  .about-lead {
    font-size: 1rem;
  }

  .about-detail {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
