/* Lin Che Studio — local design system */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/noto-sans-sc-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/noto-sans-sc-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/noto-sans-sc-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/noto-sans-sc-latin-400.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/noto-sans-sc-latin-500.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  --bg: #F7F5F0;
  --ink: #121212;
  --muted: #6B6860;
  --accent: #C45C26;
  --surface: #FFFFFF;
  --border: #E5E1D8;
  --max: 1120px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --font-display: 'Space Grotesk', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Space Grotesk', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Layout */
.wrap {
  width: min(100% - var(--pad) * 2, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand img,
.brand svg {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text strong { font-size: 0.95rem; }
.brand-text span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  font-size: 0.92rem;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-links a[aria-current="page"] {
  font-weight: 500;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* Typography */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 0;
}

h1.display { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2.display { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.75;
  color: var(--muted);
  max-width: 36em;
}

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

/* Hero */
.hero {
  padding: clamp(3.5rem, 10vw, 7rem) 0 clamp(3rem, 7vw, 5rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}

.hero-visual {
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 4 / 3;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.hero:hover .hero-visual img { transform: scale(1.03); }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--ink);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bg);
}

/* Sections */
.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  border-top: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.link-more {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.link-more:hover { border-color: var(--accent); }

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

.work-card {
  display: block;
}

.work-card-media {
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 4 / 3;
  margin-bottom: 1rem;
}
.work-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease), opacity 0.35s var(--ease);
}
.work-card:hover .work-card-media img {
  transform: scale(1.04);
  opacity: 0.92;
}

.work-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.work-card h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  transition: color 0.2s var(--ease);
}
.work-card:hover h3 { color: var(--accent); }

.work-card p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36em;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.filters button {
  min-height: 40px;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 0.88rem;
  color: var(--muted);
  transition: all 0.2s var(--ease);
}
.filters button:hover,
.filters button.is-active {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface);
}

.work-card[hidden] { display: none; }

/* Page header */
.page-hero {
  padding: clamp(2.75rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
}
.page-hero .lede { margin-top: 1.25rem; }

/* Project detail */
.project-hero {
  padding: clamp(2rem, 5vw, 3rem) 0 0;
}
.project-hero-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--border);
  margin-top: 2rem;
}
.project-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.project-meta dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-family: var(--font-display);
  margin-bottom: 0.3rem;
}
.project-meta dd {
  margin: 0;
  font-size: 0.98rem;
}

.project-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
}
.project-body h2 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
}
.project-body p {
  margin: 0 0 1rem;
  color: #2a2a2a;
}
.project-body p:last-child { margin-bottom: 0; }

.project-gallery {
  display: grid;
  gap: 1.25rem;
  padding-bottom: 3rem;
}
.project-gallery figure {
  margin: 0;
  background: var(--border);
}
.project-gallery img {
  width: 100%;
  height: auto;
}
.project-gallery figcaption {
  padding: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
}
.project-nav a {
  font-family: var(--font-display);
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.project-nav a:hover { color: var(--accent); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-visual {
  overflow: hidden;
  background: var(--border);
  aspect-ratio: 3 / 4;
}
.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-copy p {
  margin: 0 0 1.1rem;
  color: #2a2a2a;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stats span {
  font-size: 0.85rem;
  color: var(--muted);
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}
.skills li {
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  background: var(--surface);
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--border);
}
.timeline li {
  position: relative;
  padding: 0 0 1.75rem 1.5rem;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0.45rem;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.timeline time {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.timeline p { margin: 0; }

/* Notes list */
.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.note-list li {
  border-top: 1px solid var(--border);
}
.note-list a {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.35rem 0;
  transition: color 0.2s var(--ease);
}
.note-list a:hover { color: var(--accent); }
.note-list time {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--muted);
}
.note-list h3 {
  margin: 0;
  font-size: 1.1rem;
}
.note-list .tag {
  font-size: 0.8rem;
  color: var(--muted);
  font-family: var(--font-display);
}

/* Contact — no form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.contact-block {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.contact-block h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.contact-block p,
.contact-block a {
  margin: 0;
  font-size: 1.05rem;
}
.contact-block a {
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.contact-block a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.contact-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* Process steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.steps .num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: block;
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 3rem;
  margin-top: 1rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: start;
}
.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.footer-brand img { width: 32px; height: 32px; }
.footer-meta {
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a {
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a:hover { color: var(--ink); }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .about-grid,
  .project-body,
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .project-meta {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--pad) 1rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
  }
  .work-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: start; }
  .note-list a {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
  .stats { grid-template-columns: 1fr; }
  .project-nav { flex-direction: column; }
}
