:root {
  --bg: #07090d;
  --bg-2: #0d1118;
  --panel: #0f141c;
  --line: #1c2633;
  --text: #d8e3ef;
  --muted: #8a9ab0;
  --cyan: #2ff3ff;
  --magenta: #ff2d7a;
  --amber: #ffc53d;
  --mono: 'Share Tech Mono', 'Consolas', monospace;
  --sans: 'Noto Sans JP', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  background-image:
    linear-gradient(rgba(47,243,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,243,255,0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  position: relative;
}
body::after {
  content: "";
  pointer-events: none;
  position: fixed; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  z-index: 50;
}
body.legal { background-image: none; }
body.legal::after { display: none; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); letter-spacing: 0.04em; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7,9,13,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-family: var(--mono); font-size: 15px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--cyan); font-weight: 400; }
.brand .cursor { display: inline-block; width: 8px; height: 15px; background: var(--cyan); vertical-align: -2px; margin-left: 4px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.site-header nav a { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-left: 22px; }
.site-header nav a:hover { color: var(--cyan); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.hero .tag { font-family: var(--mono); color: var(--magenta); font-size: 13px; margin-bottom: 14px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.25; margin: 0 0 18px; font-weight: 700; letter-spacing: -0.01em; }
.hero h1 span { color: var(--cyan); text-shadow: 0 0 18px rgba(47,243,255,0.45); }
.hero h1 .h1-brand { display: block; font-family: var(--mono); font-size: 15px; font-weight: 400; letter-spacing: 0.18em; color: var(--muted); text-shadow: none; margin-bottom: 10px; }
.hero p { max-width: 640px; color: var(--muted); margin: 0 0 26px; font-size: 16px; }
.hero .links a {
  display: inline-block; font-family: var(--mono); font-size: 13px;
  padding: 9px 16px; border: 1px solid var(--line); color: var(--text);
  margin: 0 10px 10px 0; background: var(--panel);
}
.hero .links a:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; box-shadow: 0 0 0 1px rgba(47,243,255,0.25), 0 0 20px rgba(47,243,255,0.12); }
.hero .avatar { position: absolute; right: 20px; top: 0; width: 150px; height: 150px; border: 1px solid var(--line); background: var(--panel); object-fit: cover; }
.hero .avatar-frame { position: absolute; right: 20px; top: 0; width: 150px; height: 150px; pointer-events: none; }
.hero .avatar-frame::before, .hero .avatar-frame::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--cyan); }
.hero .avatar-frame::before { left: -4px; top: -4px; border-right: 0; border-bottom: 0; }
.hero .avatar-frame::after { right: -4px; bottom: -4px; border-left: 0; border-top: 0; }
.stats { display: flex; gap: 28px; margin-top: 10px; font-family: var(--mono); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.stats b { color: var(--amber); font-weight: 400; font-size: 20px; margin-right: 6px; }

/* sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 44px 0 18px; flex-wrap: wrap; gap: 12px; }
.section-head h2 { font-family: var(--mono); font-size: 14px; color: var(--muted); margin: 0; font-weight: 400; }
.section-head h2::before { content: "// "; color: var(--magenta); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  font-family: var(--mono); font-size: 12px; background: transparent; color: var(--muted);
  border: 1px solid var(--line); padding: 5px 12px; cursor: pointer;
}
.filters button.on, .filters button:hover { color: var(--cyan); border-color: var(--cyan); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-bottom: 72px; }
.card {
  display: block; background: var(--panel); border: 1px solid var(--line); color: var(--text);
  position: relative; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(47,243,255,0.25), 0 12px 40px rgba(0,0,0,0.5), 0 0 24px rgba(47,243,255,0.1); }
.card::before { content: ""; position: absolute; left: -1px; top: -1px; width: 16px; height: 16px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); opacity: 0; transition: opacity .15s; }
.card::after  { content: ""; position: absolute; right: -1px; bottom: -1px; width: 16px; height: 16px; border-bottom: 2px solid var(--magenta); border-right: 2px solid var(--magenta); opacity: 0; transition: opacity .15s; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card .thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border-bottom: 1px solid var(--line); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.9); transition: filter .2s, transform .3s; }
.card:hover .thumb img { filter: saturate(1.1); transform: scale(1.03); }
.card .thumb .kind { position: absolute; left: 10px; top: 10px; }
.kind { font-family: var(--mono); font-size: 11px; padding: 3px 8px; background: rgba(7,9,13,0.85); border: 1px solid var(--line); color: var(--cyan); letter-spacing: 0.06em; }
.kind.mobile { color: var(--amber); }
.kind.vr { color: var(--magenta); }
.card .body { padding: 14px 16px 16px; }
.card .year { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.card h3 { margin: 2px 0 6px; font-size: 17px; font-weight: 700; }
.card p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); min-height: 2.6em; }
.tags span { display: inline-block; font-family: var(--mono); font-size: 11px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); padding: 2px 8px; margin: 0 6px 6px 0; }

/* about */
.about-box { border: 1px solid var(--line); background: var(--panel); padding: 22px 24px; margin-bottom: 72px; max-width: 760px; }
.about-box p { margin: 0 0 10px; }
.about-box .stack { margin: 0; font-size: 12px; color: var(--muted); }

/* work detail */
.work-page { padding: 28px 20px 60px; }
.crumb { font-size: 12px; color: var(--muted); margin: 0 0 22px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--cyan); }
.crumb.back { margin-top: 40px; }
.work-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.work-meta .kind { margin-right: 8px; }
.work-page h1 { font-size: clamp(26px, 4vw, 40px); margin: 0 0 10px; line-height: 1.25; }
.work-page .lead { color: var(--muted); font-size: 16px; max-width: 720px; margin: 0 0 26px; }
.work-hero { border: 1px solid var(--line); background: #000; margin-bottom: 36px; }
.work-hero img { display: block; width: 100%; max-height: 560px; object-fit: contain; background: #000; }
.work-body { max-width: 820px; }
.work-body section { margin-bottom: 34px; }
.work-body h2 { font-size: 13px; color: var(--muted); font-weight: 400; margin: 0 0 10px; }
.work-body h2::before { color: var(--magenta); }
.work-body p { margin: 0 0 12px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-block; font-family: var(--mono); font-size: 13px; padding: 9px 16px; border: 1px solid var(--cyan); color: var(--cyan); background: var(--panel); }
.btn:hover { text-decoration: none; background: rgba(47,243,255,0.08); box-shadow: 0 0 20px rgba(47,243,255,0.15); }
.btn.sub { border-color: var(--line); color: var(--muted); }
.btn.sub:hover { border-color: var(--muted); }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.video { position: relative; padding-bottom: 56.25%; height: 0; border: 1px solid var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* legal (審査担当者が読むページ: 装飾なし・高コントラスト) */
.legal-page { padding: 28px 20px 60px; max-width: 860px; line-height: 1.9; }
.legal-page h1 { font-size: 26px; margin: 0 0 24px; }
.legal-page h2 { font-size: 19px; margin: 36px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.legal-page h3 { font-size: 16px; margin: 24px 0 8px; color: var(--cyan); }
.legal-page p { margin: 0 0 14px; }
.legal-page ul { margin: 0 0 16px; padding-left: 24px; }
.legal-page li { margin-bottom: 4px; }
.legal-page table { width: 100%; border-collapse: collapse; margin: 0 0 24px; }
.legal-page th, .legal-page td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.legal-page th { width: 200px; background: var(--panel); font-weight: 500; white-space: nowrap; }
.legal-page .updated { color: var(--muted); font-size: 13px; text-align: right; margin-top: 30px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--muted); margin-right: 18px; }
.site-footer a:hover { color: var(--cyan); }

@media (max-width: 720px) {
  .site-header .wrap { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 6px 0; }
  .brand .cmd { display: none; }
  .site-header nav { width: 100%; display: flex; gap: 16px; flex-wrap: wrap; }
  .site-header nav a { margin-left: 0; }
  .hero { padding: 36px 0 32px; }
  .hero .wrap { display: flex; flex-direction: column; }
  .hero h1 { padding-right: 0; }
  .hero .avatar { position: static; width: 84px; height: 84px; order: -1; margin-bottom: 16px; }
  .hero .avatar-frame { display: none; }
  .stats { gap: 18px; }
  .grid { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; }
  .legal-page th { width: auto; white-space: normal; }
  .legal-page th, .legal-page td { display: block; width: 100%; }
  .legal-page th { border-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand .cursor { animation: none; }
  .card, .card .thumb img { transition: none; }
}
