:root {
  --bg: #f8f7fb;
  --surface: #ffffff;
  --surface-2: #f3f0f8;
  --text: #1e1b24;
  --muted: #6f667b;
  --line: #e7e0ef;
  --primary: #5f0080;
  --primary-2: #7a1fa2;
  --shadow: 0 10px 30px rgba(58, 19, 87, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR",
    "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(180deg, #faf8fc 0%, #f7f5fb 100%);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.01em;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section-sm {
  padding: 72px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(95, 0, 128, 0.08);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.section-title {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(248, 247, 251, 0.82);
  border-bottom: 1px solid rgba(231, 224, 239, 0.7);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #8432b5);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  font-size: 15px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

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

.lang-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  color: var(--primary);
  border-color: #d9c8ea;
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 10px 24px rgba(95, 0, 128, 0.22);
}

.btn.secondary {
  background: white;
  color: var(--primary);
  border-color: rgba(95, 0, 128, 0.15);
}

/* Hero */
.hero {
  padding: 72px 0 44px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: stretch;
}

.hero-card,
.panel,
.metric-card,
.timeline-item,
.project-card,
.skill-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px;
  background:
    radial-gradient(circle at top right, rgba(95, 0, 128, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fcfbfe 100%);
  animation: floatHero 6s ease-in-out infinite;
  transition: all 0.3s ease;
}

.hero-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(58, 19, 87, 0.12);
}

@keyframes floatHero {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
  100% { transform: translateY(0px); }
}

.hero-title {
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-title .accent {
  color: var(--primary);
}

.hero-desc {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
}

.hero-highlight {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

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

.hero-side {
  display: grid;
  gap: 16px;
}

.panel {
  padding: 22px;
}

.panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.info-list,
.mini-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li,
.mini-list li {
  color: var(--muted);
  font-size: 15px;
}

.info-list strong,
.mini-list strong {
  color: var(--text);
}

.metrics {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #faf8fd 100%);
}

.metric-value {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.metric-label {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

/* Section layouts */
.two-col {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  margin-top: 28px;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.skill-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.skill-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.skill-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Timeline */
.timeline {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.timeline-item {
  padding: 24px;
  border-radius: var(--radius-lg);
}

.timeline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.timeline-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.timeline-role {
  margin: 6px 0 0;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
}

.timeline-date {
  white-space: nowrap;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 8px 12px;
}

.timeline-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
}

.timeline-list li + li {
  margin-top: 6px;
}

/* Projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 30px;
}

.project-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(95, 0, 128, 0.05), transparent 30%),
    #ffffff;
  transition: all 0.25s ease;
  opacity: 0;
  transform: translateY(30px);
}

.project-card.show {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(58, 19, 87, 0.12);
  border-color: #e4d8f3;
}

.result-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
  box-shadow: 0 8px 20px rgba(95, 0, 128, 0.16);
}

.project-tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(95, 0, 128, 0.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 14px;
}

.project-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.3;
}

.project-summary {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.project-meta {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.project-meta div {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  font-size: 14px;
  color: var(--text);
}

.project-meta strong {
  color: var(--primary);
}

/* Contact */
.contact-card {
  padding: 28px;
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.contact-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

footer {
  padding: 36px 0 56px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

/* Animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .two-col,
  .project-grid,
  .skill-grid,
  .contact-card {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-card {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .topbar-inner {
    min-height: 64px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding-top: 36px;
  }

  .hero-card,
  .panel,
  .timeline-item,
  .project-card,
  .skill-card,
  .contact-card {
    padding: 20px;
    border-radius: 18px;
  }

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

  .hero-actions,
  .contact-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .timeline-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-date {
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, var(--max-width));
  }

  .section,
  .section-sm {
    padding: 56px 0;
  }

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

  .hero-title {
    font-size: 38px;
  }

  .section-title {
    font-size: 30px;
  }
}
