:root {
  --ink: #0f172a;
  --ink2: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --accent: #2563eb;
  --accent2: #7c3aed;
  --good: #059669;
  --r: 18px;
  --shadow: 0 1px 2px rgb(15 23 42 / .05), 0 8px 24px rgb(15 23 42 / .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 16px/1.75 "Inter", "Noto Sans JP", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "palt";
}
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sp { display: none; }
@media (max-width: 640px) { .sp { display: inline; } .pc { display: none; } }

/* ナビ */
.nav {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: rgb(11 16 38 / .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff;
}
.nav a { color: inherit; text-decoration: none; }
.brand { font: 800 16px "Inter"; letter-spacing: .02em; white-space: nowrap; }
.nav nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.nav nav a { opacity: .8; } .nav nav a:hover { opacity: 1; }
.nav .nav-about { opacity: 1; padding: 5px 12px; border-radius: 99px; border: 1px solid rgb(255 255 255 / .35); }
@media (max-width: 560px) {
  .nav nav { gap: 12px; font-size: 13px; }
  .nav nav a[href="#infra"], .nav nav a[href="#stack"] { display: none; }
}

/* ヒーロー（背景に画像） */
.hero {
  position: relative; color: #fff; margin-top: -56px; padding: 100px 0 48px; overflow: hidden;
  background:
    linear-gradient(90deg, rgb(8 12 32 / .92) 0%, rgb(8 12 32 / .7) 45%, rgb(8 12 32 / .15) 100%),
    linear-gradient(0deg, rgb(8 12 32 / .9) 0%, transparent 40%),
    url("img/hero.webp") center right / cover no-repeat, #0b1026;
}
@media (max-width: 640px) {
  .hero {
    padding: 84px 0 36px;
    background:
      linear-gradient(180deg, rgb(8 12 32 / .3) 0%, rgb(8 12 32 / .7) 50%, rgb(8 12 32 / .95) 100%),
      url("img/hero.webp") 72% center / cover no-repeat, #0b1026;
  }
}
.eyebrow { font: 600 12px/1 "Inter"; letter-spacing: .2em; text-transform: uppercase; color: #a5b4fc; margin: 0 0 14px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 900; letter-spacing: -.01em; text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.hero .lead { max-width: 600px; color: #cbd5e1; font-size: clamp(14px, 1.8vw, 16px); margin: 14px 0 22px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 680px; }
.kpis div {
  padding: 10px 14px; border: 1px solid rgb(255 255 255 / .14); border-radius: 14px;
  background: rgb(255 255 255 / .06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.kpis b { display: block; font: 800 clamp(20px, 3vw, 24px)/1.1 "Inter", "Noto Sans JP"; }
.kpis span { font-size: 12px; color: #a3aec2; }
@media (max-width: 640px) { .kpis { gap: 6px; } .kpis div { padding: 8px 10px; } .kpis span { font-size: 10px; } }
.about-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; padding: 9px 18px; border-radius: 99px;
  background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none;
  box-shadow: 0 8px 28px rgb(99 102 241 / .35); transition: transform .15s;
}
.about-btn:hover { transform: translateY(-2px); }
.about-btn i { font-style: normal; color: var(--accent2); }

/* セクション見出し */
section { padding: 48px 0; }
.sec-title { font-size: clamp(21px, 3vw, 28px); font-weight: 900; margin-bottom: 8px; display: flex; align-items: baseline; gap: 12px; }
.sec-title span { font: 800 14px "Inter"; color: var(--accent); }
.sec-lead { color: var(--ink2); margin: 0 0 24px; font-size: 14px; }

/* プロジェクトの一覧（アイコン・名前・説明。押すと下に中身） */
.plist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pitem { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 70px; }
.prow {
  width: 100%; display: grid; grid-template-columns: 52px 1fr 18px; align-items: center; gap: 14px;
  padding: 12px 16px 12px 12px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.prow:hover { background: #f8fafc; }
.picon { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 0 0 1px rgb(15 23 42 / .06); object-fit: cover; }
.ptext { min-width: 0; }
.ptext b { font-size: 16px; font-weight: 800; color: #1e3a8a; }
.ptext small { display: block; font-size: 13px; color: var(--ink2); line-height: 1.5; margin-top: 2px; }
.chev { width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
.pitem.open .chev { transform: rotate(-135deg); margin-top: 4px; }
.pitem.open .prow { background: #f8fafc; }
@media (max-width: 560px) {
  .prow { grid-template-columns: 44px 1fr 14px; gap: 12px; }
  .picon { width: 44px; height: 44px; border-radius: 10px; }
}

.pdetail { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.1fr 1fr; animation: fade .25s ease; }
.pdetail[hidden] { display: none; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }
.pdetail .media { background: linear-gradient(135deg, #e0e7ff, #f1f5f9 60%, #ede9fe); padding: 32px 28px; display: flex; align-items: center; justify-content: center; }
.pbody { padding: 24px 28px 28px; }
@media (max-width: 860px) {
  .pdetail { grid-template-columns: 1fr; }
  .pdetail .media { padding: 24px 18px; }
  .pbody { padding: 20px 18px 24px; }
}
.pbody .lead { color: var(--ink2); margin: 0; font-size: 15px; }
.purl { margin: 8px 0 0; font-size: 14px; font-weight: 700; }
.purl a { color: var(--accent); text-decoration: none; }
.part { padding: 0; margin-top: 18px; }
.part.first { margin-top: 0; }
.browser.solo { margin: 0; width: 100%; }
.part h4 { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; display: flex; justify-content: space-between; }
.points { margin: 0; padding-left: 1.1em; font-size: 14px; color: var(--ink2); line-height: 1.7; }
.points li { margin-bottom: 5px; } .points li::marker { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.tags li { font: 500 12px/1 "Inter", "Noto Sans JP"; padding: 6px 10px; border-radius: 8px; background: #f1f5f9; color: #334155; }

/* 画面（ブラウザ枠 + iPhone 風） */
.shots { position: relative; width: 100%; padding-bottom: 14px; container-type: inline-size; }
.browser { margin: 0 15cqw 0 0; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgb(15 23 42 / .18); }
.bar3 { display: flex; gap: 6px; padding: 9px 12px; background: #e2e8f0; }
.bar3 i { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.browser img, .browser video { display: block; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; cursor: zoom-in; }
.browser video, .iphone video { cursor: default; background: #fff; }

.iphone {
  --w: 150px;
  position: relative; width: var(--w); margin: 0; flex: none;
  aspect-ratio: 390 / 844; padding: calc(var(--w) * .035);
  border-radius: calc(var(--w) * .17);
  background: #111;
  box-shadow:
    0 0 0 1.5px #8e8e93, 0 0 0 3px #2c2c2e,           /* チタンの縁 */
    inset 0 0 0 1px rgb(255 255 255 / .08),
    0 18px 40px rgb(15 23 42 / .35);
}
.iphone::before { /* Dynamic Island */
  content: ""; position: absolute; z-index: 2; top: calc(var(--w) * .055); left: 50%; transform: translateX(-50%);
  width: 30%; height: calc(var(--w) * .085); border-radius: 99px; background: #000;
}
.iphone::after { /* 横のボタン */
  content: ""; position: absolute; right: -4.5px; top: 28%; width: 3px; height: 14%; border-radius: 0 2px 2px 0; background: #3a3a3c;
}
.iphone .screen { width: 100%; height: 100%; border-radius: calc(var(--w) * .135); overflow: hidden; background: #fff; padding-top: calc(var(--w) * .1); }
.iphone img, .iphone video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; cursor: zoom-in; background: #fff; }
/* スマホの高さを PC の画面より少し低く（PC の高さ = 85cqw × 10/16 + バー 26px、その 9 割） */
.shots .iphone { position: absolute; right: 0; bottom: 0; --w: calc((53.1cqw + 26px) * 390 / 844 * .9); }
.only-phone { gap: 24px; }
.only-phone .iphone { --w: 190px; }

/* インフラ */
.infra { background: #0b1026; color: #e2e8f0; }
.infra .sec-lead { color: #94a3b8; }
.infra .sec-title span { color: #a5b4fc; }
.diagram { display: flex; align-items: stretch; margin-bottom: 28px; }
.node { flex: 1; padding: 16px; border-radius: 14px; border: 1px solid #334155; background: #1e293b; font-weight: 700; font-size: 15px; }
.node small { display: block; font-size: 11px; font-weight: 600; color: #a5b4fc; letter-spacing: .05em; }
.node em { display: block; font-style: normal; font-weight: 400; font-size: 12px; color: #94a3b8; margin-top: 6px; }
.node.main { flex: 1.4; border-color: #6366f1; background: linear-gradient(135deg, #1e3a8a, #3b0764); }
.arrow { flex: .7; display: flex; align-items: center; justify-content: center; position: relative; padding: 0 6px; }
.arrow::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed #475569; }
.arrow span { position: relative; background: #0b1026; font-size: 11px; color: #94a3b8; text-align: center; padding: 2px 6px; line-height: 1.5; }
@media (max-width: 760px) {
  .diagram { flex-direction: column; }
  .arrow { min-height: 60px; }
  .arrow::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px dashed #475569; }
}
.infra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 400px) { .infra-grid { grid-template-columns: 1fr; } }
.infra-card { padding: 20px; border-radius: 16px; background: #141b34; border: 1px solid #2a3352; }
.infra-card h3 { font-size: 16px; margin: 0 0 8px; color: #fff; }
.infra-card p { font-size: 13.5px; color: #cbd5e1; margin: 0 0 12px; line-height: 1.7; }

/* 技術（分類の切り替え + 表） */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 18px 0 0; border-bottom: 1px solid var(--ink); }
.tabs button {
  font: 700 14px "Noto Sans JP"; padding: 8px 14px 9px; cursor: pointer; border: 0; background: none; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--c); }
.stack-panel { animation: fade .2s ease; }
.stack-panel ul { list-style: none; margin: 0; padding: 0; }
.stack-panel li { display: grid; grid-template-columns: minmax(180px, 34%) 1fr; gap: 4px 24px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.stack-panel b { font-size: 15px; font-weight: 700; color: var(--ink); }
.stack-panel span { font-size: 14px; color: var(--ink2); line-height: 1.6; }
@media (max-width: 640px) { .stack-panel li { grid-template-columns: 1fr; padding: 11px 0; } .tabs button { padding: 7px 10px 8px; font-size: 13px; } }

/* 私について */
.hero-sm { padding: 96px 0 40px; }
.hero-sm h1 { font-size: clamp(28px, 5vw, 44px); }
.hero-sm .lead { margin-bottom: 0; }
.about-body { padding-top: 40px; padding-bottom: 40px; max-width: 760px; }
.about-sec { padding: 0; margin-bottom: 32px; }
.about-sec h2 { font-size: 13px; font-weight: 800; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; }
.about-sec p { margin: 0; color: var(--ink2); }
.about-list { margin: 0; padding-left: 1.2em; color: var(--ink2); }
.about-list li::marker { color: var(--accent); }
.about-tags, .about-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.about-tags li { font-size: 13px; padding: 4px 12px; border-radius: 99px; background: #eff6ff; color: #1d4ed8; }
.about-links a { display: inline-block; padding: 8px 18px; border-radius: 99px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; }

/* フッター・拡大表示 */
.foot { padding: 36px 0 56px; font-size: 13px; color: var(--ink2); border-top: 1px solid var(--line); }
.foot p { margin: 0 0 4px; } .foot a { color: var(--accent); } .muted { color: var(--muted); }
dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog::backdrop { background: rgb(15 23 42 / .85); }
dialog img { max-width: 96vw; max-height: 92vh; border-radius: 10px; }
dialog button {
  position: fixed; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: #fff; font-size: 22px; cursor: pointer;
}

/* 技術の色分け */
.t-dev   { --c: #2563eb; --bg: #eff6ff; --fg: #1e40af; }
.t-llm   { --c: #9333ea; --bg: #faf5ff; --fg: #6b21a8; }
.t-ml    { --c: #db2777; --bg: #fdf2f8; --fg: #9d174d; }
.t-cloud { --c: #ea580c; --bg: #fff7ed; --fg: #9a3412; }
.t-infra { --c: #0d9488; --bg: #f0fdfa; --fg: #115e59; }
.t-iot   { --c: #16a34a; --bg: #f0fdf4; --fg: #166534; }
.tags li[class^="t-"] { background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }
.tags li[class^="t-"]::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.infra-card .tags li[class^="t-"] { background: color-mix(in srgb, var(--c) 22%, #141b34); color: #f1f5f9; box-shadow: none; }
