/* 老丁 · 个人站样板 — full-bleed / 极简大气 · 自适应铺满 */
:root {
  --bg: #0c0c0d;
  --bg-soft: #141416;
  --bg-card: #121214;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f4f0e8;
  --text-muted: #9b968c;
  --text-dim: #6a665e;
  --accent: #cbb489;
  --accent-soft: rgba(203, 180, 137, 0.12);
  --radius: 14px;
  --wrap: 1320px;
  --hero-wrap: 1240px;
  --narrow: 38rem; /* ~ readable 50–56ch */
  --pad: clamp(1.25rem, 4vw, 3rem);
  --header-h: 64px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(16px, 0.95vw + 14px, 18px);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: #e0cc9e; }

code {
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--text-muted);
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #111; padding: 0.5rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Fluid shell — content spans wide screens, edges get padding not gutters */
.wrap {
  width: min(100% - (var(--pad) * 2), var(--wrap));
  margin-inline: auto;
}
.narrow {
  width: min(100% - (var(--pad) * 2), var(--narrow));
  margin-inline: auto;
}

/* Header — edge to edge bar, content uses wrap */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  width: 100%;
  background: rgba(12, 12, 13, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
  height: 100%;
  display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem);
}

.brand {
  color: var(--text);
  font-weight: 600;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.12rem);
  letter-spacing: 0.12em;
}
.brand:hover { color: var(--text); }

.nav {
  margin-left: auto;
  display: flex; gap: clamp(1rem, 2vw, 1.75rem);
}
.nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
}
.nav a:hover { color: var(--text); }

.header-cta {
  font-size: 0.82rem;
  color: #1a170f;
  background: var(--accent);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}
.header-cta:hover { color: #1a170f; background: #e0cc9e; }

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px; cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block; width: 15px; height: 1.5px; background: var(--text);
}

/* Hero — full-viewport stage, atmosphere to screen edges */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(3rem, 7vh, 5.5rem) 0 clamp(3.5rem, 8vh, 6rem);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  width: 100%;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 12% 40%, rgba(203, 180, 137, 0.09), transparent 55%),
    radial-gradient(ellipse 55% 50% at 88% 30%, rgba(120, 140, 180, 0.07), transparent 50%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(203, 180, 137, 0.04), transparent 60%),
    linear-gradient(180deg, #0c0c0d 0%, #101014 48%, #0c0c0d 100%);
  pointer-events: none;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 42%, rgba(203, 180, 137, 0.05), transparent 28%);
  pointer-events: none;
  z-index: 0;
}
.hero > .wrap {
  position: relative;
  z-index: 1;
  /* composed cluster — bg stays full-bleed, content capped & centered */
  width: min(100% - (var(--pad) * 2), var(--hero-wrap));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(200px, 0.55fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: center;
  width: 100%;
}

.eyebrow, .section-kicker {
  margin: 0 0 1.1rem;
  font-size: clamp(0.7rem, 0.2vw + 0.65rem, 0.78rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(3.2rem, 4.5vw + 1.2rem, 5.25rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.02;
}
.belief {
  margin: 0 0 1.5rem;
  font-size: clamp(1.2rem, 1.4vw + 0.7rem, 1.65rem);
  line-height: 1.5;
  font-weight: 500;
  color: var(--text);
  max-width: min(28em, 100%);
  text-wrap: pretty;
}
.belief .nowrap { white-space: nowrap; }
.hero-bio {
  margin: 0 0 2.25rem;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 0.35vw + 0.9rem, 1.12rem);
  max-width: min(40em, 100%);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-portrait {
  justify-self: end;
  width: min(100%, clamp(200px, 17vw, 300px));
}
.upload-slot--portrait {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  border: 1px dashed rgba(203, 180, 137, 0.35);
  background:
    radial-gradient(circle at 50% 40%, rgba(203, 180, 137, 0.1), transparent 55%),
    var(--bg-soft);
  overflow: hidden;
}
.upload-slot--portrait img {
  width: 100%; height: 100%; object-fit: cover;
}
.upload-slot--portrait .upload-slot__empty {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
}
.portrait-mark {
  font-size: clamp(2.8rem, 4vw, 4.2rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  opacity: 0.85;
}
.upload-slot__link {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(203, 180, 137, 0.45);
}
.upload-slot__link:hover { opacity: 0.85; }
.portrait-caption {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: 0.2s var(--ease);
}
.btn-primary { background: var(--accent); color: #1a170f; }
.btn-primary:hover { background: #e0cc9e; color: #1a170f; }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Sections — fluid vertical rhythm, full-width bands */
.section {
  padding: clamp(4rem, 9vw, 8rem) 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.section-head {
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  max-width: min(42em, 100%);
}
.section-head h2,
.about h2,
.contact h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 2.2vw + 1rem, 2.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.section-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 0.3vw + 0.9rem, 1.08rem);
}

/* About prose */
.prose p {
  margin: 0 0 1.35rem;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 0.35vw + 0.92rem, 1.14rem);
}
.prose p:last-child { margin-bottom: 0; }


/* Timeline base (起拆造讲) */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.timeline li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--text-muted);
}
.timeline span {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* About — 「关于」在上；标题与「起拆造讲」左右顶齐、对称 */
.about > .wrap {
  width: min(100% - (var(--pad) * 2), var(--wrap));
}
.about-head {
  max-width: none;
  margin-bottom: clamp(1.1rem, 1.8vw, 1.5rem);
}
.about-head .section-kicker {
  margin-bottom: 0;
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.25rem, 5vw, 4.5rem);
  align-items: stretch; /* 左右同高，避免一高一低 */
}
.about-story,
.about-method {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.about-story h2 {
  margin: 0 0 1.15rem;
  max-width: min(42rem, 100%);
}
.about .prose {
  max-width: none;
  flex: 1;
}
.about-method {
  padding-top: 0;
}
.about .timeline {
  max-width: none;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 间距铺开，顶底与左栏齐 */
  border-top: none; /* 避免顶线把「起」顶下去 */
  border-bottom: 1px solid var(--line);
}
.about .timeline li {
  padding: 0.85rem 0;
  flex: 0 0 auto; /* 不拉高单项，避免起被垂直居中下沉 */
  align-items: start;
  border-top: 1px solid var(--line);
}
.about .timeline li:first-child {
  padding-top: 0; /* 起 与左标题顶齐 */
  border-top: none;
}
.about .timeline li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.about .prose p {
  margin: 0 0 1.05rem;
}
.about .prose p:last-child {
  margin-bottom: 0;
}
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.75rem, 4vw, 2.5rem);
    align-items: start;
  }
  .about .timeline {
    margin-top: 0.25rem;
    justify-content: flex-start;
  }
  .about .timeline li:first-child { padding-top: 0.95rem; }
  .about .timeline li:last-child { padding-bottom: 0.95rem; }
}

/* Outcomes — 1→2→3 */
.outcomes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.outcome { padding: 0.25rem 0.25rem 0.5rem; }
.outcome-num {
  display: block;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.16em;
}
.outcome h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.1rem, 0.5vw + 1rem, 1.35rem);
  font-weight: 600;
}
.outcome p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Works — card grid 1→2→3→4 fills wide screens */
.work-group { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.work-group:last-child { margin-bottom: 0; }
.work-group-title {
  margin: 0 0 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  font-weight: 500;
  text-transform: uppercase;
}
.work-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 2vw, 1.75rem);
}
/* 四款软件：对标技能包 — 双列大卡、更松边距，全屏/宽屏友好 */
.work-group--software .work-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.work-group--software .work-visual img {
  aspect-ratio: 16 / 10;
}
.work-group--software .work-text h4 {
  font-size: clamp(1.08rem, 0.35vw + 1rem, 1.28rem);
}
.work-group--software .work-text p {
  font-size: 0.98rem;
  max-width: 36em;
}
@media (min-width: 1100px) {
  .work-group--wide .work-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .work-group--software .work-list {
    grid-template-columns: 1fr;
  }
}

.work-row {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  align-items: stretch;
  min-width: 0;
}
.work-visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  max-width: none;
  width: 100%;
}
.work-visual::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.work-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
  filter: saturate(0.92) brightness(0.92);
  opacity: 0.92;
  transition: opacity 0.35s var(--ease), filter 0.35s var(--ease);
}
.work-row:hover .work-visual img {
  opacity: 1;
  filter: saturate(1) brightness(1);
}
.work-text h4 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.02rem, 0.3vw + 0.95rem, 1.18rem);
  font-weight: 600;
}
.work-text p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: none;
}
.work-tag {
  margin: 0 0 0.4rem !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.12em;
  color: var(--accent) !important;
}
.work-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.text-link {
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}
.work-row--featured { grid-column: span 1; }
@media (min-width: 1100px) {
  .work-group--wide .work-row--featured { grid-column: span 2; }
}
.work-row--featured .work-text h4 { font-size: clamp(1.15rem, 0.4vw + 1.05rem, 1.4rem); }
.work-row--featured .work-visual img { aspect-ratio: 16 / 9; }

/* Lessons — fill capped measure evenly (10 → 5+5 on desktop) */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 1.6vw, 1.35rem);
}
@media (max-width: 1099px) {
  .lesson-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .lesson-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.lesson-card { scroll-margin-top: calc(var(--header-h) + 24px); min-width: 0; }
.lesson-meta {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.lesson-meta span {
  color: var(--accent);
  margin-right: 0.4rem;
  letter-spacing: 0.08em;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
}
.video-frame.upload-slot {
  border: 1px dashed rgba(203, 180, 137, 0.3);
}
.video-frame video,
.video-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000;
}
.upload-slot__empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem; padding: 1.25rem; text-align: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(203, 180, 137, 0.06), transparent 55%);
}
.upload-slot__icon {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px dashed rgba(203, 180, 137, 0.5);
  position: relative; margin-bottom: 0.2rem;
}
.upload-slot__icon::before,
.upload-slot__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: var(--accent); transform: translate(-50%, -50%);
}
.upload-slot__icon::before { width: 12px; height: 1.5px; }
.upload-slot__icon::after { width: 1.5px; height: 12px; }
.video-label { font-size: 0.88rem; color: var(--text); font-weight: 500; max-width: 100%; }
.video-status { font-size: 0.78rem; letter-spacing: 0.1em; color: var(--text-dim); }
.upload-slot__title { display: block; font-size: 0.9rem; color: var(--text); }
.upload-slot__hint { display: block; font-size: 0.75rem; letter-spacing: 0.08em; color: var(--text-dim); }
.inline-hint { margin: -0.25rem 0 0.85rem !important; }

/* Contact — same content max-width as works; row uses horizontal space */
.contact-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 0.3vw + 0.95rem, 1.12rem);
  max-width: 42rem;
}

/* Trial — 软件试用 */
.trial {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.trial-head {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}
.trial-head .section-kicker {
  letter-spacing: 0.2em;
}
.trial-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3rem);
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.25rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(203, 180, 137, 0.07), transparent 45%),
    var(--bg-soft);
}
.trial-copy {
  flex: 0 1 28rem;
  max-width: 28rem;
}
.trial-qr {
  position: relative;
  flex: 0 0 auto;
  width: min(240px, 100%);
  border-radius: 16px;
  background: #f7f7f7;
  padding: 0.85rem 0.85rem 0.55rem;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.trial-qr img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
}
.trial-qr-note {
  margin: 0.45rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: #8a867e;
}
.trial-copy h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 1.2vw + 1rem, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.trial-copy > p {
  margin: 0 0 1.35rem;
  color: var(--text-muted);
  max-width: 34em;
}
.trial-copy-btn {
  border: 0;
  cursor: pointer;
  min-width: min(100%, 16rem);
  box-shadow: 0 0 24px rgba(203, 180, 137, 0.28);
}
.trial-toast {
  margin: 0.85rem 0 0;
  color: var(--accent);
  font-size: 0.92rem;
}
@media (max-width: 760px) {
  .trial-card {
    justify-content: center;
    text-align: center;
  }
  .trial-qr { width: min(100%, 260px); }
  .trial-copy { max-width: 100%; }
  .trial-copy > p { margin-left: auto; margin-right: auto; }
  .trial-copy-btn { width: 100%; }
}

.contact-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1.25rem, 2.5vw, 1.75rem) clamp(1.1rem, 2vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(135deg, rgba(203,180,137,0.05), transparent 42%), var(--bg-soft);
  width: 100%;
}
.contact-copy { min-width: 0; flex: 0 1 18rem; max-width: 22rem; }
.contact-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
  flex: 0 0 auto;
}
.contact-actions-col .btn { white-space: nowrap; min-width: 10.5rem; }
.upload-slot--qr {
  flex: 0 0 148px; width: 148px; height: 148px;
  border-radius: 12px;
  border: 1px dashed rgba(203, 180, 137, 0.4);
  background: var(--bg); overflow: hidden;
  position: relative;
}
.upload-slot--qr .upload-slot__empty { position: static; height: 100%; }
.upload-slot--qr img { width: 100%; height: 100%; object-fit: cover; }
.upload-slot--text {
  border: 1px dashed rgba(203, 180, 137, 0.22);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.5rem;
  margin-bottom: 0.85rem;
}
.wechat-line { margin: 0 0 0.35rem; color: var(--text); font-size: 1.08rem; }
.wechat-line strong { color: var(--accent); font-weight: 600; }
.wechat-note { margin: 0 0 0.75rem; color: var(--text); font-size: 0.95rem; line-height: 1.55; }
.contact-copy p { margin: 0 0 0.75rem; color: var(--text-muted); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 0.5rem; }
.muted { color: var(--text-dim) !important; font-size: 0.9rem; }
@media (max-width: 900px) {
  .contact-card {
    justify-content: center;
    text-align: center;
  }
  .contact-actions-col {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }
  .contact-copy { max-width: 100%; }
}

.site-footer { padding: clamp(2.5rem, 5vw, 3.5rem) 0; width: 100%; }
.footer-inner { text-align: center; }
.footer-inner p { margin: 0 0 0.4rem; font-size: 0.9rem; }
.footer-links { margin-top: 0.75rem !important; color: var(--text-dim); }
.footer-links a { color: var(--text-muted); }
.footer-links span { margin: 0 0.45rem; }

.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* —— Breakpoints: grids 4→3→2→1 —— */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(200px, 0.55fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }
  .work-row--featured { grid-column: span 1; }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: clamp(2.5rem, 8vw, 4rem) 0;
  }
  .hero-grid,
  .outcomes { grid-template-columns: 1fr; }
  .hero-portrait {
    justify-self: start;
    width: min(100%, 220px);
    margin-top: 0.25rem;
  }
  .work-row--featured { grid-column: span 1; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; gap: 0; padding: 0.75rem 1.25rem 1rem;
    background: rgba(12, 12, 13, 0.97); border-bottom: 1px solid var(--line);
  }
  .site-header.nav-open .nav { display: flex; }
  .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .header-inner { position: relative; }
}

@media (max-width: 640px) {
  .work-list,
  .lesson-grid { grid-template-columns: 1fr; }
  .hero h1 { letter-spacing: 0.04em; }
  .contact-card { justify-content: center; text-align: center; }
  .contact-actions-col { width: 100%; }
  .contact-actions-col .btn,
  .contact-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}


/* Selected work — ayucloud-style dual pane (core 5) */
.selected-work {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.selected-wrap {
  width: min(100% - (var(--pad) * 2), var(--wrap));
  max-width: 1360px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(240px, 0.92fr) minmax(0, 1.85fr);
  gap: clamp(1.5rem, 3.5vw, 2.75rem);
  align-items: stretch;
}
.selected-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.selected-kicker {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.selected-kicker span { color: rgba(120, 180, 220, 0.85); margin: 0 0.35rem; }
.selected-pane h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 2vw + 1rem, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.selected-lead {
  margin: 0 0 1.15rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}
.selected-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}
.selected-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.55rem;
  padding: 0.72rem 0.75rem 0.72rem 0.3rem;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text-dim);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.selected-item:hover,
.selected-item:focus-visible {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  outline: none;
}
.selected-item.is-active {
  color: var(--text);
  background: rgba(203, 180, 137, 0.06);
  border-color: rgba(203, 180, 137, 0.18);
}
.selected-num {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding-top: 0.2rem;
}
.selected-item.is-active .selected-num { color: var(--accent); }
.selected-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  color: inherit;
  line-height: 1.35;
  text-wrap: pretty;
}
.selected-arrow {
  display: inline-block;
  margin-left: 0.25rem;
  opacity: 0;
  transform: translate(-4px, 2px);
  transition: 0.25s var(--ease);
  font-size: 0.85em;
}
.selected-item.is-active .selected-arrow,
.selected-item:hover .selected-arrow {
  opacity: 0.85;
  transform: none;
}
.selected-desc {
  display: none;
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.selected-item.is-active .selected-desc { display: block; }
.selected-case {
  display: none;
  margin-top: 0.7rem;
  font-size: 0.86rem;
  color: #8ec8d8;
  letter-spacing: 0.02em;
}
.selected-item.is-active .selected-case { display: inline-block; }
.selected-case:hover { color: #b7e0ea; }

.selected-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  align-items: center;
  margin-top: 1.75rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.selected-steps { color: var(--text-muted); }
.selected-all {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.selected-all:hover { color: var(--accent); }

.selected-stage {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.stage-frame {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0a0a0c;
  box-shadow:
    0 0 0 1px rgba(203, 180, 137, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(120, 160, 200, 0.06);
  aspect-ratio: 16 / 10;
}
.stage-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.25);
  border-radius: inherit;
}
.stage-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  display: block;
  background: #0a0a0c;
  transition: opacity 0.35s var(--ease);
}
.stage-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: baseline;
  margin: 0;
  padding: 0 0.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.stage-caption strong {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

@media (max-width: 960px) {
  .selected-wrap {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .selected-stage { order: -1; }
  .stage-frame { aspect-ratio: 16 / 11; }
  .selected-meta .selected-all { margin-left: 0; }
  .selected-desc { display: block; }
}


.upload-slot.has-media { border-style: solid; border-color: var(--line-strong); }
.upload-slot.has-media .upload-slot__empty { display: none; }
.upload-slot--portrait.has-media,
.upload-slot--qr.has-media { padding: 0; }
.upload-slot--portrait.has-media img,
.upload-slot--qr.has-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-frame.has-media { border-style: solid; }


.selected-case--muted {
  display: none;
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.selected-item.is-active .selected-case--muted { display: inline-block; }
