/* IT철학자
   Reading: developer portfolio for clients, sharp and quiet.
   Dials: variance 7, motion 7, density 4.
   Radius: buttons pill, shells 1.5rem, inputs 0.75rem.
   Accent: terracotta, one family. Semantic danger is separate.
   Z: skip 50, nav 40, menu 30. */

@font-face {
  font-family: Pretendard;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Pretendard-Regular.subset.woff2") format("woff2");
}

@font-face {
  font-family: Pretendard;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Pretendard-SemiBold.subset.woff2") format("woff2");
}

@font-face {
  font-family: Pretendard;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Pretendard-Bold.subset.woff2") format("woff2");
}

:root {
  --bg: #e7eaee;
  --bg-2: #f5f7f9;
  --ink: #16191d;
  --muted: #3a424c;
  --line: rgb(22 25 29 / 0.12);
  --line-strong: rgb(22 25 29 / 0.28);
  --accent: #8a3912;
  --accent-hover: #732f0e;
  --accent-ink: #fffaf7;
  --accent-soft: #f4e7de;
  --danger: #8d1d1d;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --shell: 1.5rem;
  --z-menu: 30;
  --z-nav: 40;
  --z-skip: 50;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #131517;
  --bg-2: #1c1f23;
  --ink: #f2f0ec;
  --muted: #c8c3bb;
  --line: rgb(242 240 236 / 0.14);
  --line-strong: rgb(242 240 236 / 0.32);
  --accent: #f0b08a;
  --accent-hover: #f6c4a6;
  --accent-ink: #1c120c;
  --accent-soft: #2a211c;
  --danger: #ffc2bc;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: Pretendard, "Apple SD Gothic Neo", sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  word-break: keep-all;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: var(--z-skip);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  transform: translateY(-160%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.nav-wrap {
  position: fixed;
  z-index: var(--z-nav);
  top: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding-inline: 1rem;
  pointer-events: none;
}

.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  height: 4rem;
  max-width: 100%;
  padding: 0.35rem 0.4rem 0.35rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-2) 82%, transparent);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.38);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.wordmark {
  margin-right: 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-links a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 500ms var(--ease), background-color 500ms var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: rgb(22 25 29 / 0.05);
}

[data-theme="dark"] .nav-links a:hover {
  background: rgb(242 240 236 / 0.06);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.35rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.icon-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-sun {
  display: none;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

.nav-toggle {
  display: none;
}

.burger,
.burger::before,
.burger::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.burger {
  position: relative;
}

.burger::before,
.burger::after {
  content: "";
  position: absolute;
  left: 0;
  transition: transform 500ms var(--ease);
}

.burger::before {
  transform: translateY(-6px);
}

.burger::after {
  transform: translateY(6px);
}

.nav-toggle[aria-expanded="true"] .burger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .burger::before {
  transform: translateY(0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .burger::after {
  transform: translateY(0) rotate(-45deg);
}

.menu {
  position: fixed;
  z-index: var(--z-menu);
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 6.5rem 1.5rem 3rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  visibility: hidden;
  opacity: 0;
  transition: opacity 500ms var(--ease), visibility 500ms var(--ease);
}

.menu.is-open {
  visibility: visible;
  opacity: 1;
}

.menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.menu a {
  font-size: clamp(2rem, 8vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
  text-decoration: none;
}

.js .menu a {
  opacity: 0;
  transform: translateY(1.25rem);
}

.js .menu.is-open a {
  opacity: 1;
  transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}

.js .menu.is-open a:nth-child(1) { transition-delay: 70ms; }
.js .menu.is-open a:nth-child(2) { transition-delay: 130ms; }
.js .menu.is-open a:nth-child(3) { transition-delay: 190ms; }
.js .menu.is-open a:nth-child(4) { transition-delay: 250ms; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0.35rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: transform 500ms var(--ease), background-color 500ms var(--ease), border-color 500ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn:has(.btn-ico) {
  padding: 0.35rem 0.4rem 0.35rem 1.15rem;
}

.btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  transition: transform 500ms var(--ease);
}

.btn-ico svg {
  width: 1rem;
  height: 1rem;
}

.btn:hover .btn-ico {
  transform: translate(2px, -1px) scale(1.06);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

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

.btn-primary .btn-ico {
  background: rgb(255 250 247 / 0.16);
}

[data-theme="dark"] .btn-primary .btn-ico {
  background: rgb(28 18 12 / 0.12);
}

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

.btn-ghost:hover {
  background: var(--bg-2);
}

.btn-ghost .btn-ico {
  background: rgb(22 25 29 / 0.06);
}

[data-theme="dark"] .btn-ghost .btn-ico {
  background: rgb(242 240 236 / 0.08);
}

.btn[disabled] {
  cursor: progress;
  opacity: 0.72;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding: 6rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
  width: 100%;
}

.hero h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(2.25rem, 4.5vw, 3.65rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.line > span {
  display: block;
}

.mark {
  font-weight: 700;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 94%;
  background-size: 100% 0.08em;
}

.hero-lead {
  max-width: 34em;
  margin: 1.15rem 0 0;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 1.05rem 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
}

.marquee-track span {
  padding: 0 1.35rem;
  border-left: 1px solid var(--line);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.bezel {
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--shell);
  background: color-mix(in srgb, var(--ink) 5%, var(--bg));
}

.bezel-core {
  overflow: hidden;
  border-radius: calc(var(--shell) - 0.45rem);
  background: var(--bg-2);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.42);
}

.hero-photo {
  height: min(62dvh, 640px);
  min-height: 320px;
}

.hero-photo .bezel {
  display: flex;
  height: 100%;
}

.hero-photo .bezel-core {
  flex: 1;
  min-height: 0;
}

.hero-photo img {
  height: 100%;
}

.hero-photo img,
.tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo img {
  object-position: 64% center;
}

.tile-photo img {
  object-position: center 58%;
}

section {
  padding: clamp(5.5rem, 11vw, 8.5rem) 0;
  scroll-margin-top: 1.5rem;
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.section-lead {
  max-width: 36em;
  margin: 0.9rem 0 0;
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 0.9rem;
  margin-top: 2.5rem;
}

.tile-web {
  grid-row: span 2;
}

.tile-web .bezel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tile-photo {
  min-height: 280px;
  flex: 1;
}

.tile-photo .bezel-core,
.tile-photo img {
  height: 100%;
  min-height: 280px;
}

.tile-copy {
  padding: 1.15rem 0.85rem 0.7rem;
}

.tile-copy h3,
.tile-text h3,
.method h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.3;
}

.tile-copy p,
.tile-text p,
.method p,
.stance p,
.contact-copy p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.name-list {
  display: grid;
  gap: 0.15rem;
  margin: 0.95rem 0 0;
  padding: 0;
  list-style: none;
}

.name-list li {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.45;
  color: var(--ink);
}

.tile-text .bezel,
.tile-text .bezel-core {
  height: 100%;
}

.tile-text .bezel-core {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
  padding: 1.5rem;
}

.tile-soft .bezel {
  background: var(--accent-soft);
  border-color: transparent;
}

.tile-soft .bezel-core {
  background: transparent;
  box-shadow: none;
}

.stance-copy {
  max-width: 38rem;
  margin-left: clamp(0rem, 6vw, 4.5rem);
}

.stance-copy .section-title {
  max-width: 10em;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.18;
}

.stance-copy p {
  max-width: 34em;
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

.method {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 2rem;
  margin: 2.5rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.method h3 {
  font-size: clamp(1.6rem, 2.4vw, 2rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.tg-id {
  display: inline-block;
  margin-top: 1.35rem;
  color: var(--accent);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.2;
  text-decoration: none;
}

.contact-note {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.form-inner {
  padding: clamp(1.15rem, 2vw, 1.6rem);
  background: var(--bg-2);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.field + .field {
  margin-top: 1rem;
}

.field label {
  font-size: 0.95rem;
  font-weight: 600;
}

.hint,
.field-error,
.form-status {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.hint {
  color: var(--muted);
}

.field-error,
.form-status.is-error {
  color: var(--danger);
}

.field-error:empty {
  display: none;
}

input,
textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

textarea {
  min-height: 9.5rem;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  margin-top: 1.25rem;
}

.form-status:empty {
  display: none;
}

.site-footer {
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1.5rem;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer a {
  font-weight: 600;
  text-decoration: none;
}

.missing {
  display: flex;
  align-items: center;
  min-height: 100dvh;
  padding: 7rem 0 4rem;
}

.missing h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.missing p {
  margin: 1rem 0 0;
  color: var(--muted);
}

.missing .btn {
  margin-top: 1.75rem;
}

@media (prefers-reduced-motion: no-preference) {
  .js .line > span,
  .js .hero-lead,
  .js .hero-actions,
  .js .hero-photo {
    opacity: 0;
    transform: translateY(115%);
  }

  .js .hero-lead,
  .js .hero-actions,
  .js .hero-photo {
    transform: translateY(1.4rem);
  }

  .js .hero-photo img {
    transform: scale(1.08);
  }

  .js .hero.is-ready .line > span,
  .js .hero.is-ready .hero-lead,
  .js .hero.is-ready .hero-actions,
  .js .hero.is-ready .hero-photo {
    opacity: 1;
    transform: none;
    transition: opacity 900ms var(--ease), transform 900ms var(--ease);
  }

  .js .hero.is-ready .line:nth-child(2) > span {
    transition-delay: 120ms;
  }

  .js .hero.is-ready .hero-lead {
    transition-delay: 240ms;
  }

  .js .hero.is-ready .hero-actions {
    transition-delay: 360ms;
  }

  .js .hero.is-ready .hero-photo {
    transition-delay: 160ms;
    transition-duration: 1100ms;
  }

  .js .hero.is-ready .hero-photo img {
    transform: none;
    transition: transform 1400ms var(--ease);
  }

  .marquee-track {
    animation: marquee 36s linear infinite;
  }

  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }

  .tile-photo img {
    transition: transform 800ms var(--ease);
  }

  .tile-web:hover .tile-photo img {
    transform: scale(1.05);
  }

  .js .name-list li {
    opacity: 0;
    transform: translateY(0.7rem);
  }

  .js .tile.is-in .name-list li {
    opacity: 1;
    transform: none;
    transition: opacity 650ms var(--ease), transform 650ms var(--ease);
  }

  .js .tile.is-in .name-list li:nth-child(1) { transition-delay: 60ms; }
  .js .tile.is-in .name-list li:nth-child(2) { transition-delay: 120ms; }
  .js .tile.is-in .name-list li:nth-child(3) { transition-delay: 180ms; }
  .js .tile.is-in .name-list li:nth-child(4) { transition-delay: 240ms; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.25rem);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
  transition-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js .menu a,
  .js .line > span,
  .js .hero-lead,
  .js .hero-actions,
  .js .hero-photo,
  .js .hero-photo img,
  .js .name-list li {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    row-gap: 0.4rem;
  }

  .marquee-track [data-clone] {
    display: none;
  }

  .burger::before,
  .burger::after,
  .btn,
  .btn-ico,
  .menu,
  .nav-links a {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav,
  .menu {
    background: var(--bg-2);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav-cta {
    display: none;
  }

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

  .nav {
    padding-left: 1rem;
  }
}

@media (max-width: 767px) {
  .wrap {
    width: min(1180px, calc(100% - 2rem));
  }

  .hero {
    align-items: flex-start;
    padding-top: 6rem;
  }

  .hero-grid,
  .work-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    height: 46dvh;
    min-height: 240px;
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .tile-web {
    grid-row: auto;
  }

  .tile-text .bezel-core {
    min-height: 0;
  }

  .stance-copy {
    margin-left: 0;
  }

  .method {
    display: flex;
    gap: 1.25rem;
    margin-right: calc(50% - 50vw);
    padding-right: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .method::-webkit-scrollbar {
    display: none;
  }

  .method li {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }

  .site-footer .wrap {
    align-items: flex-start;
    flex-direction: column;
  }
}
