/* Lin Lin Portfolio — Design System
   Color palette: wabi-sabi, earthy, no pure whites, no saturated hues */

:root {
  --walnut: #2C2318;
  --walnut-mid: #5C4A35;
  --fired-clay: #8B7355;
  --linen: #E8E0D0;
  --charcoal-ash: #4A4A42;
  --sand: #C4A882;
  --driftwood: #D4C5B0;
  --page-bg: #F5F0E8;
  --card-bg: #EDE8DF;
  --matcha: #5A8060;
  --border: rgba(139, 115, 85, 0.2);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Base ─────────────────────────────────────────────────── */
html, body { height: 100%; }
body {
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
  background: var(--page-bg);
  color: var(--walnut);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

/* ── Nav ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--page-bg);
  border-bottom: 0.5px solid var(--border);
  padding: 18px 48px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-size: 16px;
  color: var(--fired-clay);
  letter-spacing: 0.04em;
  transition: color 0.15s;
  padding-bottom: 1px;
}
.nav-link:hover { color: var(--walnut); }
.nav-link.active {
  color: var(--walnut);
  border-bottom: 1px solid var(--walnut);
}
.nav-brand {
  margin-left: auto;
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--walnut);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--walnut);
  padding: 48px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.footer-cta { display: none; }
.footer-right { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-connect {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 4px;
}
.footer-links { display: flex; gap: 36px; }
.footer-link-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 4px;
}
.footer-link-val {
  font-size: 13px;
  color: var(--sand);
  transition: color 0.15s;
}
.footer-link:hover .footer-link-val { color: var(--driftwood); }
.footer-copy {
  font-size: 11px;
  color: var(--fired-clay);
  letter-spacing: 0.04em;
}

/* ── Homepage Hero ────────────────────────────────────────── */
.home-hero {
  padding: 80px 0 100px 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.hero-text { padding-top: 4px; }
.hero-heading {
  font-size: clamp(28px, 3.8vw, 44px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--walnut);
  margin-bottom: 28px;
}
.hero-bio {
  font-size: 16px;
  line-height: 1.78;
  color: var(--charcoal-ash);
  margin-bottom: 36px;
}
.meta-block { margin-bottom: 20px; }
.meta-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 10px;
}
.meta-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-tag {
  font-size: 13px;
  color: var(--charcoal-ash);
  background: var(--linen);
  border: 0.5px solid var(--border);
  padding: 5px 12px;
  letter-spacing: 0.01em;
}
.hero-actions { margin-top: 36px; display: flex; gap: 16px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--walnut);
  color: var(--linen);
  font-size: 15px;
  letter-spacing: 0.08em;
  padding: 13px 28px;
  transition: opacity 0.15s;
  border: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.8; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top center;
  filter: sepia(10%) brightness(0.96) contrast(1.02);
}
.hero-photo-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--linen);
  border: 0.5px solid var(--border);
}

/* ── Home Work Preview ────────────────────────────────────── */
.home-work-preview {
  padding: 0 48px 100px;
}
.section-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 32px;
  padding-top: 48px;
  border-top: 0.5px solid var(--border);
}

/* ── Work Page Header ─────────────────────────────────────── */
.work-header {
  padding: 64px 48px 52px;
}
.work-header h1 { font-size: 40px; font-weight: 400; margin-bottom: 16px; }
.work-subhead { font-size: 15px; color: var(--fired-clay); line-height: 1.65; }

/* ── Case Study Cards ─────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card:hover .card-image img { transform: scale(1.03); }
.card-image {
  overflow: hidden;
  background: var(--linen);
  aspect-ratio: 4/3;
  margin-bottom: 24px;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}
.card-body {
  display: flex;
  flex-direction: column;
}
.card-eyebrow { display: none; }
.card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--walnut);
  margin-bottom: 12px;
}
.card-desc {
  font-size: 14px;
  color: var(--charcoal-ash);
  line-height: 1.72;
  margin-bottom: 12px;
}
.card-meta {
  font-size: 13px;
  color: var(--charcoal-ash);
  font-style: italic;
}
.card-link { display: none; }

/* ── Case Study Pages ─────────────────────────────────────── */
.cs-breadcrumb {
  padding: 14px 48px;
  font-size: 12px;
  color: var(--fired-clay);
  display: flex;
  gap: 8px;
  align-items: center;
}
.cs-breadcrumb a { color: var(--fired-clay); transition: color 0.15s; }
.cs-breadcrumb a:hover { color: var(--walnut); }
.cs-breadcrumb-sep { color: var(--border); font-size: 14px; }

.cs-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 48px 0;
}
.cs-eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 16px;
}
.cs-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 300;
  line-height: 1.15;
  color: var(--walnut);
  margin-bottom: 40px;
  max-width: 760px;
}
.cs-hero-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  object-position: center top;
  filter: sepia(5%) brightness(0.97) contrast(1.01);
}
.cs-hero-image--fullbleed {
  width: 100vw;
  height: auto;
  display: block;
}
.cs-hero-placeholder {
  width: 100%;
  height: 400px;
  background: var(--linen);
}

.cs-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

/* Highlights block */
.cs-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 0.5px solid var(--border);
  margin: 48px 0;
}
.cs-highlight-col {
  padding: 32px 28px;
  border-right: 0.5px solid var(--border);
}
.cs-highlight-col:last-child { border-right: none; }
.cs-highlight-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 12px;
}
.cs-highlight-content { font-size: 14px; color: var(--charcoal-ash); line-height: 1.65; }
.cs-highlight-content p { margin-bottom: 8px; font-size: 14px; }
.cs-highlight-content p:last-child { margin-bottom: 0; }
.cs-highlight-stat {
  font-size: 36px;
  font-weight: 300;
  color: var(--walnut);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 6px;
}
.cs-highlight-sub { font-size: 12px; color: var(--fired-clay); }

/* Browser shell mockup */
.browser-shell {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
  margin: 28px 0;
}
.browser-shell-bar {
  background: #E8E3DC;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.browser-shell-dots {
  display: flex;
  gap: 6px;
}
.browser-shell-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.browser-shell-dot:nth-child(1) { background: #FF5F57; }
.browser-shell-dot:nth-child(2) { background: #FFBD2E; }
.browser-shell-dot:nth-child(3) { background: #28C840; }
.browser-shell-url {
  flex: 1;
  background: #fff;
  border-radius: 5px;
  height: 22px;
  border: 1px solid var(--border);
}
.browser-shell img {
  width: 100%;
  height: auto;
  display: block;
}

/* Two-column text + image layout */
.cs-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 24px;
}
.cs-two-col-text { display: flex; flex-direction: column; gap: 16px; }
.cs-two-col-text p { margin: 0; }
.cs-two-col-image img { width: 100%; height: auto; display: block; }

/* Section template */
.cs-section { margin-bottom: 56px; }
.cs-section-header {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fired-clay);
  border-top: 0.5px solid var(--border);
  padding-top: 28px;
  margin-bottom: 24px;
}
.cs-section h2 { font-size: 24px; font-weight: 400; color: var(--walnut); margin-bottom: 20px; }
.cs-section h3 { font-size: 16px; font-weight: 500; color: var(--walnut); margin-bottom: 10px; }
.cs-section h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fired-clay);
  margin-bottom: 12px;
  margin-top: 24px;
}
.cs-section p { font-size: 16px; color: var(--charcoal-ash); line-height: 1.75; margin-bottom: 16px; }
.cs-section p:last-child { margin-bottom: 0; }
.cs-section ul, .cs-section ol { padding-left: 22px; }
.cs-section li { font-size: 15px; color: var(--charcoal-ash); line-height: 1.7; margin-bottom: 8px; }

/* AI callout */
.cs-ai-callout {
  background: var(--linen);
  border-left: 3px solid var(--matcha);
  padding: 24px 28px;
  margin: 28px 0;
}
.cs-ai-callout-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-bottom: 14px;
}
.cs-ai-callout p { font-size: 14px; color: var(--charcoal-ash); line-height: 1.7; margin-bottom: 10px; }
.cs-ai-callout p:last-child { margin-bottom: 0; }
.cs-ai-callout ul { padding-left: 18px; }
.cs-ai-callout li { font-size: 14px; color: var(--charcoal-ash); line-height: 1.7; margin-bottom: 8px; }

/* Images */
.cs-image { margin: 28px 0; }
.cs-image img {
  width: 100%;
  filter: sepia(4%) brightness(0.98);
}
.cs-image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0; }
.cs-image-grid--equal-height { align-items: stretch; }
.cs-img-clip { height: 100%; overflow: hidden; }
.cs-img-clip img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cs-image-grid img { width: 100%; filter: sepia(4%) brightness(0.98); }
.cs-image-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 28px 0; }
.cs-image-grid-3 img { width: 100%; filter: sepia(4%) brightness(0.98); }
.cs-image-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; }
.cs-image-grid-4 img { width: 100%; filter: sepia(4%) brightness(0.98); }

/* Full-bleed screen showcase */
.cs-screens-showcase {
  background: var(--walnut);
  padding: 56px 48px;
  margin: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}
.cs-screens-showcase img {
  width: 100%;
  max-width: 960px;
  display: block;
  filter: none;
}

/* Phase divider */
.cs-phase-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand);
  background: var(--walnut);
  padding: 8px 16px;
  display: inline-block;
  margin-bottom: 24px;
}

/* Inline chart block */
.cs-chart {
  background: var(--linen);
  border: 0.5px solid var(--border);
  border-radius: 8px;
  padding: 36px 36px 28px;
  margin: 28px 0;
}
.cs-chart-title {
  font-size: 17px;
  font-weight: 500;
  color: var(--walnut);
  margin: 0 0 16px;
}
.cs-chart-title-muted {
  font-weight: 400;
  color: var(--fired-clay);
}
.cs-chart-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--charcoal-ash);
}
.cs-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cs-chart-legend-line {
  display: inline-block;
  width: 24px;
  height: 2px;
}
.cs-chart-legend-line--web { background: #C4A882; }
.cs-chart-legend-line--mobile { background: #2C2018; }
.cs-chart-cards {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 24px;
  margin-bottom: 36px;
}
.cs-chart-card {
  border-radius: 8px;
  padding: 28px 32px;
}
.cs-chart-card--light {
  background: #E8E0D2;
  border: 0.5px solid var(--border);
}
.cs-chart-card--dark { background: #2C2018; }
.cs-chart-card-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8B6E52;
  margin: 0 0 12px;
}
.cs-chart-card-label--light { color: #C4A882; }
.cs-chart-card-number {
  font-size: 52px;
  font-weight: 400;
  margin: 0;
  line-height: 1;
  font-family: Georgia, serif;
}
.cs-chart-card-number--muted { color: #8B6E52; }
.cs-chart-card-number--light { color: #F2EDE4; }
.cs-chart-card-unit { font-size: 28px; }
.cs-chart-card-arrow {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.cs-chart-card-delta {
  font-size: 20px;
  font-weight: 600;
  color: #2C2018;
  margin: 0 0 6px;
}
.cs-chart-card-arrow-icon {
  font-size: 24px;
  color: #8B6E52;
  margin: 0;
}

/* Results */
.cs-results {
  background: var(--walnut);
  padding: 48px;
  margin: 48px 0;
}
.cs-results-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 32px;
}
.cs-results-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.cs-result-number {
  font-size: 44px;
  font-weight: 300;
  color: var(--driftwood);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
}
.cs-result-desc {
  font-size: 13px;
  color: var(--sand);
  line-height: 1.55;
}

/* Case study nav */
.cs-page-nav {
  display: flex;
  justify-content: space-between;
  border-top: 0.5px solid var(--border);
  padding-top: 36px;
  margin-top: 56px;
}
.cs-page-nav-item { display: flex; flex-direction: column; gap: 6px; }
.cs-page-nav-item.next { text-align: right; }
.cs-page-nav-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fired-clay);
}
.cs-page-nav-title {
  font-size: 14px;
  color: var(--charcoal-ash);
  transition: color 0.15s;
}
.cs-page-nav-item:hover .cs-page-nav-title { color: var(--walnut); }

/* ── Contact Page ─────────────────────────────────────────── */
.contact-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 48px 100px;
}
.contact-heading { font-size: 40px; font-weight: 400; margin-bottom: 20px; }
.contact-subhead { font-size: 16px; color: var(--fired-clay); line-height: 1.65; margin-bottom: 60px; }
.contact-links { display: flex; flex-direction: column; }
.contact-link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  border-bottom: 0.5px solid var(--border);
  transition: padding-left 0.2s ease;
}
.contact-link-item:hover { padding-left: 12px; }
.contact-link-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fired-clay);
}
.contact-link-val { font-size: 16px; color: var(--walnut); }
.contact-link-arrow { font-size: 18px; color: var(--sand); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 860px) {
  .nav { padding: 16px 24px; }
  .footer { padding: 40px 24px; }
  .footer-right { align-items: center; }
  .footer-links { flex-wrap: wrap; gap: 20px; }

  .home-hero { grid-template-columns: 1fr; padding: 48px 24px 60px; gap: 36px; }
  .hero-photo { display: none; }
  .home-work-preview { padding: 0 24px 64px; }

  .work-header { padding: 48px 24px 40px; }

  .cards { grid-template-columns: 1fr; gap: 40px; }
  .card-body { padding: 0; }

  .cs-breadcrumb { padding: 14px 24px; }
  .cs-hero { padding: 40px 24px 0; }
  .cs-body { padding: 0 24px 60px; }
  .cs-highlights { grid-template-columns: 1fr; }
  .cs-highlight-col { border-right: none; border-bottom: 0.5px solid var(--border); }
  .cs-highlight-col:last-child { border-bottom: none; }
  .cs-results { padding: 36px 24px; }
  .cs-results-stats { grid-template-columns: 1fr; gap: 28px; }
  .cs-image-grid { grid-template-columns: 1fr; }
  .cs-image-grid-3 { grid-template-columns: 1fr; }

  .contact-body { padding: 48px 24px 64px; }
}
