:root {
  color-scheme: light;
  --ink: #20232c;
  --muted: #737985;
  --blue: #5266f4;
  --blue-dark: #394bd1;
  --blue-pale: #f0f2ff;
  --paper: #f7f8fb;
  --white: #fff;
  --line: #e8eaf0;
  --shadow: 0 24px 70px rgba(37, 45, 80, 0.1);
  --font: Inter, "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font);
  line-height: 1.7;
  word-break: keep-all;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

::selection {
  color: var(--white);
  background: var(--blue);
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(232, 234, 240, 0.8);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

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

.logo {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.07em;
  text-decoration: none;
}

.logo img {
  width: 86px;
  height: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav a {
  border-radius: 999px;
  padding: 9px 13px;
  color: #656b78;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.nav a:hover {
  color: var(--blue-dark);
  background: var(--blue-pale);
}

.nav .nav-contact {
  margin-left: 5px;
  color: var(--white);
  background: var(--blue);
}

.nav .nav-contact:hover {
  color: var(--white);
  background: var(--blue-dark);
}

.hero {
  overflow: hidden;
  padding: 96px 0 108px;
  background:
    radial-gradient(ellipse at 82% 26%, rgba(82, 102, 244, 0.1), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfbff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 68px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 23px;
  height: 2px;
  content: "";
  background: currentColor;
}

.hero h1 {
  max-width: 590px;
  margin: 0 0 22px;
  font-size: clamp(46px, 6vw, 74px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.075em;
}

.hero h1 em {
  color: var(--blue);
  font-style: normal;
}

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  padding: 12px 19px;
  color: var(--white);
  background: var(--blue);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(82, 102, 244, 0.2);
}

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

.button-secondary:hover {
  color: var(--blue-dark);
  border-color: #cdd2ff;
  background: var(--blue-pale);
  box-shadow: none;
}

.hero-visual {
  position: relative;
  min-height: 490px;
}

.hero-photo {
  position: absolute;
  inset: 0 32px 0 46px;
  overflow: hidden;
  border-radius: 48% 48% 12px 12px;
  background: #dce5f1;
  box-shadow: var(--shadow);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 47%;
}

.hero-label {
  position: absolute;
  right: 0;
  bottom: 34px;
  max-width: 225px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 19px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 40px rgba(37, 45, 80, 0.12);
}

.hero-label strong,
.hero-label span {
  display: block;
}

.hero-label strong {
  font-size: 16px;
}

.hero-label span {
  color: var(--muted);
  font-size: 12px;
}

.hero-stamp {
  position: absolute;
  top: 42px;
  left: 4px;
  width: 94px;
  height: 94px;
  display: grid;
  place-items: center;
  border: 8px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  line-height: 1.25;
  transform: rotate(-9deg);
}

.section {
  padding: 100px 0;
}

.section-soft {
  background: var(--paper);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 40px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 49px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.06em;
}

.section-heading p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
}

.section-kicker {
  margin: 0 0 9px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
}

/* 경력: 수업 이미지 3×3 갤러리 */
.class-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.class-item {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-pale);
}

.class-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s ease;
}

.class-item:hover img {
  transform: scale(1.05);
}

@media (max-width: 680px) {
  .class-gallery {
    gap: 8px;
  }

  .class-item {
    border-radius: 6px;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: start;
}

.about-copy {
  color: var(--muted);
  font-size: 16px;
}

.about-copy strong {
  color: var(--ink);
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 25px;
}

.tag {
  border: 1px solid #e1e4ff;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--blue-dark);
  background: var(--blue-pale);
  font-size: 12px;
  font-weight: 750;
}

.skill-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.skill-item {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.skill-index {
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.skill-item strong {
  font-size: 14px;
}

.skill-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.skill-status {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--blue-dark);
  background: var(--blue-pale);
  font-size: 11px;
  font-weight: 800;
}

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

.service-card {
  min-height: 215px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  background: var(--white);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.service-number {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  margin-bottom: 23px;
  border-radius: 12px;
  color: var(--blue-dark);
  background: var(--blue-pale);
  font-size: 13px;
  font-weight: 900;
}

.service-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.03em;
}

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

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -10px 0 28px;
}

.filter-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 15px;
  color: var(--muted);
  background: var(--white);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.filter-button[aria-pressed="true"],
.filter-button:hover {
  border-color: var(--blue);
  color: var(--white);
  background: var(--blue);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 20px;
}

.project-card[hidden] {
  display: none;
}

.project-image {
  aspect-ratio: 1.42;
  overflow: hidden;
  border-radius: 10px;
  background: #e9ebf4;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.project-card:hover .project-image img {
  transform: scale(1.045);
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 4px;
}

.project-meta span {
  color: var(--blue-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-meta time {
  color: var(--muted);
  font-size: 11px;
}

.project-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.04em;
}

.project-card p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.project-count {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.approach {
  padding: 76px 0;
  color: var(--white);
  background: var(--blue);
}

.approach-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.approach blockquote {
  margin: 0;
  font-size: clamp(25px, 3.2vw, 39px);
  font-weight: 780;
  line-height: 1.4;
  letter-spacing: -0.05em;
}

.approach-copy {
  color: rgba(255, 255, 255, 0.82);
}

.approach-copy strong {
  display: block;
  margin-bottom: 10px;
  color: var(--white);
  font-size: 17px;
}

.approach-copy p {
  margin: 0;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.journal-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.journal-card img {
  width: 100%;
  aspect-ratio: 1.65;
  object-fit: cover;
}

/* 세로 사진: 인물 얼굴이 잘리지 않도록 위쪽 기준으로 자르기 */
.journal-card img.img-focus-top {
  object-position: center 20%;
}

.journal-card-content {
  padding: 20px;
}

.journal-card time {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 800;
}

.journal-card h3 {
  margin: 7px 0;
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: -0.04em;
}

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

.guestbook-section {
  background: #f7f8ff;
}

.guestbook-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) 1.28fr;
  align-items: start;
  gap: 24px;
}

.guestbook-panel,
.guest-message,
.empty-message,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.guestbook-panel {
  position: sticky;
  top: 98px;
  padding: 26px;
}

.form-field {
  margin-bottom: 15px;
}

.form-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid #dfe2e9;
  border-radius: 8px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fcfcfd;
  font-size: 14px;
}

.form-field textarea {
  min-height: 112px;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(82, 102, 244, 0.12);
}

.guestbook-status,
.contact-status {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.guestbook-status[data-state="error"],
.contact-status[data-state="error"] {
  color: #b42318;
}

.guestbook-status[data-state="success"],
.contact-status[data-state="success"] {
  color: #18794e;
}

.guestbook-list {
  display: grid;
  gap: 12px;
}

.guest-message {
  padding: 20px;
}

.guest-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.guest-message-name {
  font-weight: 850;
}

.guest-message-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.guest-message-time {
  color: var(--muted);
  font-size: 11px;
}

.guest-message-delete {
  border: 0;
  border-radius: 6px;
  padding: 4px 7px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.guest-message-delete:hover {
  color: #b42318;
  background: #fff1f0;
}

.guest-message p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.empty-message {
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

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

.contact-card {
  max-width: 740px;
  margin: 0 auto;
  padding: 30px;
  box-shadow: var(--shadow);
}

.contact-note {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}

.contact-card textarea {
  min-height: 150px;
}

.contact-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

footer {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-size: 12px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner a {
  color: var(--blue-dark);
  font-weight: 750;
  text-decoration: none;
}

@media (max-width: 900px) {
  .topbar-inner {
    gap: 14px;
  }

  .nav {
    gap: 0;
  }

  .nav a {
    padding: 8px 9px;
    font-size: 14px;
  }

  .hero {
    padding: 76px 0 82px;
  }

  .hero-grid {
    gap: 36px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .about-grid {
    gap: 40px;
  }
}

@media (max-width: 680px) {
  html {
    scroll-padding-top: 122px;
  }

  .container {
    width: min(100% - 32px, 540px);
  }

  .topbar-inner {
    min-height: 68px;
    display: block;
    padding-top: 9px;
  }

  .logo {
    display: block;
    width: fit-content;
    margin: 0 auto 2px;
    font-size: 18px;
    line-height: 1.5;
  }

  .nav {
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 7px;
  }

  .nav a {
    flex: 0 0 auto;
    padding: 5px 9px;
    font-size: 13px;
  }

  .nav .nav-contact {
    margin-left: 0;
  }

  .hero {
    padding: 62px 0 68px;
  }

  .hero-grid,
  .about-grid,
  .approach-inner,
  .guestbook-grid {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    gap: 42px;
  }

  .hero h1 {
    font-size: clamp(43px, 12vw, 62px);
  }

  .hero-copy {
    font-size: 15px;
  }

  .hero-visual {
    min-height: min(112vw, 440px);
  }

  .hero-photo {
    inset: 0 18px 0 26px;
  }

  .hero-label {
    right: 0;
    bottom: 20px;
  }

  .hero-stamp {
    top: 25px;
    left: 0;
    width: 78px;
    height: 78px;
    border-width: 6px;
    font-size: 11px;
  }

  .section {
    padding: 72px 0;
  }

  .section-heading {
    display: block;
    margin-bottom: 28px;
  }

  .section-heading p {
    margin-top: 10px;
    font-size: 14px;
  }

  .about-grid {
    gap: 36px;
  }

  .service-grid,
  .project-grid,
  .journal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .service-card {
    min-height: 205px;
    padding: 19px;
  }

  .service-card h3 {
    font-size: 15px;
  }

  .service-card p,
  .project-card p,
  .journal-card p {
    font-size: 12px;
  }

  .project-image {
    aspect-ratio: 1.15;
  }

  .project-meta {
    display: block;
  }

  .project-meta time {
    display: block;
    margin-top: 2px;
  }

  .project-card h3 {
    font-size: 15px;
  }

  .skill-item {
    grid-template-columns: 30px 1fr;
    gap: 10px;
  }

  .skill-status {
    grid-column: 2;
    justify-self: start;
  }

  .approach {
    padding: 58px 0;
  }

  .approach-inner {
    gap: 24px;
  }

  .guestbook-panel {
    position: static;
  }

  .contact-card {
    padding: 22px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 3px;
  }
}

@media (max-width: 400px) {
  .service-grid,
  .project-grid,
  .journal-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 0;
  }

  .project-image {
    aspect-ratio: 1.5;
  }

  .journal-card img {
    aspect-ratio: 1.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
