/* ── Variables ── */
:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --text: #1a1a18;
  --text-muted: #6b6b65;
  --text-faint: #706d65;
  --accent-warm: #c85a2a;
  --border: #e2e0da;
  --border-light: #eeece6;
  --tag-bg: #eeecea;
  --radius: 12px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6 { font-weight: inherit; font-size: inherit; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Skip link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--text);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Focus styles ── */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Layout ── */
.wrapper { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
}
.nav-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 52px;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
  letter-spacing: -0.3px;
}
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--border-light); }
.nav-links a.active { color: var(--text); font-weight: 500; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: 8px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Page Hero ── */
.page-hero { padding: 64px 0 48px; border-bottom: 0.5px solid var(--border); }
.page-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.page-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--text);
}
.page-title em { font-style: italic; color: var(--text-muted); }
.page-desc {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin-top: 16px;
  line-height: 1.7;
}
.page-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.page-badge { display: inline-block; font-size: 11px; font-weight: 500; padding: 3px 10px; border-radius: 20px; }
.page-period { font-size: 13px; color: var(--text-faint); align-self: center; }

/* ── Sections ── */
section { padding: 56px 0; border-bottom: 0.5px solid var(--border); }
section:last-child { border-bottom: none; }
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 28px;
}

/* ── Footer ── */
footer { padding: 48px 0; text-align: center; border-top: 0.5px solid var(--border); }
.footer-name { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); margin-bottom: 4px; }
.footer-note { font-size: 13px; color: var(--text-faint); }

/* ── Badges ── */
.badge-full { background: #dceeff; color: #185FA5; }
.badge-temp { background: #fff3dc; color: #854F0B; }
.badge-contract { background: #dff0e8; color: #3B6D11; }
.career-badge { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 20px; margin-bottom: 6px; }

/* ── Career ── */
.career-list { display: flex; flex-direction: column; }
.career-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 0.5px solid var(--border-light);
}
.career-item:last-child { border-bottom: none; }
.career-date { font-size: 12px; color: var(--text-faint); line-height: 1.6; padding-top: 3px; }
.career-co { font-size: 16px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.career-role { font-size: 13px; color: var(--text-muted); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.legend-dot { display: inline-block; font-size: 10px; font-weight: 500; padding: 2px 8px; border-radius: 20px; }

/* ── Services ── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.service-card { background: var(--surface); padding: 28px 24px; transition: background 0.15s; }
.service-card:hover { background: var(--tag-bg); }
.service-num { font-family: 'DM Serif Display', serif; font-size: 13px; color: var(--text-faint); margin-bottom: 12px; }
.service-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.service-desc { font-size: 13px; color: var(--text-muted); line-height: 1.65; }
.service-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 14px; }
.service-tag { font-size: 11px; background: var(--tag-bg); color: var(--text-muted); padding: 3px 8px; border-radius: 20px; }

/* ── Flow (services policy) ── */
.flow-list { display: flex; flex-direction: column; }
.flow-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 0.5px solid var(--border-light);
  align-items: start;
}
.flow-item:last-child { border-bottom: none; }
.flow-num { font-family: 'DM Serif Display', serif; font-size: 22px; color: var(--text-faint); line-height: 1; }
.flow-title { font-size: 15px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.flow-desc { font-size: 13px; color: var(--text-muted); line-height: 1.65; }

/* ── Projects list ── */
.project-list { display: flex; flex-direction: column; }
.project-item {
  padding: 32px 0;
  border-bottom: 0.5px solid var(--border-light);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
}
.project-item:last-child { border-bottom: none; }
.project-type { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.project-name { font-family: 'DM Serif Display', serif; font-size: 18px; line-height: 1.3; color: var(--text); margin-bottom: 6px; }
.project-date { font-size: 12px; color: var(--text-faint); }
.project-right { display: flex; flex-direction: column; gap: 16px; }
.point-label { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 4px; }
.point-text { font-size: 14px; color: var(--text-muted); line-height: 1.65; }

/* Company page links grid */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.company-link {
  display: block;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}
.company-link:hover { border-color: var(--text); background: var(--tag-bg); }
.company-link-date { font-size: 11px; color: var(--text-faint); margin-bottom: 4px; }
.company-link-name { font-size: 14px; font-weight: 500; color: var(--text); }

/* ── Workshop ── */
.ws-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 40px; }
.ws-step { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px 12px; text-align: center; }
.ws-step-num { font-size: 10px; font-weight: 500; color: var(--text-faint); margin-bottom: 6px; letter-spacing: 0.06em; }
.ws-step-name { font-size: 12px; font-weight: 500; color: var(--text); }
.ws-cards { display: flex; flex-direction: column; gap: 12px; }
.ws-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 24px; }
.ws-card-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 8px; }
.ws-card-text { font-size: 13px; color: var(--text-muted); line-height: 1.7; }

/* ── Skills ── */
.skill-section { margin-bottom: 32px; }
.skill-section:last-child { margin-bottom: 0; }
.skill-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 10px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-tag { font-size: 13px; background: var(--surface); border: 0.5px solid var(--border); color: var(--text-muted); padding: 6px 14px; border-radius: 20px; }

/* ── Company page components ── */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 8px 0; margin-bottom: 32px; transition: color 0.15s; }
.back-link:hover { color: var(--text); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 32px; }
.info-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.info-card-label { font-size: 11px; color: var(--text-faint); margin-bottom: 4px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.info-card-value { font-size: 14px; color: var(--text); font-weight: 500; }
.task-list { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.task-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); }
.task-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); flex-shrink: 0; margin-top: 8px; }
.task-text { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.tool-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tool-tag { font-size: 12px; background: var(--tag-bg); color: var(--text-muted); padding: 4px 10px; border-radius: 20px; }
.project-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: var(--radius); padding: 28px; margin-bottom: 12px; }
.project-card:last-child { margin-bottom: 0; }
.project-card-type { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 8px; }
.project-card-title { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--text); margin-bottom: 20px; line-height: 1.3; }
.point-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }

/* ── Index Hero ── */
.hero { padding: 80px 0 64px; border-bottom: 0.5px solid var(--border); }
.hero-eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; }
.hero h1 { font-family: 'DM Serif Display', serif; font-size: clamp(48px, 8vw, 72px); line-height: 1.05; letter-spacing: -1.5px; color: var(--text); margin-bottom: 8px; animation: fadeUp 0.6s ease both; }
.hero h1 em { font-style: italic; color: var(--text-muted); }
.hero-desc { font-size: 16px; color: var(--text-muted); max-width: 480px; margin-top: 20px; line-height: 1.7; animation: fadeUp 0.6s 0.1s ease both; }
.hero-meta { display: flex; gap: 24px; margin-top: 40px; flex-wrap: wrap; animation: fadeUp 0.6s 0.2s ease both; }
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num { font-family: 'DM Serif Display', serif; font-size: 28px; color: var(--text); line-height: 1; }
.hero-stat-label { font-size: 12px; color: var(--text-faint); }
.hero-divider { width: 1px; height: 40px; background: var(--border); align-self: center; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .project-item { grid-template-columns: 1fr; gap: 16px; }
  .career-item { grid-template-columns: 1fr; gap: 6px; }
  .ws-flow { grid-template-columns: repeat(3, 1fr); }
  .point-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .page-hero { padding: 40px 0 32px; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(247, 245, 240, 0.98);
    backdrop-filter: blur(12px);
    padding: 8px 16px 16px;
    border-bottom: 0.5px solid var(--border);
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 12px; }
  .nav-toggle { display: flex; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero-desc, .hero-meta { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
