@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

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

:root {
  --black: #0a0a0a;
  --white: #fafafa;
  --muted: #888;
  --border: rgba(10,10,10,0.1);
  --border-inv: rgba(250,250,250,0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Pretendard', sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  word-break: keep-all;
  overflow-x: hidden;
}

/* ── Scroll progress bar ── */
#progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--black);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1000;
  transition: transform 0.1s linear;
}

/* ── Navbar ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(250,250,250,0.92);
  backdrop-filter: blur(12px);
  z-index: 100;
}
nav .logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: var(--black);
}
nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
}
nav ul a {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
  transition: opacity 0.2s;
}
nav ul a:hover { opacity: 0.5; }

/* ── 3D Wireframe Backgrounds ── */
.bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.cube-wrap {
  position: absolute;
  perspective: 900px;
}
.cube {
  position: relative;
  transform-style: preserve-3d;
}
.cube-face {
  position: absolute;
  border: 1px solid currentColor;
}
@keyframes rotateCubeA {
  0%   { transform: rotateX(18deg) rotateY(0deg); }
  50%  { transform: rotateX(32deg) rotateY(180deg); }
  100% { transform: rotateX(18deg) rotateY(360deg); }
}
@keyframes rotateCubeB {
  0%   { transform: rotateX(22deg) rotateY(0deg); }
  50%  { transform: rotateX(12deg) rotateY(180deg); }
  100% { transform: rotateX(22deg) rotateY(360deg); }
}
.diamond-wrap {
  position: absolute;
  perspective: 700px;
}
.diamond-svg {
  display: block;
  transform-style: preserve-3d;
}
@keyframes rotateDiamondA {
  0%   { transform: rotateX(-15deg) rotateY(0deg); }
  50%  { transform: rotateX(20deg) rotateY(180deg); }
  100% { transform: rotateX(-15deg) rotateY(360deg); }
}
@keyframes rotateDiamondB {
  0%   { transform: rotateX(10deg) rotateY(0deg); }
  50%  { transform: rotateX(-10deg) rotateY(180deg); }
  100% { transform: rotateX(10deg) rotateY(360deg); }
}

/* ── Sections ── */
section { position: relative; overflow: hidden; }
.inner { position: relative; z-index: 1; }

/* ── Hero ── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 96px 40px 64px;
  background: var(--white);
}
.hero-grid {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 64px;
  align-items: center;
}
.hero-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.hero-name {
  font-size: clamp(64px, 10vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero-subtitle {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 32px;
}
.hero-divider {
  width: 32px;
  height: 2px;
  background: var(--black);
  margin-bottom: 28px;
}
.hero-desc {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  max-width: 480px;
}
.hero-img-wrap {
  aspect-ratio: 3/4;
  max-height: 520px;
  overflow: hidden;
  filter: grayscale(100%);
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* ── Section Header ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 64px;
}
.section-header.inv {
  border-bottom-color: var(--border-inv);
}
.section-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-tag.inv { color: rgba(250,250,250,0.4); }

/* ── Projects ── */
#projects {
  padding: 96px 40px;
  background: var(--black);
  color: var(--white);
}
.projects-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2px;
}
.project-card {
  display: block;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-inv);
  padding: 36px 32px 72px;
  text-decoration: none;
  color: var(--white);
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.04);
  opacity: 0;
  transition: opacity 0.2s;
}
.project-card:hover::before { opacity: 1; }
.project-card-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250,250,250,0.4);
  margin-bottom: 16px;
}
.project-card-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--white);
}
.project-card-summary {
  font-size: 13px;
  color: rgba(250,250,250,0.6);
  line-height: 1.75;
  margin-bottom: 24px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
}
.tag.dark {
  border-color: rgba(0,0,0,0.18);
  color: rgba(0,0,0,0.65);
}
.project-card-arrow {
  position: absolute;
  bottom: 32px;
  right: 32px;
  font-size: 18px;
  opacity: 0.25;
  transition: opacity 0.2s, transform 0.2s;
}
.project-card:hover .project-card-arrow {
  opacity: 0.8;
  transform: translate(4px, -4px);
}

/* ── Contact ── */
#contact {
  padding: 96px 40px;
  background: var(--black);
  color: var(--white);
}
.contact-inner {
  max-width: 900px;
  margin: 0 auto;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}
.contact-item-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250,250,250,0.35);
  margin-bottom: 10px;
}
.contact-item-value {
  font-size: 15px;
  font-weight: 400;
  color: rgba(250,250,250,0.85);
}
.contact-item-value a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  transition: border-color 0.2s;
}
.contact-item-value a:hover { border-color: rgba(255,255,255,0.8); }

/* ── Footer ── */
footer {
  padding: 32px 40px;
  background: var(--black);
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  letter-spacing: 0.08em;
  border-top: 1px solid var(--border-inv);
}

/* ── Project Detail Page ── */
.detail-page {
  padding-top: 64px;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s;
  margin-bottom: 64px;
}
.detail-back:hover { color: var(--black); }
.detail-back::before { content: '←'; font-size: 14px; }

.detail-hero {
  padding: 80px 40px 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.detail-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}
.detail-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
.detail-title {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.detail-summary {
  font-size: 16px;
  color: #555;
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: 32px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.detail-tags .tag {
  border-color: rgba(0,0,0,0.18);
  color: rgba(0,0,0,0.65);
}

.detail-image-section {
  padding: 64px 40px;
  background: #f0f0f0;
}
.detail-image-inner {
  max-width: 900px;
  margin: 0 auto;
}
.detail-image-inner img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
}
.detail-image-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 16px;
  letter-spacing: 0.06em;
}

.detail-body {
  padding: 72px 40px 96px;
  background: var(--white);
}
.detail-body-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 48px 64px;
}
.detail-section {}
.detail-section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.detail-section ul {
  list-style: none;
  padding: 0;
}
.detail-section li {
  font-size: 14px;
  color: #444;
  padding: 5px 0 5px 16px;
  position: relative;
  line-height: 1.65;
}
.detail-section li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--muted);
  font-size: 11px;
}
.detail-subsection {
  margin-top: 20px;
}
.detail-subsection:first-child { margin-top: 0; }
.detail-subsection-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  nav ul { gap: 20px; }
  #hero { padding: 80px 20px 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-img-wrap { order: -1; max-height: 320px; }
  #projects, #contact { padding: 72px 20px; }
  .detail-hero, .detail-image-section, .detail-body { padding-left: 20px; padding-right: 20px; }
  .detail-body-inner { grid-template-columns: 1fr; }
  .detail-title { font-size: clamp(28px, 8vw, 48px); }
}
