/* ===== Tokens ===== */
:root {
  --bg: #fdf8f2;
  --bg-soft: #f7eee2;
  --surface: #ffffff;
  --surface-2: #fdf4e9;
  --line: rgba(120, 80, 50, 0.12);
  --text: #2f2620;
  --text-dim: #6f6055;
  --muted: #a08c7c;
  --accent: #f1683c;
  --accent-2: #f6a23c;
  --grad: linear-gradient(120deg, #f1683c 0%, #f6a23c 100%);
  --shadow: 0 18px 44px rgba(180, 110, 60, 0.16);
  --radius: 16px;
  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans KR", "Inter", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::selection { background: rgba(241, 104, 60, 0.22); }

/* ===== Scroll progress ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--grad); z-index: 1000;
  transition: width 0.1s linear;
}

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 56px);
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(253, 248, 242, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 12px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
}
.nav__logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.nav__avatar {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover;
  object-position: center 18%;
  background: var(--surface-2);
  border: 2px solid rgba(241, 104, 60, 0.35);
  box-shadow: 0 3px 10px rgba(180, 110, 60, 0.22);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.nav__logo:hover .nav__avatar { transform: scale(1.06); border-color: var(--accent); }
.nav__logo .dot { color: var(--accent); }
.nav__links { display: flex; gap: clamp(16px, 2.5vw, 34px); }
.nav__links a {
  font-size: 0.92rem; color: var(--text-dim); font-weight: 500;
  position: relative; transition: color 0.25s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--grad); transition: width 0.3s var(--ease);
}
.nav__links a:hover { color: var(--text); }
.nav__links a:hover::after { width: 100%; }
@media (max-width: 640px) { .nav__links { display: none; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
  cursor: pointer; border: 1px solid transparent;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 28px rgba(241, 104, 60, 0.32); }
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(241, 104, 60, 0.44); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255, 255, 255, 0.6); }
.btn--ghost:hover { transform: translateY(-3px); border-color: var(--accent); color: var(--accent); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 120px clamp(20px, 6vw, 40px) 80px;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(246, 162, 60, 0.26), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(241, 104, 60, 0.20), transparent 60%),
    radial-gradient(60% 60% at 50% 100%, rgba(255, 196, 120, 0.20), transparent 60%);
  animation: floatBg 18s ease-in-out infinite alternate;
}
@keyframes floatBg {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3%, 3%, 0) scale(1.08); }
}
.hero__inner { position: relative; z-index: 1; max-width: 860px; }
.hero__eyebrow {
  font-family: "Inter", sans-serif; letter-spacing: 0.28em; text-transform: uppercase;
  font-size: 0.82rem; color: var(--accent-2); font-weight: 600; margin-bottom: 24px;
}
.hero__title {
  font-size: clamp(2.1rem, 6vw, 4.2rem); line-height: 1.18; font-weight: 700;
  letter-spacing: -0.03em; margin-bottom: 28px;
}
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.18rem); color: var(--text-dim);
  max-width: 640px; margin: 0 auto 40px; font-weight: 300;
}
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 26px; height: 42px; border: 2px solid var(--line); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.hero__scroll span {
  width: 4px; height: 8px; border-radius: 4px; background: var(--accent);
  animation: scrollDot 1.6s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; }
}

/* ===== Sections ===== */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vw, 140px) clamp(20px, 5vw, 40px); }
.section__head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 48px; }
.section__num {
  font-family: "Inter", sans-serif; font-size: 0.9rem; font-weight: 600;
  color: var(--accent); letter-spacing: 0.1em;
}
.section__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em;
}

/* ===== About ===== */
.about__lead { font-size: clamp(1.15rem, 2.2vw, 1.6rem); font-weight: 500; margin-bottom: 24px; line-height: 1.5; }
.about__lead strong { color: var(--accent-2); font-weight: 600; }
.about__body { color: var(--text-dim); max-width: 760px; font-weight: 300; margin-bottom: 56px; }
.about__body strong { color: var(--text); font-weight: 500; }
.about__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 24px; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.stat:hover { transform: translateY(-4px); border-color: rgba(241, 104, 60, 0.4); box-shadow: var(--shadow); }
.stat__num {
  display: block; font-family: "Inter", sans-serif; font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.stat__label { display: block; margin-top: 12px; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 720px) { .about__stats { grid-template-columns: 1fr; } }

/* ===== Skills ===== */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-group {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.skill-group:hover { transform: translateY(-4px); border-color: rgba(246, 162, 60, 0.45); box-shadow: var(--shadow); }
.skill-group h3 { font-size: 1.05rem; margin-bottom: 18px; color: var(--accent); }
.skill-group ul { display: flex; flex-direction: column; gap: 10px; }
.skill-group li {
  color: var(--text-dim); font-size: 0.95rem; font-weight: 300;
  padding-left: 18px; position: relative;
}
.skill-group li::before {
  content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--grad);
}
@media (max-width: 820px) { .skills { grid-template-columns: 1fr; } }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
}
.tl-item { position: relative; padding-bottom: 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item__dot {
  position: absolute; left: -30px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent); box-shadow: 0 0 0 4px rgba(241, 104, 60, 0.14);
}
.tl-item__period { font-family: "Inter", sans-serif; font-size: 0.85rem; color: var(--accent); margin-bottom: 6px; font-weight: 600; }
.tl-item__body h3 { font-size: 1.2rem; margin-bottom: 10px; font-weight: 600; }
.tl-item__body h3 span { color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.tl-item__body ul { display: flex; flex-direction: column; gap: 6px; }
.tl-item__body li { color: var(--text-dim); font-size: 0.95rem; font-weight: 300; padding-left: 16px; position: relative; }
.tl-item__body li::before { content: "—"; position: absolute; left: 0; color: var(--muted); }

/* ===== Projects ===== */
.projects__sub {
  display: flex; align-items: center; gap: 12px;
  font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text);
  margin: 0 0 24px;
}
.projects__sub::before {
  content: ""; width: 26px; height: 3px; border-radius: 3px; background: var(--grad);
}
.projects + .projects__sub,
.featured + .projects__sub { margin-top: 56px; }
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

/* Featured (대표 프로젝트) */
.featured { display: grid; gap: 22px; }
.feature-card {
  position: relative; background: var(--surface);
  border: 1px solid rgba(241, 104, 60, 0.28); border-radius: 20px;
  padding: clamp(26px, 4vw, 40px); overflow: hidden; box-shadow: var(--shadow);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.feature-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 120% at 100% 0%, rgba(246, 162, 60, 0.14), transparent 55%);
}
.feature-card:hover { transform: translateY(-5px); box-shadow: 0 26px 60px rgba(180, 110, 60, 0.22); }
.feature-card > * { position: relative; }
.feature-card__badge {
  display: inline-block; font-family: "Inter", sans-serif; font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.04em; color: #fff; background: var(--grad);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
  box-shadow: 0 6px 16px rgba(241, 104, 60, 0.3);
}
.feature-card__title { font-size: clamp(1.4rem, 3vw, 1.95rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.feature-card__title span { color: var(--muted); font-weight: 500; font-size: 0.62em; }
.feature-card__lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--accent); font-weight: 600; margin-bottom: 26px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 26px; }
.feature-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.feature-block__icon { font-size: 1.5rem; margin-bottom: 10px; }
.feature-block h4 { font-size: 1.05rem; margin-bottom: 8px; font-weight: 600; }
.feature-block p { color: var(--text-dim); font-size: 0.92rem; font-weight: 300; line-height: 1.6; }
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.flow__step {
  font-size: 0.85rem; font-weight: 500; color: var(--text);
  background: rgba(241, 104, 60, 0.08); border: 1px solid rgba(241, 104, 60, 0.22);
  padding: 8px 14px; border-radius: 10px;
}
.flow__arrow { color: var(--accent); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  font-size: 0.85rem; font-weight: 500; color: var(--text);
  background: rgba(241, 104, 60, 0.08); border: 1px solid rgba(241, 104, 60, 0.22);
  padding: 8px 14px; border-radius: 10px;
}
.chip--wip { color: var(--muted); background: transparent; border-style: dashed; }
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; position: relative; overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(120% 100% at 0% 0%, rgba(246, 162, 60, 0.12), transparent 50%);
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-6px); border-color: rgba(241, 104, 60, 0.38);
  box-shadow: 0 20px 50px rgba(180, 110, 60, 0.18);
}
.card:hover::before { opacity: 1; }
.card__tag {
  display: inline-block; font-size: 0.74rem; letter-spacing: 0.06em; font-weight: 600;
  color: var(--accent); background: rgba(241, 104, 60, 0.1);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 16px;
}
.card h3 { font-size: 1.2rem; margin-bottom: 12px; font-weight: 600; letter-spacing: -0.01em; }
.card p { color: var(--text-dim); font-size: 0.95rem; font-weight: 300; margin-bottom: 18px; }
.card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.card__meta span {
  font-family: "Inter", sans-serif; font-size: 0.74rem; color: var(--muted);
  border: 1px solid var(--line); padding: 4px 10px; border-radius: 6px;
}
@media (max-width: 760px) { .projects { grid-template-columns: 1fr; } }

/* ===== Contact ===== */
.section--contact { text-align: center; }
.contact__title { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: -0.02em; margin: 14px 0 36px; line-height: 1.25; }
.contact__links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.contact__files { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }
.contact__files a {
  color: var(--text-dim); font-size: 0.92rem; font-weight: 400;
  transition: color 0.25s var(--ease);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
}
.contact__files a:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ===== Footer ===== */
.footer {
  text-align: center; padding: 50px 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.88rem;
}
.footer__sub { font-family: "Inter", sans-serif; font-size: 0.78rem; margin-top: 6px; opacity: 0.7; }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
/* stagger children inside grids */
.about__stats .reveal:nth-child(2) { transition-delay: 0.1s; }
.about__stats .reveal:nth-child(3) { transition-delay: 0.2s; }
.skills .reveal:nth-child(2) { transition-delay: 0.1s; }
.skills .reveal:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
