:root {
  color-scheme: light;
  --ink: #172026;
  --muted: #5b6770;
  --line: #d7dde2;
  --paper: #f7f8f5;
  --surface: #ffffff;
  --accent: #006d77;
  --accent-strong: #0b4f5d;
  --warm: #ef8354;
  --shadow: 0 18px 44px rgba(23, 32, 38, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(215, 221, 226, 0.8);
  background: rgba(247, 248, 245, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  font-weight: 800;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.hero {
  display: grid;
  place-items: center;
  align-items: center;
  min-height: calc(100vh - 68px);
  padding: clamp(52px, 8vw, 96px) clamp(18px, 5vw, 72px) clamp(34px, 5vw, 64px);
  text-align: center;
}

.hero__copy {
  max-width: 680px;
}

.hero__profile {
  display: block;
  width: clamp(132px, 16vw, 196px);
  height: clamp(132px, 16vw, 196px);
  margin: 0 auto 28px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(4rem, 14vw, 9.5rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.12rem;
}

.hero__lead {
  max-width: 560px;
  margin-right: auto;
  margin-left: auto;
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  font-weight: 800;
}

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

.button--ghost {
  color: var(--accent-strong);
}

.section {
  padding: clamp(56px, 9vw, 112px) clamp(18px, 5vw, 72px);
}

.section--surface {
  background: var(--surface);
}

.section__heading {
  max-width: 1080px;
  margin: 0 auto 34px;
}

.timeline {
  max-width: 1080px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.timeline__item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline__item span {
  color: var(--accent-strong);
  font-weight: 800;
}

.timeline__item p,
.profile p,
.project-card p,
.modal__content p,
.achievement-card dd {
  color: var(--muted);
  line-height: 1.7;
}

.project-grid {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1fr);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  outline: none;
}

.project-card__media {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 320px;
  height: 100%;
  overflow: hidden;
  background: #dfe9e7;
}

.project-card__media img,
.project-card__media video {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
}

.media-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 4vw, 34px);
}

.project-card__body h3 {
  margin: 0;
  font-size: 1.35rem;
}

.project-card__body p {
  margin-bottom: 0;
}

.project-card__meta {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-card__meta span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.profile {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 0.8fr);
  gap: clamp(28px, 6vw, 88px);
}

.profile > div,
.skill-list {
  max-width: 620px;
}

.skill-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.skill-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.skill-list dt {
  font-weight: 800;
}

.skill-list dd {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 30px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent-strong);
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 22, 0.68);
}

.modal__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1fr);
  width: min(1120px, 100%);
  height: min(760px, calc(100vh - 48px));
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.modal__media {
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: #dfe9e7;
  position: sticky;
  top: 0;
  align-self: stretch;
}

.modal__media img,
.modal__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.modal__content {
  min-height: 0;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 52px);
}

.modal__content h2 {
  margin-bottom: 18px;
}

.modal__meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 18px;
  margin: 26px 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.modal__meta dt {
  color: var(--muted);
  font-weight: 700;
}

.modal__meta dd {
  margin: 0;
  font-weight: 800;
}

.modal__detail h3 {
  margin-bottom: 16px;
}

.achievement-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.achievement-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.achievement-card h4 {
  margin-bottom: 14px;
  font-size: 1rem;
}

.achievement-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.achievement-card div {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
}

.achievement-card dt {
  color: var(--accent-strong);
  font-weight: 800;
}

.achievement-card dd {
  margin: 0;
}

body.modal-open {
  overflow: hidden;
}

#profile-desc {
  margin-top: 12px;
}

@media (max-width: 1080px) {
  .project-card {
    grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  nav {
    justify-content: flex-start;
  }

  .profile,
  .modal__panel {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .timeline__item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .project-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

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

  .modal {
    padding: 12px;
  }

  .modal__panel {
    height: auto;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .modal__media {
    position: relative;
    min-height: 260px;
    height: 320px;
    max-height: none;
  }

  .modal__content {
    overflow: visible;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 3.4rem;
  }

  .hero__actions,
  .button {
    width: 100%;
  }
}
