/* ==========================================================================
   Portfolio Site — Stylesheet (v2, designed by Claude)
   概念：接案工程師的「需求單」。紙色底、墨色字、鈷藍當動作色，
   首屏的收據式需求單是唯一的視覺亮點，其餘版面保持安靜。
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  --paper: #f0f2ee;
  --paper-2: #e4e9e3;
  --surface: #fafbf8;
  --ink: #101a16;
  --ink-2: #46534d;
  --line: #cbd3cc;
  --line-strong: #98a49c;

  --link: #2339d6;
  --btn: #2a44f0;
  --btn-hover: #1f34c4;
  --on-btn: #ffffff;
  --signal: #ffc93c;
  --focus: rgba(42, 68, 240, 0.4);

  --inv-bg: #101a16;
  --inv-fg: #f0f2ee;

  --sheet: #fcfbf6;
  --sheet-ink: #17201c;
  --sheet-line: #cdc8bb;
  --sheet-mute: #5d625c;

  --font-sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Heiti TC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas,
    "Microsoft JhengHei", "PingFang TC", monospace;

  --radius-s: 4px;
  --radius-m: 8px;
  --maxw: 72.5rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --header-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1310;
    --paper-2: #111b16;
    --surface: #141e19;
    --ink: #e8efea;
    --ink-2: #a2b0a8;
    --line: #26332d;
    --line-strong: #455548;

    --link: #9fadff;
    --btn: #4458f2;
    --btn-hover: #5a6cff;
    --focus: rgba(159, 173, 255, 0.55);

    --inv-bg: #e8efea;
    --inv-fg: #101a16;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--signal);
  color: #101a16;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  border-radius: var(--radius-s);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(1px)) {
  .site-header {
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: blur(10px);
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
}

.site-brand-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-s);
}

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  cursor: pointer;
}

.nav-toggle-icon {
  display: grid;
  gap: 4px;
  width: 1.1rem;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-nav {
  flex-basis: 100%;
  padding-bottom: 0.75rem;
}

.nav-list {
  display: grid;
  gap: 0.25rem;
  list-style: none;
}

.nav-link {
  display: block;
  padding: 0.6rem 0.25rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.nav-link-cta {
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  text-align: center;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
}

.nav-link-cta:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

/* 有 JS 時，手機版選單預設收合 */
@media (max-width: 47.99rem) {
  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: block;
  }
}

@media (min-width: 48rem) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    flex-basis: auto;
    padding-bottom: 0;
  }

  .nav-list {
    display: flex;
    align-items: center;
    gap: 0.25rem 1.5rem;
  }

  .nav-link {
    padding: 0.4rem 0;
    font-size: 0.95rem;
  }

  .nav-link-cta {
    margin: 0 0 0 0.5rem;
    padding: 0.4rem 1rem;
  }
}

/* ---------- Buttons ---------- */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.55rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-s);
  font: inherit;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--btn);
  color: var(--on-btn);
}

.btn-primary:hover {
  background: var(--btn-hover);
  color: var(--on-btn);
}

.btn-secondary,
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover,
.btn-outline:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-sm {
  min-height: 2.4rem;
  padding: 0.3rem 1rem;
  font-size: 0.92rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Hero (首頁) ---------- */
.hero {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5rem);
}

.hero-inner {
  display: grid;
  gap: 2rem;
}

.hero-title {
  max-width: 17em;
  font-size: clamp(2.15rem, 1.1rem + 4.2vw, 4.1rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-body {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.hero-subtitle {
  max-width: 34em;
  color: var(--ink-2);
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.15rem);
}

.hero-actions {
  margin-top: 1.5rem;
}

.hero-meta {
  display: grid;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
}

.hero-meta li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 60rem) {
  .hero-body {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: clamp(2rem, 5vw, 4.5rem);
  }
}

/* ---------- 需求單（首屏亮點） ---------- */
.sheet-wrap {
  max-width: 28rem;
  filter: drop-shadow(0 1px 0 rgba(16, 26, 22, 0.1))
    drop-shadow(0 16px 20px rgba(16, 26, 22, 0.2));
}

@media (min-width: 48rem) {
  .sheet-wrap {
    transform: rotate(-1.1deg);
  }
}

@media (min-width: 60rem) {
  .sheet-wrap {
    justify-self: end;
    width: 100%;
  }
}

.sheet {
  --tooth: 14px;
  padding: 1.5rem 1.5rem calc(1.5rem + var(--tooth));
  background: var(--sheet);
  color: var(--sheet-ink);
  border-radius: var(--radius-s) var(--radius-s) 0 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.65;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg)
    50% / var(--tooth) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg)
    50% / var(--tooth) 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .sheet {
    animation: sheet-print 1s cubic-bezier(0.22, 0.8, 0.3, 1) 0.15s both;
  }
}

@keyframes sheet-print {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.sheet-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sheet-ink);
}

.sheet-title {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.sheet-date {
  color: var(--sheet-mute);
  font-size: 0.82rem;
}

.sheet-hint {
  margin: 0.9rem 0 0.4rem;
  color: var(--sheet-mute);
  font-size: 0.85rem;
  line-height: 1.6;
}

.sheet fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.sheet-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 0.35rem;
  margin-inline: -0.35rem;
  border-radius: var(--radius-s);
  cursor: pointer;
}

.sheet-option:hover {
  background: rgba(23, 32, 28, 0.06);
}

.sheet-option input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  border: 1.5px solid var(--sheet-ink);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.sheet-option input::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: var(--sheet);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
  transform: scale(0);
  transition: transform 0.12s ease;
}

.sheet-option input:checked {
  background: var(--sheet-ink);
}

.sheet-option input:checked::after {
  transform: scale(1);
}

.sheet-option input:focus-visible {
  outline: 3px solid rgba(42, 68, 240, 0.45);
  outline-offset: 2px;
}

.sheet-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--sheet-line);
}

.sheet-field select {
  max-width: 11rem;
  padding: 0.25rem 0.3rem;
  background: transparent;
  color: inherit;
  border: 0;
  border-bottom: 1.5px solid var(--sheet-ink);
  font: inherit;
  cursor: pointer;
}

.sheet-summary {
  display: block;
  margin-top: 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px dashed var(--sheet-line);
  border-bottom: 1px dashed var(--sheet-line);
  white-space: pre-line;
  font-size: 0.85rem;
  line-height: 1.7;
}

.sheet-summary.is-empty {
  color: var(--sheet-mute);
}

.sheet-actions {
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
  font-family: var(--font-sans);
}

.sheet-actions a {
  color: var(--sheet-ink);
  font-size: 0.88rem;
  text-align: center;
}

.sheet .btn-primary {
  background: var(--sheet-ink);
  color: var(--sheet);
}

.sheet .btn-primary:hover {
  background: #2a3b34;
  color: var(--sheet);
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(3.25rem, 8vw, 6rem);
  border-top: 1px solid var(--line);
}

.section-alt {
  background: var(--paper-2);
}

.section-header {
  display: grid;
  gap: 0.75rem;
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-title {
  font-size: clamp(1.6rem, 1rem + 2vw, 2.5rem);
}

.section-desc {
  max-width: 36em;
  margin: 0;
  color: var(--ink-2);
}

.section-eyebrow {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  .grid-2,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  gap: 2.5rem;
}

.about-content p {
  max-width: 36em;
}

.about-content p:first-child {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.8;
  font-weight: 600;
}

.about-skills-title {
  margin-bottom: 0.9rem;
  font-size: 1rem;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.chip,
.tag {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
}

@media (min-width: 56rem) {
  .about-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
  }
}

/* ---------- Services（分隔線列表） ---------- */
.service-list {
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.service-row {
  display: grid;
  gap: 0.5rem 3rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line-strong);
}

.service-row .card-title {
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.35rem);
}

.service-row .card-desc {
  margin: 0;
  max-width: 34em;
}

.service-row .service-target {
  margin: 0.4rem 0 0;
  max-width: 34em;
  color: var(--ink-2);
  font-size: 0.92rem;
}

@media (min-width: 48rem) {
  .service-row {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }

  .service-row .card-title {
    grid-row: 1 / span 2;
  }
}

/* ---------- Projects（大橫列） ---------- */
.project-list {
  list-style: none;
  border-top: 1.5px solid var(--ink);
}

.project-row {
  display: grid;
  gap: 1.5rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line-strong);
}

.project-thumb {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  background: var(--surface);
}

.project-thumb svg {
  width: 100%;
  height: auto;
}

.project-thumb text {
  font-family: var(--font-sans);
}

.project-thumb .mono {
  font-family: var(--font-mono);
}

.th-bg { fill: var(--surface); }
.th-bar { fill: var(--paper-2); }
.th-line { fill: var(--line); }
.th-ink { fill: var(--ink); }
.th-mute { fill: var(--ink-2); }
.th-acc { fill: var(--btn); }
.th-sig { fill: var(--signal); }
.th-stroke { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.th-white { fill: #fff; }
.th-inv-bg { fill: var(--inv-bg); }
.th-inv-fg { fill: var(--inv-fg); }

.project-title {
  font-size: clamp(1.35rem, 1rem + 1vw, 1.8rem);
}

.project-desc {
  max-width: 34em;
  margin: 0.75rem 0 1rem;
}

.project-tags {
  margin-bottom: 1.25rem;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (min-width: 56rem) {
  .project-row {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 3.5rem;
    align-items: center;
    padding-block: 2.5rem;
  }

  .project-row:nth-child(even) .project-thumb {
    order: 2;
  }
}

/* 作品詳細頁底部「相關作品」使用的簡易卡片 */
.project-card {
  display: grid;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
}

.project-card .project-title {
  font-size: 1.25rem;
}

.card {
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.card + .card {
  margin-top: 1rem;
}

.card-title {
  font-size: 1.1rem;
}

.card-desc {
  margin: 0.5rem 0 0;
  color: var(--ink-2);
}

/* ---------- Process（時間軸，真的有順序） ---------- */
.timeline {
  position: relative;
  display: grid;
  gap: 0;
  list-style: none;
}

.step-item {
  position: relative;
  padding: 0 0 2rem 2rem;
  border-left: 2px solid var(--ink);
}

.step-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.step-item::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.35rem;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--btn);
  border: 2px solid var(--paper-2);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--ink);
}

.step-number {
  display: block;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.step-title {
  font-size: 1.15rem;
}

.step-desc {
  margin: 0.4rem 0 0;
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.75;
}

@media (min-width: 60rem) {
  .timeline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .step-item,
  .step-item:last-child {
    padding: 2rem 0 0;
    border-left: 0;
    border-top: 2px solid var(--ink);
  }

  .step-item::before {
    left: 0;
    top: -0.45rem;
  }
}

/* ---------- Commitments ---------- */
.commit-grid {
  display: grid;
  gap: 2rem 3.5rem;
}

.commit-item {
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}

.commit-item .card-title {
  font-size: 1.2rem;
}

.commit-item .card-desc {
  max-width: 30em;
}

@media (min-width: 48rem) {
  .commit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 50rem;
  border-top: 1.5px solid var(--ink);
}

.faq-item {
  border-bottom: 1px solid var(--line-strong);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
  font-weight: 700;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-s);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
  background: var(--ink);
  color: var(--paper);
}

.faq-answer {
  padding: 0 3.25rem 1.25rem 0;
  color: var(--ink-2);
}

.faq-answer p {
  max-width: 38em;
  margin: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}

.contact-form-card {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-m);
}

.form-grid {
  display: grid;
  gap: 1.1rem;
}

.form-group {
  display: grid;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.92rem;
  font-weight: 700;
}

.required-mark {
  margin-left: 0.2rem;
  color: var(--link);
}

.form-control {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.65rem 0.85rem;
  background: var(--paper);
  color: var(--ink);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  font: inherit;
  line-height: 1.5;
}

textarea.form-control {
  min-height: 9.5rem;
  resize: vertical;
}

.form-control:focus {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--ink);
}

.form-hint {
  color: var(--ink-2);
  font-size: 0.85rem;
  line-height: 1.6;
}

.contact-form .btn {
  margin-top: 1.25rem;
}

.form-status {
  min-height: 1.5em;
  margin: 1rem 0 0;
  font-weight: 600;
}

.form-status.is-success {
  color: #0d6b3a;
}

.form-status.is-error {
  color: #b3261e;
}

@media (prefers-color-scheme: dark) {
  .form-status.is-success { color: #6fd9a0; }
  .form-status.is-error { color: #ff9a92; }
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-method-card + .contact-method-card {
  margin-top: 2rem;
}

.contact-method-title {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1.5px solid var(--ink);
  font-size: 1.1rem;
}

.contact-links {
  list-style: none;
}

.contact-link-item {
  display: grid;
  gap: 0.1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-link-label {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.contact-link-item a {
  overflow-wrap: anywhere;
  font-weight: 600;
}

@media (min-width: 56rem) {
  .contact-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 4rem;
    align-items: start;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-group-full {
    grid-column: 1 / -1;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2rem;
  border-top: 1.5px solid var(--ink);
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  gap: 1rem;
}

.footer-copy {
  margin: 0;
  color: var(--ink-2);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  list-style: none;
}

.footer-links a {
  color: var(--ink);
}

@media (min-width: 56rem) {
  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 2rem;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

/* ---------- 作品詳細頁 ---------- */
.project-hero {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(2rem, 5vw, 3.5rem);
}

.project-hero .container {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.project-hero .hero-title {
  max-width: 26em;
  font-size: clamp(1.9rem, 1rem + 3.2vw, 3.2rem);
}

.badge {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  list-style: none;
  font-size: 0.9rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 0.6rem;
  color: var(--line-strong);
}

.breadcrumb-item[aria-current="page"] {
  color: var(--ink-2);
}

.detail-grid {
  display: grid;
  gap: 3rem;
}

.detail-block {
  padding-top: 1.25rem;
  margin-bottom: 2.75rem;
  border-top: 1.5px solid var(--ink);
}

.detail-block h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.65rem);
}

.detail-block p {
  max-width: 38em;
}

.prose-list {
  display: grid;
  gap: 0.7rem;
  list-style: none;
}

.prose-list li {
  position: relative;
  max-width: 38em;
  padding-left: 1.4rem;
}

.prose-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--btn);
}

.detail-aside .card .prose-list li::before {
  background: var(--ink);
}

.cta-box {
  margin-top: 1rem;
  padding: 1.5rem;
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-radius: var(--radius-m);
}

.cta-box h2 {
  font-size: 1.25rem;
}

.cta-box p {
  margin: 0.6rem 0 1.1rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.cta-box .btn-primary {
  background: var(--signal);
  color: #101a16;
}

.cta-box .btn-primary:hover {
  background: #ffd96b;
  color: #101a16;
}

@media (min-width: 64rem) {
  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 4rem;
    align-items: start;
  }

  .detail-aside {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

/* ---------- 404 ---------- */
.error-page {
  padding-block: clamp(3rem, 9vw, 7rem);
}

.error-card {
  max-width: 40rem;
}

.error-code {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(5.5rem, 22vw, 12rem);
  font-weight: 800;
  line-height: 1;
}

.error-title {
  margin-top: 1rem;
  font-size: clamp(1.6rem, 1rem + 2vw, 2.4rem);
}

.error-desc {
  margin: 1rem 0 1.75rem;
  color: var(--ink-2);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .sheet-wrap {
    transform: none;
  }
}
