/* ===================================================================
   지상영 · Portfolio Site — Single-page long scroll version
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F5F6F4;
  --surface: #FFFFFF;
  --ink: #1C2321;
  --ink-soft: #5B6360;
  --ink-faint: #9AA29E;
  --line: #DADFDC;
  --accent: #2B4C5C;
  --accent-soft: #E4EBEC;
  --signal: #C17F59;

  --font-display: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Inter', monospace;

  --maxw: 1080px;
  --gutter: clamp(20px, 6vw, 72px);
  --nav-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; color: var(--ink-soft); }

/* ---------- signature: trace line ---------- */
.trace { position: relative; height: 1px; background: var(--line); margin: 0; }
.trace::before { content:''; position:absolute; top:-3px; left:0; width:7px; height:7px; background: var(--signal); }
.trace::after { content:''; position:absolute; top:-3px; right:0; width:7px; height:7px; background: var(--accent); }

/* ---------- floating nav ---------- */
.floating-nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 8px 30px rgba(28, 35, 33, 0.06);
  transition: box-shadow 0.2s ease, background 0.2s ease;
  max-width: calc(100vw - 24px);
}
.floating-nav.scrolled {
  box-shadow: 0 10px 34px rgba(28, 35, 33, 0.1);
  background: rgba(255, 255, 255, 0.88);
}
.floating-nav .brand {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  margin-right: 6px;
}
.floating-nav .brand span { color: var(--signal); }

.floating-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.floating-nav a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding: 9px 14px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}
.floating-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.floating-nav a.active { color: var(--surface); background: var(--ink); }

.nav-toggle {
  display: none;
  background: var(--ink);
  color: var(--bg);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 16px;
}

@media (max-width: 680px) {
  .floating-nav { padding: 6px 8px 6px 16px; top: 14px; }
  .floating-nav ul { display: none; }
  .floating-nav.open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 8px;
    gap: 2px;
    box-shadow: 0 10px 34px rgba(28,35,33,0.12);
  }
  .floating-nav.open a { padding: 12px 16px; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- sections ---------- */
section { padding: clamp(64px, 11vw, 120px) 0; scroll-margin-top: 96px; }
section + section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.section-head .index { font-family: var(--font-mono); font-size: 13px; color: var(--ink-faint); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(120px, 16vw, 168px); padding-bottom: clamp(56px, 9vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
@media (max-width: 800px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-top: 14px; }
.hero .role { margin-top: 18px; font-family: var(--font-mono); font-size: 14px; color: var(--accent); }
.hero-summary { border-left: 2px solid var(--accent); padding-left: 20px; }
.hero-summary p { color: var(--ink); }

.cta-row { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em;
  padding: 12px 20px; border: 1px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease; border-radius: 999px;
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--accent-soft); }

/* ---------- about cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 800px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); padding: 28px; border-radius: 4px; }

/* ---------- resume: timeline ---------- */
.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
@media (max-width: 640px) { .timeline::before { left: 5px; } }

.timeline-item {
  position: relative;
  padding: 0 0 40px 40px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
}
.timeline-item.current::before { background: var(--signal); border-color: var(--signal); }

.timeline-item .period { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.03em; }
.timeline-item .org { color: var(--accent); font-size: 14px; margin: 6px 0 10px; display: block; font-weight: 500; }
.timeline-item h3 { margin-bottom: 2px; }
.timeline-item p { font-size: 14px; margin-top: 10px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--accent); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; }

/* ---------- skills ---------- */
.skill-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.skill-row:first-child { border-top: none; }
.skill-row .name { font-weight: 500; font-size: 14px; }
.skill-bar { width: 160px; height: 4px; background: var(--line); position: relative; border-radius: 2px; overflow: hidden; }
.skill-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
@media (max-width: 640px) { .skill-bar { width: 100px; } }

/* ---------- portfolio: thumbnails ---------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .project-grid { grid-template-columns: 1fr; } }

.project-card { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(28,35,33,0.08); }

.thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.thumb-num {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--surface);
  background: rgba(28,35,33,0.55);
  padding: 3px 9px;
  border-radius: 999px;
  z-index: 2;
}
.thumb svg { width: 100%; height: 100%; display: block; }

.project-body { padding: 20px; }
.project-body h3 { font-size: 16px; margin-bottom: 6px; }
.project-body p { font-size: 13.5px; }
.project-link {
  margin-top: 14px; display: inline-block;
  font-family: var(--font-mono); font-size: 12px; color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; }
.contact-list li { display: flex; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--line); }
.contact-list li:first-child { border-top: none; }
.contact-list .label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.contact-list .value { font-weight: 500; }
.contact-list a.value:hover { color: var(--accent); }

form.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 14px; padding: 12px 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 4px;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 12px; color: var(--ink-faint); margin-top: -4px; }

/* ---------- footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.footer-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); }
.footer-row a:hover { color: var(--accent); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.editme { position: relative; }
.editme::after {
  content: '편집 필요';
  position: absolute; top: -10px; right: -8px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em;
  color: var(--signal); background: var(--bg); padding: 1px 5px;
  border: 1px solid var(--signal); opacity: 0.85; border-radius: 999px;
}
