/* ------------------------------------------------------------------
   dotoritos-kim.github.io 랜딩과 이력서 공용 스타일
   ------------------------------------------------------------------ */

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #ecebe4;
  --ink: #15161a;
  --ink-2: #3d3f47;
  --muted: #6b6d75;
  --line: #dddcd3;
  --accent: #0b7f78;
  --accent-ink: #ffffff;
  --accent-soft: rgba(11, 127, 120, 0.1);
  --note: #15161a;
  --note-alt: #0b7f78;
  --lane: #e7e6de;
  --shadow: 0 1px 0 rgba(20, 20, 20, 0.04), 0 8px 24px -16px rgba(20, 20, 20, 0.18);

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 14px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f13;
    --surface: #16181d;
    --surface-2: #1d2027;
    --ink: #ecebe6;
    --ink-2: #c4c4c0;
    --muted: #8d8f97;
    --line: #2a2d35;
    --accent: #43d9c8;
    --accent-ink: #0b1513;
    --accent-soft: rgba(67, 217, 200, 0.12);
    --note: #ecebe6;
    --note-alt: #43d9c8;
    --lane: #1b1d23;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e0f13;
  --surface: #16181d;
  --surface-2: #1d2027;
  --ink: #ecebe6;
  --ink-2: #c4c4c0;
  --muted: #8d8f97;
  --line: #2a2d35;
  --accent: #43d9c8;
  --accent-ink: #0b1513;
  --accent-soft: rgba(67, 217, 200, 0.12);
  --note: #ecebe6;
  --note-alt: #43d9c8;
  --lane: #1b1d23;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 32px -18px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent);
  margin-bottom: 14px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.nav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; margin-right: auto; white-space: nowrap; }
.nav__mark {
  width: 18px; height: 18px; border-radius: 4px;
  background:
    linear-gradient(var(--bg), var(--bg)) 0 62% / 100% 2px no-repeat,
    linear-gradient(90deg, var(--ink) 0 30%, transparent 30% 35%, var(--accent) 35% 65%, transparent 65% 70%, var(--ink) 70%);
}
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__links a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: 0.9375rem; color: var(--ink-2); }
.nav__links a:hover, .nav__links a[aria-current="true"] { color: var(--ink); background: var(--surface-2); }
.nav__links .nav__cta { background: var(--ink); color: var(--bg); margin-left: 6px; }
.nav__links .nav__cta:hover { background: var(--accent); color: var(--accent-ink); }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink-2); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
}
@media (max-width: 720px) {
  .nav__links li:not(:last-child) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; font-weight: 600; font-size: 0.9375rem; color: var(--ink);
  transition: border-color .15s, background .15s, color .15s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn--primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); font-weight: 500; }
.btn--ghost:hover { color: var(--accent); border-color: transparent; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 6vw, 72px); align-items: center;
  padding-top: clamp(40px, 8vw, 96px); padding-bottom: clamp(32px, 5vw, 56px);
}
.hero__title { font-size: clamp(2rem, 4.6vw, 3.5rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.18; }
.hero__intro { margin-top: 22px; max-width: 36em; font-size: clamp(1rem, 1.4vw, 1.125rem); color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hero__status { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 0.875rem; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.hero__stage {
  margin: 0; position: relative;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden;
}
.highway { display: block; width: 100%; aspect-ratio: 4 / 5; }
.hero__stage figcaption {
  position: absolute; left: 14px; bottom: 12px; color: var(--muted);
  background: color-mix(in srgb, var(--surface) 80%, transparent); padding: 2px 6px; border-radius: 6px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__stage { order: -1; }
  .highway { aspect-ratio: 16 / 9; }
  .hero__stage figcaption { display: none; }
}

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0; padding-top: 8px; padding-bottom: 8px;
}
.stat { padding: 20px 20px 20px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat__value { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 0.875rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
}

/* ---------- sections ---------- */
.section { padding-top: clamp(64px, 10vw, 120px); }
.section__head { margin-bottom: 36px; max-width: 44em; }
.section__head h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); }
.section__head--split { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.link-arrow { font-weight: 600; text-decoration: none; white-space: nowrap; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(20px, 3vw, 28px);
}
.card h3 { font-size: 1.1875rem; }
.card p { color: var(--ink-2); margin-top: 10px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 18px; }
.tags li {
  font-family: var(--mono); font-size: 0.75rem; line-height: 1;
  padding: 6px 9px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2);
}
.tags--lg { margin-top: 0; }
.tags--lg li { font-family: var(--font); font-size: 0.9375rem; padding: 8px 12px; border-radius: 8px; }

/* focus */
.focus { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.focus__no { display: block; color: var(--accent); margin-bottom: 18px; }
@media (max-width: 720px) { .focus { grid-template-columns: 1fr; } }

/* feature */
.feature {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 4vw, 48px); margin-bottom: 16px; padding: clamp(24px, 4vw, 40px);
}
.feature__kind { color: var(--accent); }
.feature__title { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 8px; }
.feature__summary { font-size: 1.0625rem; }
.feature__list { margin-top: 20px; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.feature__list li { position: relative; padding-left: 22px; color: var(--ink-2); }
.feature__list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 10px; height: 4px; border-radius: 1px; background: var(--accent);
}

.stack { display: flex; flex-direction: column; gap: 10px; align-self: center; }
.stack__caption { color: var(--muted); margin-bottom: 4px; }
.layer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.layer {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  text-decoration: none; position: relative;
  transition: border-color .15s, transform .15s;
}
.layer b { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; color: var(--ink); }
.layer span { font-size: 0.8125rem; color: var(--muted); }
.layer:hover { border-color: var(--accent); transform: translateY(-1px); }
.layer--app { background: var(--ink); border-color: var(--ink); }
.layer--app b { color: var(--bg); }
.layer--app span { color: color-mix(in srgb, var(--bg) 70%, transparent); }
.layer--core { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.layer--core b { color: var(--accent); }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* project grid */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; }
.project__kind { color: var(--muted); margin-bottom: 8px; }
.project .tags { margin-top: auto; padding-top: 18px; }
.project__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px !important; font-size: 0.9375rem; font-weight: 600; }
.project__links a { text-decoration: none; color: var(--ink); }
.project__links a:hover { color: var(--accent); }
@media (max-width: 980px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

/* experience */
.exp { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.job__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.job__head h3 { font-size: 1.375rem; }
.job__period { color: var(--muted); white-space: nowrap; }
.job__role { font-weight: 600; color: var(--ink) !important; margin-top: 4px !important; }
.job__items { margin-top: 16px; padding-left: 0; list-style: none; display: grid; gap: 8px; }
.job__items li { padding-left: 18px; position: relative; color: var(--ink-2); }
.job__items li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--line); border: 1.5px solid var(--muted); }

.timeline { list-style: none; position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; display: flex; flex-direction: column; padding-bottom: 26px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -22px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--muted);
}
.timeline li:last-child::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline__when { color: var(--accent); }
.timeline strong { font-size: 1.0625rem; margin-top: 2px; }
.timeline__desc { color: var(--muted); font-size: 0.9375rem; margin-top: 2px; }
@media (max-width: 860px) { .exp { grid-template-columns: 1fr; } }

/* skills */
.skills { margin: 0; border-top: 1px solid var(--line); }
.skills__row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.skills dt { font-weight: 700; }
.skills dd { margin: 0; }
@media (max-width: 640px) { .skills__row { grid-template-columns: 1fr; gap: 10px; } }

/* posts */
.posts { list-style: none; border-top: 1px solid var(--line); }
.posts a {
  display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 16px; align-items: baseline;
  padding: 16px 4px; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: background .15s, padding .15s;
}
.posts a:hover { background: var(--surface); padding-left: 12px; color: var(--ink); }
.posts__date, .posts__cat { color: var(--muted); }
.posts__title { font-weight: 600; }
@media (max-width: 640px) {
  .posts a { grid-template-columns: 1fr; gap: 2px; }
  .posts__cat { display: none; }
}

/* contact */
.contact { padding-bottom: clamp(48px, 8vw, 96px); }
.contact h2 { font-size: clamp(1.75rem, 4vw, 3rem); letter-spacing: -0.03em; max-width: 18em; }
.contact__mail {
  display: inline-block; margin-top: 24px;
  font-size: clamp(1.25rem, 3.4vw, 2rem); font-weight: 700; letter-spacing: -0.02em;
  color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.contact__links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin-top: 28px; font-weight: 600; }
.contact__links a { text-decoration: none; }

.footer {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.875rem;
}
.footer a { text-decoration: none; }

/* ------------------------------------------------------------------
   이력서 페이지 (/resume/)
   ------------------------------------------------------------------ */
.cv { max-width: 860px; margin: 0 auto; padding: clamp(32px, 6vw, 64px) var(--gutter) 80px; }
.cv__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }
.cv__sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 5vw, 56px); }
.cv__head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 2px solid var(--ink); }
.cv__name { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; }
.cv__name small { font-size: 1rem; font-weight: 500; color: var(--muted); margin-left: 8px; letter-spacing: 0; }
.cv__role { margin-top: 4px; color: var(--accent); font-weight: 600; }
.cv__contact { list-style: none; font-size: 0.875rem; color: var(--ink-2); text-align: right; display: grid; gap: 2px; }
.cv__contact a { text-decoration: none; }
.cv__summary { margin-top: 20px; color: var(--ink-2); }
.cv__section { margin-top: 32px; }
.cv__section > h2 {
  font-size: 0.8125rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px;
}
.cv__item + .cv__item { margin-top: 18px; }
.cv__item-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cv__item-head h3 { font-size: 1.0625rem; }
.cv__item-head span { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.cv__item p { color: var(--ink-2); margin-top: 4px; font-size: 0.9375rem; }
.cv__item ul { margin-top: 6px; padding-left: 18px; color: var(--ink-2); font-size: 0.9375rem; display: grid; gap: 3px; }
.cv__stack { font-family: var(--mono); font-size: 0.75rem !important; color: var(--muted) !important; }
.cv__skills { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 16px; font-size: 0.9375rem; margin: 0; }
.cv__skills dt { font-weight: 700; }
.cv__skills dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) {
  .cv__contact { text-align: left; }
  .cv__skills { grid-template-columns: 1fr; }
  .cv__skills dd { margin-bottom: 8px; }
}

/* ---------- print ---------- */
@media print {
  @page { size: A4; margin: 14mm 14mm 16mm; }
  :root, :root[data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #f1f1ee; --ink: #111; --ink-2: #333; --muted: #666; --line: #d6d6d0;
    --accent: #0b6f69; color-scheme: light;
  }
  body { font-size: 10pt; line-height: 1.5; }
  .nav, .cv__bar, .skip, .footer, .hero__stage { display: none !important; }
  .cv { padding: 0; max-width: none; }
  .cv__sheet { border: 0; padding: 0; border-radius: 0; }
  .cv__section, .cv__item { break-inside: avoid; }
  a { text-decoration: none; }
}
