:root {
  --bg: #0c1015;
  --bg-soft: #11161d;
  --surface: rgba(18, 24, 32, 0.88);
  --surface-strong: #121821;
  --ink: #f3f5f7;
  --ink-soft: #a4aeba;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #8eb0ff;
  --accent-soft: rgba(142, 176, 255, 0.14);
  --accent-warm: #d3a56c;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1180px;
  --transition: 220ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Noto Sans KR",
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(211, 165, 108, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(142, 176, 255, 0.1), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.is-nav-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

::selection {
  color: #ffffff;
  background: var(--accent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 16px 0;
  backdrop-filter: blur(14px);
  background: rgba(12, 16, 21, 0.72);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #09101a;
  background: linear-gradient(135deg, #bcd0ff, #7ea5ff);
  box-shadow: 0 10px 24px rgba(126, 165, 255, 0.18);
}

.brand__text {
  display: block;
}

.brand__text strong,
.site-nav a,
.button {
  font-family: "Space Grotesk", sans-serif;
}

.brand__text strong {
  display: block;
  font-size: 0.98rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-nav a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
  transition: transform var(--transition), opacity var(--transition);
}

.section {
  padding: 32px 0 96px;
}

.section--soft {
  background: rgba(255, 255, 255, 0.02);
}

.hero {
  padding: 56px 0 64px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

.hero__copy,
.hero__panel,
.summary-card,
.project-card,
.contact__inner {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(18, 24, 32, 0.9);
  border-radius: var(--radius-xl);
  padding: 40px;
}

.hero__panel {
  height: 100%;
  background: rgba(18, 24, 32, 0.76);
  border-radius: var(--radius-xl);
  padding: 24px;
}

.hero__copy h1,
.section-heading h2,
.contact__copy h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5.5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.section-heading h2,
.contact__copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.hero__lede,
.project-card__body p,
.summary-card p,
.contact__copy p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.hero__lede {
  max-width: 39rem;
  margin-top: 22px;
  font-size: 1.06rem;
}

.hero__actions,
.project-card__actions,
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  transition:
    transform var(--transition),
    background var(--transition),
    border-color var(--transition);
}

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

.button--primary {
  color: #09101a;
  background: #f3f5f7;
}

.button--secondary {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.hero__panel {
  display: grid;
  gap: 18px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.hero-card__label,
.hero-card span {
  display: block;
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.hero-card h2,
.hero-card strong {
  margin: 8px 0 0;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.hero-card p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.hero-facts {
  display: grid;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 18px;
  height: 100%;
}

.hero-card--stat {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  text-align: center;
}

.hero-card--stat strong {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  display: grid;
  gap: 18px;
}

.summary-card {
  background: rgba(18, 24, 32, 0.72);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.summary-card h3,
.project-card__body h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 28px;
}

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

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
}

.project-card__media {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background: linear-gradient(135deg, rgba(142, 176, 255, 0.08), rgba(211, 165, 108, 0.06));
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-card__body {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 30px;
}

.project-card__actions a,
.project-card__actions span {
  font-size: 0.92rem;
  color: #c7d2de;
}

.project-card__actions a {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.project-carousel,
.project-carousel__track,
.project-carousel__slide {
  height: 100%;
  min-height: inherit;
}

.project-carousel {
  position: relative;
  min-height: inherit;
}

.project-carousel__track {
  position: relative;
}

.project-carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 320ms ease;
}

.project-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.project-carousel__button {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.66);
  color: #f3f5f7;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.project-carousel__button--prev {
  left: 16px;
}

.project-carousel__button--next {
  right: 16px;
}

.project-carousel__button span {
  font-size: 1.6rem;
  line-height: 1;
}

.project-carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 2;
  display: inline-flex;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.56);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.project-carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.project-carousel__dot.is-active {
  background: #f3f5f7;
}

.project-card__media--root {
  background: #090c10;
}

.video-frame {
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #090c10;
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.root-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at top, rgba(142, 176, 255, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    #101721;
}

.root-preview__phone {
  position: relative;
  width: min(100%, 220px);
  aspect-ratio: 9 / 18;
  padding: 14px;
  border-radius: 32px;
  background: linear-gradient(180deg, #1b2430, #0c1118);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 40px rgba(0, 0, 0, 0.34);
}

.root-preview__camera {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(-50%);
}

.root-preview__screen {
  display: grid;
  gap: 10px;
  height: 100%;
  padding: 14px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(126, 165, 255, 0.2), rgba(18, 24, 32, 0)),
    #121a24;
}

.root-preview__hero {
  height: 112px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(126, 165, 255, 0.54), rgba(211, 165, 108, 0.3));
}

.root-preview__title {
  margin-top: 4px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.root-preview__row {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.root-preview__row--short {
  width: 72%;
}

.root-preview__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.root-preview__grid span {
  display: block;
  aspect-ratio: 1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.contact {
  padding: 0 0 48px;
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 36px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(142, 176, 255, 0.08), rgba(211, 165, 108, 0.05));
}

.minor-projects {
  margin-top: 32px;
}

.minor-projects__title {
  margin: 0 0 16px;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.minor-projects__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.minor-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(18, 24, 32, 0.72);
  box-shadow: var(--shadow);
}

.minor-card h4 {
  margin: 0 0 8px;
  font-size: 1.08rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.minor-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.minor-card__meta span:first-child {
  color: #48d8a4;
}

.minor-card__meta span:last-child {
  color: var(--ink-dim);
}

.minor-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.minor-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.minor-card__actions a {
  font-size: 0.9rem;
  color: #c7d2de;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.minor-card__actions span {
  font-size: 0.9rem;
  color: #c7d2de;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 500ms ease,
    transform 500ms ease;
}

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

@media (max-width: 980px) {
  .hero__inner,
  .project-card,
  .contact__inner {
    grid-template-columns: 1fr;
  }

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

  .minor-projects__grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-card__media {
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 6px 0 2px;
  }

  body.is-nav-open .site-nav {
    display: flex;
  }

  body.is-nav-open .nav-toggle span:first-child {
    transform: translateY(3.5px) rotate(45deg);
  }

  body.is-nav-open .nav-toggle span:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
  }

  .hero {
    padding-top: 36px;
  }

  .hero__copy,
  .hero__panel,
  .summary-card,
  .contact__inner {
    padding: 24px;
  }

  .hero__copy h1,
  .section-heading h2,
  .contact__copy h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

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

  .minor-projects__grid {
    grid-template-columns: 1fr;
  }

  .project-card__body {
    padding: 24px;
  }

  .project-card__media {
    min-height: 240px;
  }

  .minor-card__meta {
    flex-direction: column;
    gap: 6px;
  }

  .project-carousel__button {
    width: 38px;
    height: 38px;
  }

  .root-preview__phone {
    width: min(100%, 200px);
  }

  .contact__actions {
    width: 100%;
  }

  .contact__actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
