/* ============================================================
   최성우 · AI QA Portfolio — shared design system
   Palette: Navy #1B2A4A · Orange #E8710A
   Type: Pretendard (display/body) · JetBrains Mono (data/labels)
   Concept: dark-navy console dashboard
   ============================================================ */

:root {
  /* palette */
  --navy-900: #0d1526;   /* deepest bg */
  --navy-800: #12203a;   /* page bg */
  --navy-700: #1b2a4a;   /* panels */
  --navy-600: #243657;   /* raised panels */
  --navy-500: #33466b;   /* borders */
  --line:     #2a3c5f;   /* hairlines */

  --orange:   #e8710a;   /* primary accent */
  --orange-2: #ff8c2e;   /* hover / glow */
  --amber:    #f0b429;

  --ink:      #eaf0fb;   /* primary text */
  --ink-2:    #b7c3da;   /* secondary text */
  --muted:    #7f8db0;   /* muted / captions */

  --ok:       #3fd08a;   /* pass / green LED */
  --warn:     #f0b429;   /* warn / amber LED */
  --crit:     #ff5d6c;   /* fail / red LED */

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Pretendard", "Pretendard Variable", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --maxw: 1180px;
  --radius: 10px;
  --shadow: 0 18px 50px -20px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  word-break: keep-all;
  overflow-wrap: break-word;
  background:
    radial-gradient(900px 600px at 82% -8%, rgba(232,113,10,.12), transparent 60%),
    radial-gradient(700px 500px at 8% 110%, rgba(51,70,107,.28), transparent 55%),
    var(--navy-800);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

code, kbd {
  word-break: break-word;
  overflow-wrap: anywhere;
}

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- top nav (메인 홈과 동일한 디자인) ---------- */
nav.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27,42,74,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap { display: flex; align-items: center; height: 56px; gap: 8px; }
nav.top .brand { font-weight: 800; color: #fff; font-size: 15.5px; letter-spacing: -.01em; }
nav.top .brand .k { font-family: var(--mono); color: var(--orange); font-size: 13px; margin-left: 6px; }
nav.top .links { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
nav.top .links a { font-size: 13px; color: var(--ink-2); padding: 7px 10px; border-radius: 8px; transition: color .15s, background .15s; }
nav.top .links a:hover { color: #fff; background: rgba(255,255,255,.06); }
nav.top .links a.is-active { color: #fff; }
nav.top .links a.cta { color: #fff; background: var(--orange); }
nav.top .links a.cta:hover { background: var(--orange-2); }
@media (max-width: 820px) { nav.top .links a:not(.cta) { display: none; } }

/* ---------- hero ---------- */
.hero { padding: 72px 0 40px; }
.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--orange);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--orange);
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.1; margin: 18px 0 10px; font-weight: 800;
  letter-spacing: -.5px;
}
.hero h1 .cursor {
  display: inline-block; width: .5ch; height: 1em; margin-left: 4px;
  background: var(--orange); vertical-align: -.12em;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero .lede { font-size: 1.12rem; color: var(--ink-2); max-width: 100%; }
.hero .punch { font-size: 1rem; color: var(--ink); font-weight: 600; margin-top: 14px; padding-left: 14px; border-left: 3px solid var(--orange); max-width: 100%; }
.hero .role-line { font-family: var(--mono); color: var(--muted); margin-top: 12px; font-size: .95rem; }

/* ---------- buttons / CTA ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 6px; border: 1px solid var(--line);
  cursor: pointer; appearance: none;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--orange); border-color: var(--orange); color: var(--navy-900); }
.btn--primary:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn--sm { padding: 7px 12px; font-size: 12px; }

/* status strip */
.status-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-top: 34px;
}
.status-strip--3 {
  grid-template-columns: repeat(3, 1fr);
}
.stat { background: var(--navy-700); padding: 18px 20px; }
.stat__k { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.stat__v { font-size: 1.5rem; font-weight: 700; margin-top: 4px; }
.stat__v span { color: var(--orange); }

/* ---------- section head ---------- */
.section { padding: 56px 0; }
.section__head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.section__num { font-family: var(--mono); color: var(--orange); font-size: 14px; }
.section__title { font-size: 1.5rem; font-weight: 750; margin: 0; }
.section__desc { color: var(--muted); font-size: .95rem; margin-left: auto; font-family: var(--mono); }

/* ---------- capability grid (what I can do) ---------- */
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.capability-grid .panel { margin-bottom: 0; }
.capability-grid .panel h2 { font-size: 1.05rem; }
@media (max-width: 900px) { .capability-grid { grid-template-columns: 1fr; } }

/* ---------- project grid (console modules) ---------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.grid-divider {
  grid-column: 1 / -1;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: 20px; margin-top: 6px;
}
.grid-divider:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.module {
  grid-column: span 4;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  position: relative; overflow: hidden;
}
.module::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--line); transition: background .18s;
}
.module:hover {
  transform: translateY(-4px);
  border-color: var(--navy-500);
  box-shadow: var(--shadow);
}
.module:hover::before { background: var(--orange); }

.module--featured { grid-column: span 6; }
.module--featured::before { background: var(--orange); box-shadow: 0 0 14px rgba(232,113,10,.6); }
.module--featured { border-color: rgba(232,113,10,.35); }

.module__top { display: flex; align-items: center; justify-content: space-between; }
.module__id { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
}
.tag--featured { color: var(--orange); border-color: rgba(232,113,10,.5); background: rgba(232,113,10,.08); }
.module h3 { margin: 0; font-size: 1.12rem; font-weight: 700; line-height: 1.3; }
.module--featured h3 { font-size: 1.32rem; }
.module p { margin: 0; color: var(--ink-2); font-size: .92rem; }

.metrics { display: flex; gap: 18px; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.metric__k { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .5px; }
.metric__v { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.metric__v.ok { color: var(--ok); }

.module__cta { font-family: var(--mono); font-size: 12.5px; color: var(--orange); display: inline-flex; align-items: center; gap: 6px; }
.module__cta::after { content: "→"; transition: transform .18s; }
.module:hover .module__cta::after { transform: translateX(4px); }

.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 11px; color: var(--ink-2); padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px; }
a.chip:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- detail page: quick nav (표준 구조 바로가기) ---------- */
.chip-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip-nav a { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; transition: border-color .15s, color .15s; }
.chip-nav a:hover { border-color: var(--orange); color: var(--orange); }

/* ---------- timeline (career page) ---------- */
.timeline { position: relative; margin: 10px 0 0; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--orange), var(--line));
}
.tl-item { position: relative; padding: 0 0 34px 6px; }
.tl-item::before {
  content: ""; position: absolute; left: -33px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--navy-800); border: 2px solid var(--navy-500);
}
.tl-item--mark::before { border-color: var(--orange); background: var(--orange); box-shadow: 0 0 10px rgba(232,113,10,.6); }
.tl-date { font-family: var(--mono); font-size: 12.5px; color: var(--orange); letter-spacing: .5px; }
.tl-item h3 { margin: 5px 0 3px; font-size: 1.12rem; font-weight: 700; }
.tl-item .org { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.tl-item p { margin: 8px 0 0; color: var(--ink-2); font-size: .93rem; }
.tl-item ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: .92rem; }
.tl-item ul li { margin: 3px 0; }

/* ---------- panels / detail pages ---------- */
.panel {
  background: var(--navy-700); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; margin-bottom: 18px;
}
.panel h2 { margin: 0 0 12px; font-size: 1.2rem; }
.panel h2 .section__num { font-size: 13px; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; }
.kv dt { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); font-size: .95rem; }
.metric-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 14px; }
.metric-card { background: var(--navy-800); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.metric-card .v { font-size: 1.7rem; font-weight: 800; color: var(--orange); font-family: var(--mono); }
.metric-card .k { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: .5px; margin-top: 4px; }

.rait-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rait { background: var(--navy-800); border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: 0 6px 6px 0; padding: 12px; }
.rait .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rait .t { font-weight: 700; font-size: .95rem; margin-top: 2px; }
.rait .d { color: var(--ink-2); font-size: .82rem; margin-top: 4px; }

.backlink { font-family: var(--mono); font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; margin: 28px 0; }
.backlink::before { content: "←"; }
.backlink:hover { color: var(--orange); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0 48px; margin-top: 30px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.footer .contact { font-family: var(--mono); font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer .contact a:hover { color: var(--orange); }
.footer .sig { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .module, .module--featured { grid-column: span 6; }
  .status-strip { grid-template-columns: repeat(2, 1fr); }
  .rait-grid { grid-template-columns: repeat(2, 1fr); }
  .section__desc { display: none; }
}
@media (max-width: 640px) {
  .module, .module--featured { grid-column: span 12; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
  .hero { padding: 48px 0 30px; }
}

/* ---------- detail page: visual evidence ---------- */
.evidence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.evidence { margin: 0; }
.evidence__img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); font-family: var(--mono); font-size: 11.5px; text-align: center;
}
.evidence figcaption { margin-top: 8px; font-size: .85rem; color: var(--ink-2); line-height: 1.5; }

/* ---------- detail page: test case table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.tc-table { width: 100%; border-collapse: collapse; font-size: .85rem; min-width: 640px; }
.tc-table th, .tc-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tc-table th {
  font-family: var(--mono); font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  color: var(--muted); background: var(--navy-800);
}
.tc-table td { color: var(--ink-2); }
.tc-table td:first-child { font-family: var(--mono); color: var(--ink); white-space: nowrap; }
.tc-table tr:last-child td { border-bottom: none; }
.tc-note { margin: 10px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.6; }

/* ---------- detail page: axis badge (RaiT 8-axis reuse) ---------- */
.axis-badge { font-weight: 700; }
.axis-badge--used { color: var(--orange); border-color: rgba(232,113,10,.5); background: rgba(232,113,10,.08); }

/* ---------- detail page: problem-approach-verify-result-retro story ---------- */
.story-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.story-card { background: var(--navy-800); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.story-card__step {
  font-family: var(--mono); font-size: 11px; color: var(--orange);
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px;
}
.story-card p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.55; }

@media (max-width: 900px) {
  .story-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .evidence-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
}

/* accessibility */
a:focus-visible, button:focus-visible, .module:focus-visible {
  outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
