:root {
  --bg: #f2ece4;
  --surface: rgba(255, 252, 246, 0.82);
  --surface-strong: #fffaf1;
  --text: #172126;
  --muted: #465058;
  --line: rgba(23, 33, 38, 0.12);
  --accent: #0e7c66;
  --accent-strong: #0a5d4d;
  --accent-soft: #d6efe8;
  --shadow: 0 18px 60px rgba(15, 31, 38, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 124, 102, 0.2), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 184, 108, 0.22), transparent 28%),
    linear-gradient(180deg, #f6f0e7 0%, #ece4d8 100%);
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 0 28px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 250, 241, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand,
.nav {
  font-family: "Space Grotesk", sans-serif;
}

.brand {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
}

.nav a {
  position: relative;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.25s ease;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.nav a:hover,
.nav a.active,
.contact-links a:hover {
  color: var(--accent-strong);
}

.section {
  padding: 48px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 28px;
  min-height: 76vh;
  align-items: center;
}

.hero-copy h1 {
  margin: 10px 0 18px;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.eyebrow {
  margin: 0;
  color: var(--accent-strong);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-text,
.content-card p,
.project-summary,
.project-points,
.contact-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.capability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.capability-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(23, 33, 38, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 31, 38, 0.1);
}

.button.primary {
  background: var(--accent);
  color: #f7fbf9;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.85);
}

.button.tertiary {
  border: 1px solid rgba(23, 33, 38, 0.14);
  background: rgba(255, 255, 255, 0.34);
}

.button.tertiary:hover {
  background: rgba(255, 255, 255, 0.6);
}

.hero-panel,
.content-card,
.project-card,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

.stat-card {
  padding: 24px;
  border-radius: 22px;
  background: linear-gradient(135deg, #12352d, #0e7c66);
  color: #ecfff8;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
  line-height: 1.15;
}

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.stat-grid article {
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-strong);
}

.stat-grid span,
.meta {
  display: block;
  color: var(--muted);
}

.stat-grid strong {
  display: block;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.2rem;
}

.section-heading {
  margin-bottom: 22px;
}

.secondary-heading {
  margin-top: 28px;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.1;
}

.content-card,
.project-card,
.contact-card {
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.strength-grid .content-card:hover,
.skills-layout .content-card:hover,
.mini-projects .content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 70px rgba(15, 31, 38, 0.16);
}

.longform {
  max-width: 860px;
}

.strength-grid,
.skills-layout,
.timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.core-stack {
  margin-bottom: 20px;
}

.stack-hero {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 251, 245, 0.96), rgba(233, 247, 242, 0.96));
  box-shadow: var(--shadow);
}

.stack-hero h3 {
  margin: 8px 0 0;
  font-size: clamp(1.5rem, 2.3vw, 2.2rem);
}

.core-stack-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.core-stack-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.core-stack-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.core-stack-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(15, 31, 38, 0.14);
}

.core-stack-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.core-stack-item span,
.cluster-label {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.core-stack-item span {
  font-size: 0.8rem;
}

.cluster-label {
  color: var(--accent-strong);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.proficiency-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.proficiency-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: var(--shadow);
}

.proficiency-head h3 {
  margin: 6px 0 0;
  font-size: 1.15rem;
}

.proficiency-items {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.proficiency-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: center;
  gap: 12px;
}

.proficiency-row span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(23, 33, 38, 0.09);
}

.fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0e7c66, #2aa88d);
  transition: width 0.8s ease;
}

.fill-95 { width: 95%; }
.fill-92 { width: 92%; }
.fill-90 { width: 90%; }
.fill-88 { width: 88%; }
.fill-84 { width: 84%; }
.fill-78 { width: 78%; }
.fill-76 { width: 76%; }
.fill-74 { width: 74%; }
.fill-72 { width: 72%; }
.fill-70 { width: 70%; }
.fill-64 { width: 64%; }
.fill-62 { width: 62%; }
.fill-60 { width: 60%; }
.fill-58 { width: 58%; }
.fill-56 { width: 56%; }

.stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.project-role {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px solid rgba(14, 124, 102, 0.18);
  border-radius: 999px;
  background: rgba(214, 239, 232, 0.56);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.project-role strong {
  padding-right: 10px;
  border-right: 1px solid rgba(14, 124, 102, 0.2);
}

.project-role span {
  color: var(--text);
  word-break: keep-all;
}

.project-story {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.story-block {
  padding: 14px 16px;
  border: 1px solid rgba(23, 33, 38, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.story-block h4 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.story-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.result-block {
  background: linear-gradient(135deg, rgba(214, 239, 232, 0.65), rgba(255, 249, 239, 0.78));
}

.experience-role {
  margin: 12px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.compact-story {
  margin-top: 14px;
}

.stack-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(23, 33, 38, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.stack-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.skills-layout ul,
.project-points {
  margin: 14px 0 0;
  padding-left: 18px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.project-list {
  display: grid;
  gap: 18px;
}

.showcase-list {
  gap: 28px;
}

.project-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.72)),
    var(--surface);
}

.showcase-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(0, 1.15fr);
  gap: 22px;
  align-items: start;
}

.showcase-copy {
  position: sticky;
  top: 104px;
}

.showcase-media {
  display: grid;
  gap: 14px;
}

.showcase-note {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.showcase-media.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.showcase-media.mosaic {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.zoomable {
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.zoomable:hover {
  transform: scale(1.02);
}

.media-frame.wide {
  grid-column: 1 / -1;
}

.media-frame img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.diagram-frame img {
  max-height: 320px;
  object-fit: contain;
}

.media-frame.wide.diagram-frame img {
  max-height: 420px;
}

.screen-frame img {
  max-height: 260px;
  object-fit: cover;
  object-position: top center;
}

.media-frame figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.mini-projects {
  margin-top: 18px;
  display: grid;
  gap: 18px;
}

.project-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.project-head h3,
.content-card h3 {
  margin: 0;
  font-size: 1.35rem;
}

.project-date {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.project-index {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(14, 124, 102, 0.18));
  color: var(--accent-strong);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.stack {
  margin: 18px 0 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--accent-strong);
  font-size: 0.95rem;
}

.contact-section {
  padding-bottom: 84px;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #fff8ec, #eefaf5);
}

.contact-copy {
  max-width: 620px;
}

.contact-note {
  margin-top: 8px;
  font-size: 0.96rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.contact-links a {
  transition: color 0.2s ease;
}

.footer {
  padding: 0 0 36px;
  text-align: center;
  color: var(--muted);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 14, 18, 0.82);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  width: min(1100px, 100%);
  max-height: calc(100vh - 48px);
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-content img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  background: #fff;
  border-radius: 16px;
}

.lightbox-content p {
  margin: 12px 0 0;
  color: #4e5962;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.skip-link:focus {
  top: 16px;
}

.nav a.active {
  color: var(--accent-strong);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 50;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--accent-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero,
  .strength-grid,
  .skills-layout,
  .timeline,
  .contact-card,
  .showcase-card,
  .showcase-media.two-up,
  .showcase-media.mosaic,
  .proficiency-board {
    grid-template-columns: 1fr;
    display: grid;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 12px;
  }

  .hero-copy h1 br {
    display: none;
  }

  .hero-actions {
    gap: 10px;
  }

  .button {
    min-width: 0;
    white-space: normal;
  }

  .contact-card {
    justify-content: flex-start;
  }

  .contact-links {
    width: 100%;
  }

  .showcase-copy {
    position: static;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
  }

  .topbar,
  .hero-panel,
  .content-card,
  .project-card,
  .contact-card {
    border-radius: 22px;
  }

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

  .hero-copy h1 {
    font-size: 2rem;
    line-height: 1.12;
  }

  .diagram-frame img,
  .media-frame.wide.diagram-frame img,
  .screen-frame img {
    max-height: none;
  }

  .core-stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-text {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .capability-chips {
    gap: 8px;
  }

  .capability-chip {
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.76rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .project-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-actions .button,
  .contact-links .button {
    width: 100%;
  }

  .project-head {
    align-items: flex-start;
    gap: 10px;
  }

  .project-head h3 {
    width: 100%;
    font-size: 1.2rem;
  }

  .project-date {
    order: 3;
    width: 100%;
    margin-top: -2px;
  }

  .project-role {
    width: 100%;
    align-items: flex-start;
    border-radius: 18px;
  }

  .project-role strong {
    border-right: 0;
    padding-right: 0;
  }

  .project-story {
    gap: 10px;
  }

  .story-block {
    padding: 13px 14px;
  }

  .proficiency-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .stack-badges {
    gap: 6px;
  }

  .stack-badge {
    font-size: 0.74rem;
  }

  .nav {
    gap: 12px;
    font-size: 0.92rem;
  }

  .back-to-top {
    bottom: 20px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }
}

/* Submission PDF override */
.privacy-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.reveal {
  opacity: 1 !important;
  transform: none !important;
}
@media print {
  @page {
    size: A4;
    margin: 11mm;
  }

  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --text: #172126;
    --muted: #465058;
    --line: rgba(23, 33, 38, 0.16);
    --accent-soft: #eef7f4;
    --shadow: none;
  }

  html,
  body {
    background: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .page-shell {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .skip-link,
  .topbar,
  .back-to-top,
  .lightbox {
    display: none !important;
  }

  .section {
    padding: 20px 0;
    break-inside: auto;
    page-break-inside: auto;
  }

  .hero {
    display: grid;
    grid-template-columns: 1.18fr 0.82fr;
    gap: 18px;
    min-height: auto !important;
    align-items: start;
    padding-top: 0;
    padding-bottom: 18px;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hero-copy h1 {
    margin: 8px 0 12px;
    font-size: 2.08rem;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .hero-text {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .privacy-note {
    margin-top: 12px;
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .capability-chips {
    gap: 8px;
    margin-top: 14px;
  }

  .capability-chip {
    min-height: 30px;
    padding: 0 10px;
    background: #ffffff;
    font-size: 0.72rem;
  }

  .hero-actions {
    margin-top: 16px;
  }

  .button {
    min-height: 36px;
    padding: 0 13px;
    font-size: 0.82rem;
  }

  .hero-panel {
    padding: 16px;
  }

  .stat-card {
    padding: 16px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--text);
  }

  .stat-grid {
    gap: 10px;
  }

  .stat-grid article {
    padding: 13px;
    background: #ffffff;
    border: 1px solid var(--line);
  }

  .hero-panel,
  .content-card,
  .project-card,
  .contact-card,
  .proficiency-card,
  .stack-hero,
  .story-block,
  .project-visual {
    background: #ffffff !important;
    box-shadow: none !important;
  }

  .content-card,
  .project-card,
  .project-showcase,
  .experience-item {
    break-inside: avoid;
  }
}
