/* Layout: full-bleed gapless 16:9 thumbnail wall; text pages sit in a narrow centered column. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --fg: #16181d;
  --muted: #6b707c;
  --line: #dcdfe5;
  --accent: #2448ff;
  --scrim: rgba(12, 14, 20, 0.72);
  --ok: #128a52;
  --warn: #c26a00;
  --font-display: "Archivo", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-body: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --gutter: max(16px, 3vw);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --surface: #171a20;
    --fg: #eceef2;
    --muted: #8f95a3;
    --line: #2a2e37;
    --accent: #7d93ff;
    --scrim: rgba(6, 7, 10, 0.78);
    --ok: #3ecf8a;
    --warn: #f0a640;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 22px var(--gutter);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line);
}
.avatar-empty {
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--muted);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.1; letter-spacing: 0.08em; }
.brand-role { font-size: 12px; line-height: 1.4; color: var(--muted); letter-spacing: 0.04em; }
@media (max-width: 560px) { .brand-name { font-size: 20px; } }
.nav { display: flex; gap: 28px; }
.nav a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--fg); }
@media (max-width: 560px) {
  .nav { flex-wrap: wrap; gap: 6px 18px; }
  .nav a { font-size: 12px; letter-spacing: 0.08em; }
}
.nav a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--fg); }

/* Intro + tabs */
.intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 0 var(--gutter) 20px;
  color: var(--muted);
  font-size: 14px;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 0 var(--gutter) 18px;
}
.tabs {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.controls { display: flex; flex: none; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.sorter { display: flex; flex: none; gap: 2px; }
.sorter + .sorter { padding-left: 20px; border-left: 1px solid var(--line); }

/* Month view */
.months { display: grid; gap: 40px; padding: 8px var(--gutter) 24px; }
.month-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.month-heading .count { font-size: 12px; font-weight: 400; color: var(--muted); }
.grid-month {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr));
  gap: 8px;
}
@media (max-width: 560px) {
  .grid-month { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
}
.grid-month .card { aspect-ratio: 1 / 1; border-radius: 4px; }
.grid-month .card-overlay { padding: 12px; }
.grid-month .card-title { font-size: 12px; }
.grid-month .card-cats { font-size: 10px; }
.sort-btn {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.sort-btn:hover { color: var(--fg); }
.sort-btn[aria-pressed="true"] { color: var(--fg); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  font: inherit;
  font-size: 13px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.tab:hover { border-color: var(--fg); }
.tab[aria-selected="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.tab .count { margin-left: 6px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tab[aria-selected="true"] .count { color: inherit; opacity: 0.7; }

/* Thumbnail wall */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: #fff;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 20px 28px;
  text-align: center;
  background: var(--scrim);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card-title { font-size: 15px; font-weight: 700; line-height: 1.5; text-wrap: balance; }
.card-cats {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0.75;
}
.card:hover .card-overlay, .card:focus-visible .card-overlay { opacity: 1; }
.card:hover img, .card:focus-visible img { transform: scale(1.04); }
.card:focus-visible { outline-offset: -3px; }

/* Touch screens have no hover: keep the title visible as a bottom band */
@media (hover: none) {
  .card-overlay {
    opacity: 1;
    inset: auto 0 0 0;
    align-items: flex-start;
    text-align: left;
    padding: 28px 14px 10px;
    background: linear-gradient(to top, var(--scrim), transparent);
  }
  .card-title { font-size: 13px; }
}

/* Placeholder thumb for works without an image (e.g. X-only posts) */
.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, 0.04) 14px 15px),
    #1b1e26;
  color: #c9cdd6;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}
.thumb-placeholder small { display: block; margin-top: 6px; font-family: var(--font-display); font-weight: 500; font-size: 11px; letter-spacing: 0.14em; color: #8f95a3; }

.empty { padding: 60px var(--gutter); color: var(--muted); text-align: center; }

/* Text pages */
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px var(--gutter) 80px;
}
.page-narrow { max-width: 760px; }
.back {
  display: inline-flex;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-decoration: none;
}
.back:hover { color: var(--fg); }
.eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 28px 0 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.tag { color: var(--accent); text-decoration: none; }
.tag:hover { text-decoration: underline; text-underline-offset: 3px; }
.eyebrow time { font-variant-numeric: tabular-nums; }
.page-title {
  margin: 0 0 32px;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.45;
  text-wrap: balance;
}

/* Media stack on the work page */
.media { display: grid; gap: 20px; }
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  background: #000;
  overflow: hidden;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.vertical { aspect-ratio: 9 / 16; width: min(100%, 400px); margin-inline: auto; }
.video.vertical:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; }
.video-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
.video-actions .button { font-size: 13px; padding: 7px 18px; }
.video-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}
.play::after {
  content: "";
  position: absolute;
  left: 29px;
  top: 23px;
  border-style: solid;
  border-width: 13px 0 13px 21px;
  border-color: transparent transparent transparent #fff;
}
.video-facade:hover .play { background: var(--accent); transform: scale(1.06); }
.facade-note {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

.x-embed {
  display: grid;
  place-items: center;
  gap: 14px;
  min-height: 220px;
  padding: 32px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.x-embed p { margin: 0; color: var(--muted); font-size: 13px; }
.x-embed .twitter-tweet { margin: 0 auto !important; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 22px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  cursor: pointer;
  text-decoration: none;
}
.button.ghost { background: transparent; color: var(--fg); }
.button:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.still { margin: 0; }
.still img { width: 100%; height: auto; background: var(--surface); }
.still figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* Comment | Credit split */
.details {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 32px 64px;
  margin-top: 48px;
}
@media (max-width: 760px) { .details { grid-template-columns: 1fr; } }
.section-label {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.comment p { margin: 0 0 1em; white-space: pre-line; overflow-wrap: anywhere; }
.comment a { color: var(--accent); }
.work-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.work-links a { color: var(--accent); }
.x-label { font-weight: 700; color: var(--fg) !important; }
.credits { margin: 0; }
.credits div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.credits dt { color: var(--muted); }
.credits dd { margin: 0; font-weight: 700; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.pager a { text-decoration: none; min-width: 0; }
.pager a:last-child { text-align: right; }
.pager span { display: block; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.pager strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager a:hover strong { color: var(--accent); }

/* Request page */
.lead { color: var(--muted); margin: -16px 0 40px; }
.block { margin-bottom: 48px; }
.block h2 { margin: 0 0 18px; font-size: 18px; }
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.services li { background: var(--surface); padding: 16px 18px; }
.services .head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-weight: 700; }
.services p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.level { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); white-space: nowrap; }
.level .off { color: var(--line); }
.checklist { margin: 0; padding-left: 1.6em; }
.checklist li { padding: 4px 0; }
.mailbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.mailbox code { font-family: var(--font-display); font-size: 17px; font-weight: 500; user-select: all; word-break: break-all; }
.note { font-size: 13px; color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tools li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }

/* Monthly availability */
.schedule {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 620px) { .schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.month {
  display: grid;
  gap: 2px;
  padding: 12px 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--status);
  text-align: center;
}
.month-year { min-height: 1.4em; font-family: var(--font-display); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.month-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.3; }
.month-status { font-size: 12px; font-weight: 700; color: var(--status); }
.month.is-open { --status: var(--ok); }
.month.is-few { --status: var(--warn); }
.month.is-full { --status: var(--muted); }
.month.is-full .month-name { color: var(--muted); }
.month.is-ask { --status: var(--accent); }

/* Shared big-heading pieces (profile, materials) */
.kicker {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.display-title {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--accent);
}

/* Profile page: icon left, text right; facts below */
.profile { margin: 16px 0 72px; }
.profile-top {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  align-items: center;
  gap: 32px 56px;
}
@media (max-width: 760px) { .profile-top { grid-template-columns: 1fr; } }
.profile-icon {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  height: auto;
  border-radius: 24px;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line);
}
@media (max-width: 760px) { .profile-icon { max-width: 160px; } }
.profile-icon.avatar-empty { display: grid; place-items: center; font-size: 72px; }
.profile-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: var(--accent);
}
.profile-role {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.profile-catch {
  margin: 24px 0;
  padding-block: 20px;
  border-block: 1px solid var(--line);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 700;
  line-height: 1.7;
  white-space: pre-line;
  text-wrap: balance;
}
.profile-body { margin-top: 28px; }
.profile-catch + .profile-body { margin-top: 0; }
.profile-body p { margin: 0 0 1em; font-size: 14px; }
.profile-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 32px 56px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 760px) { .profile-facts { grid-template-columns: 1fr; } }
.spec { margin: 0; }
.spec div {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.spec dt { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); padding-top: 2px; }
.spec dd { margin: 0; font-weight: 700; }
.records { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; font-size: 14px; }
.records a { text-decoration: none; }
.records a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* Materials page */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 32px 24px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.shop-item { display: grid; gap: 10px; align-content: start; text-decoration: none; }
.shop-badge { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.14em; color: var(--muted); }
.shop-thumb { display: block; aspect-ratio: 1 / 1; max-width: 100%; overflow: hidden; border-radius: 16px; background: #000; }
.shop-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.shop-item:hover .shop-thumb img { transform: scale(1.04); }
.shop-name { font-size: 15px; font-weight: 700; line-height: 1.6; }
.shop-item:hover .shop-name { color: var(--accent); }
.shop-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.shop-price { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--accent); }
.shop-more { margin-top: 40px; }

/* Links page */
.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.section-label + .link-list { border-top: 0; }
.link-list a, .link-list .disabled {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.link-list a:hover .link-label { color: var(--accent); }
.link-label { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.link-sub { display: block; font-size: 13px; color: var(--muted); }
.link-arrow { font-family: var(--font-display); color: var(--muted); }
.link-list .disabled { opacity: 0.5; }

.site-footer {
  padding: 32px var(--gutter);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
