:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #1a1a1a;
  --text: #333333;
  --muted: #565656;
  --line: #e6e6e3;
  --line-strong: #d6d6d2;
  --accent: #14304a;
  --accent-soft: #e8eef4;
  --ph-bg: #fdf3d9;
  --ph-ink: #7a5f10;
  --font-display: "Pretendard", -apple-system, sans-serif;
  --font-body: "Pretendard", -apple-system, sans-serif;
  --maxw: 1120px;
  --pad: clamp(20px, 6vw, 80px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p,
dd,
li {
  word-break: keep-all;
  overflow-wrap: break-word;
}

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

strong {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ---------- typography primitives ---------- */
.eyebrow {
  margin: 0 0 18px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-body);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
}

/* placeholder markers the user must fill */
.ph {
  padding: 1px 7px;
  border-bottom: 2px dashed var(--ph-ink);
  background: var(--ph-bg);
  color: var(--ph-ink);
  font-weight: 600;
  white-space: nowrap;
}

.ph-inline {
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--ph-bg);
  color: var(--ph-ink);
  font-weight: 600;
}

.ph-note {
  font-size: 0.72em;
  color: var(--ph-ink);
  font-weight: 600;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px var(--pad);
  background: rgba(250, 250, 250, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-role {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: clamp(14px, 2vw, 30px);
}

.nav a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.22s ease;
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  width: 100%;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 12vw, 150px) var(--pad) clamp(56px, 9vw, 110px);
}

.hero-title {
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 15ch;
}

.hero-title em {
  font-style: normal;
  font-weight: 700;
  color: var(--accent);
}

.hero-lead {
  max-width: 56ch;
  margin: 28px 0 0;
  font-size: 1.1rem;
  color: var(--text);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  margin: 32px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-cycle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ink);
}

.hero-cycle .arrow {
  color: var(--accent);
}

.hero-cycle span:not(.arrow) {
  font-weight: 500;
}

/* ---------- buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease,
    box-shadow 0.16s ease;
}

.button.primary {
  background: var(--accent);
  color: #fff;
}

.button.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(20, 48, 74, 0.22);
}

.button.ghost {
  background: transparent;
  color: var(--accent);
}

.button.ghost:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* ---------- section base ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(64px, 10vw, 128px) var(--pad);
}

.section-head {
  max-width: 62ch;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 {
  margin-top: 6px;
}

.section-desc {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

/* ---------- about ---------- */
.about {
  border-top: 1px solid var(--line);
}

.about-body {
  display: grid;
  gap: 20px;
  max-width: 68ch;
  font-size: 1.1rem;
  color: var(--text);
}

.about-body p {
  margin: 0;
}

/* ---------- selected work ---------- */
.work {
  border-top: 1px solid var(--line);
}

.work-list {
  display: grid;
  gap: 20px;
}

.work-card {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.work-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 44px rgba(26, 26, 26, 0.08);
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.work-no {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
}

.work-tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
}

.work-main h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.work-when {
  margin: 0 0 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.psr {
  display: grid;
  gap: 16px;
  margin: 0;
}

.psr > div {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
}

.psr dt {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}

.psr dd {
  margin: 0;
  color: var(--text);
}

.psr div:last-child dd {
  color: var(--ink);
  font-weight: 500;
}

/* empty result slot — to be filled later with numbers/materials */
.result-slot {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
}

.result-slot::before {
  content: "성과 · 자료 추가 예정";
  color: var(--ph-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

.result-slot::after {
  content: attr(data-hint);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 400;
}

/* ---------- experience ---------- */
.experience {
  border-top: 1px solid var(--line);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: clamp(16px, 4vw, 48px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline-period {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--accent);
}

.timeline-body h3 {
  margin-bottom: 4px;
}

.timeline-org {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--muted);
}

.timeline-body p:last-child {
  margin: 0;
  color: var(--muted);
}

/* ---------- skills ---------- */
.skills {
  border-top: 1px solid var(--line);
}

/* ---------- how i work ---------- */
.how-i-work {
  border-top: 1px solid var(--line);
}

/* ---------- case study page ---------- */
.case-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 600;
}

.case-link:hover {
  text-decoration: underline;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 18px;
}

.work-links .case-link {
  margin-top: 0;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.shot-grid figure {
  margin: 0;
}

.shot-grid img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.shot-grid figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.shot-note {
  margin-top: clamp(24px, 4vw, 40px);
}

.case-back {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(48px, 8vw, 88px);
  text-align: center;
  border-top: 1px solid var(--line);
}

.case-back .button {
  margin-top: clamp(32px, 6vw, 56px);
}

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

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

.skill-group {
  padding: clamp(26px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.skill-group h3 {
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}

.skill-group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-group li {
  padding: 8px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--bg);
}

/* ---------- contact ---------- */
.contact {
  border-top: 1px solid var(--line);
}

.contact-inner {
  max-width: 62ch;
}

.contact-inner h2 {
  margin-top: 6px;
}

.contact-lead {
  margin: 18px 0 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.contact-actions .button {
  min-height: 52px;
}

/* ---------- footer ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px var(--pad) 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .site-header {
    flex-wrap: wrap;
    padding-bottom: 10px;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav a {
    flex: none;
    font-size: 0.86rem;
  }

  .work-card {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .work-meta {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .work-no {
    font-size: 1.8rem;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

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

@media (max-width: 520px) {
  .psr > div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .hero-cycle {
    gap: 8px;
    font-size: 0.92rem;
  }

  .hero-stats {
    gap: 20px 28px;
  }
}
