/* =========================
   About / Hero
========================= */
:root{
  --bg: #f6f1ea;
  --nav-bg: rgba(253, 250, 246, 0.9);
  --text: #1f1c16;
  --muted: #6b625a;
  --accent: #C9A300;
  --tag-bg: #e6e0d8;
  --line: rgba(31, 28, 22, 0.18);
}

.container{
  width: min(var(--container), calc(100% - 96px));
}

.about {
  background: var(--bg, #fff);
  border-bottom: var(--border);
}

.about-inner {
  padding: 64px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.about-title {
  margin: 0 0 18px 0;
  font-size: clamp(36px, 4vw, 64px);
  line-height: 1.05;
  font-weight: 700;
  color: var(--text, #1b1b1b);
  font-family: var(--font-serif);
}

.accent {
  color: var(--accent);
}

.about-text {
  margin: 0;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.9;
  max-width: 60ch;
}

.about-text + .about-text {
  margin-top: 12px;
}

.about-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.about-img {
  width: 100%;
  height: auto;
}

/* =========================
   Section title (PROJECTS big text)
========================= */
.section-title {
  padding: 24px 0 0;
}

.big-title {
  margin: 0;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: clamp(40px, 5vw, 72px);
  color: var(--text);
  text-transform: uppercase;
  font-family: var(--font-serif);
}

/* =========================
   Projects
========================= */
.projects {
  padding-top: 32px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface, #fff);
  border: var(--border);
  box-shadow: var(--shadow);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

/* link 變成卡片內真正的 layout 容器 */
.project-link {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.project-meta {
  padding: 22px 22px 14px;
}

.project-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text, #1b1b1b);
  letter-spacing: 0.8px;
}

.project-type {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  opacity: 0.9;
}

.project-media {
  aspect-ratio: 3 / 4;
  background: rgba(0, 0, 0, 0.06);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   Footer
========================= */
.site-footer {
  padding: 40px 0;
  border-top: var(--border);
}

.site-footer small {
  color: rgba(0, 0, 0, 0.55);
}

/* =========================
   NoScript
========================= */
.noscript {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  background: #111;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0.9;
}

/* =========================
   A11y helpers
========================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* focus：鍵盤可用性 */
.nav-link:focus-visible,
.project-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 4px;
  border-radius: 12px;
}

/* 動畫降載 */
@media (prefers-reduced-motion: reduce) {
  .project-card {
    transition: none;
  }
  .project-card:hover {
    transform: none;
  }
}

/* =========================
   Responsive
========================= */
@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  /* 手機一欄時 3/4 太高，改扁一點 */
  .project-media {
    aspect-ratio: 4 / 3;
  }
}
