/* ============================================================
   HOME — Soft Swiss / Contemporary Editorial
   ============================================================
   Palette + layout are scoped to the homepage only (these tokens
   are declared here, not in base.css, so other pages keep their
   own dark theme untouched).
   ============================================================ */

:root {
  --home-bg:      #F4F3EF;
  --home-ink:     #252525;
  --home-ink-2:   #777774;
  --home-border:  #D8D7D2;
  --home-sage:    #A7B8A3;
  --home-gutter:  clamp(1.5rem, 6vw, 5rem);
}

html, body {
  overflow-x: hidden;
  background: var(--home-bg);
}

body {
  color: var(--home-ink);
  background-image:
    linear-gradient(rgba(244, 243, 239, 0.95), rgba(244, 243, 239, 0.95)),
    url(../assets/World/texture.png);
  background-repeat: no-repeat, repeat;
}

.home {
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--home-gutter);
}

/* ─────────────────────────────
   HERO
───────────────────────────── */
.hero {
  padding-block: clamp(4rem, 11vw, 7.5rem) clamp(3rem, 6vw, 5rem);
}

.hero__meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  margin-bottom: clamp(2.5rem, 7vw, 5rem);
}

.hero__index,
.hero__name {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--home-ink-2);
}

.hero__index { 
  justify-self: start; 
}

.hero__name  { 
  grid-column: 2; 
  justify-self: center; 
  position: relative; 
  top: -5rem; 
}

.hero__title {
  position: relative;
  font-family: var(--font-sans);
  font-weight: 650;
  font-size: clamp(3rem, 8vw, 7.25rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--fontColor);
  max-width: 22ch;
  opacity: 0;
  transform: translateX(-120px);
  animation: heroTitleIn 2.2s cubic-bezier(0.3, 0.8, 0.3, 1) forwards;
  animation-delay: 0.3s;
}

@keyframes heroTitleIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero__title::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(167, 184, 163, 0.35), transparent 70%);
  top: 50%;
  left: 80%;
  transform: translate(-50%, -50%);
  filter: blur(80px);
  animation: floatGlow 30s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes floatGlow {
  0%   { transform: translate(-50%, -85%) scale(0.9); animation-timing-function: ease-in; }
  50%  { transform: translate(-50%, -50%) scale(1.08); animation-timing-function: ease-in-out; }
  100% { transform: translate(-50%, -85%) scale(0.9); }
}

.hero__foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  margin-top: clamp(2.5rem, 7vw, 5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--home-border);
}

.hero__bio {
  font-family: var(--font-sans);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--home-ink-2);
  max-width: 34ch;
}

.hero__links {
  display: flex;
  gap: 0.625rem;
  flex-shrink: 0;
}

.pill-link {
  display: inline-block;
  padding: 0.55rem 1.375rem;
  border: 1px solid var(--home-border);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--home-ink);
  text-decoration: none;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.pill-link:hover {
  background: var(--home-ink);
  border-color: var(--home-ink);
  color: var(--home-bg);
}

/* ─────────────────────────────
   SELECTED WORKS
───────────────────────────── */
.work {
  padding-block: clamp(1rem, 4vw, 2rem) clamp(6rem, 11vw, 9rem);
}

.work__head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.work__index {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--home-ink-2);
}

.work__label {
  color: var(--home-ink-2) !important;
}

.work-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.work-item {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 1 / 1.05;
  border-radius: 22px;
  overflow: hidden;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  text-decoration: none;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.work-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(37, 37, 35, 0.28);
}

.work-item.live-space      { background: var(--background-ls-card); }
.work-item.forgotten-pages { background: var(--background-fp-card); }
.work-item.seoul-festival  { background: var(--background-sf-card); }
.work-item.jeon-stack      { background: var(--background-js-card); }
.work-item.tesla-coaching    { background: var(--background-tc-card); }

.work-item.live-space .work-item__title,
.work-item.live-space .work-item__meta      { color: var(--font-color-ls); }
.work-item.forgotten-pages .work-item__title,
.work-item.forgotten-pages .work-item__meta { color: var(--font-color-fp); }
.work-item.seoul-festival .work-item__title,
.work-item.seoul-festival .work-item__meta  { color: var(--font-color-sf); }
.work-item.jeon-stack .work-item__title,
.work-item.jeon-stack .work-item__meta      { color: var(--font-color-js); }
.work-item.tesla-coaching .work-item__title,
.work-item.tesla-coaching .work-item__meta      { color: var(--font-color-tc); }

.work-item__head {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.work-item__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  letter-spacing: -0.01em;
  max-width: 60%;
}

.work-item__meta {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  text-align: right;
  max-width: 42%;
  opacity: 0.85;
}

.work-item__media {
  position: relative;
  z-index: 1;
  flex: 1;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.work-item__img {
  max-width: 92%;
  max-height: 92%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.45);
  transition: transform 0.5s var(--ease);
}

.work-item__img_Seoul {
  max-width: 60%;
  max-height: 60%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, 0.45);
  transition: transform 0.5s var(--ease);
}

.work-item:hover .work-item__img {
  transform: scale(1.04);
}

/* ── Mobile ── */
@media (max-width: 768px) {
  html, body { overflow: auto; }

  .hero__meta { margin-bottom: 2.25rem; }

  .work-list {
    grid-template-columns: 1fr;
  }

  .work-item {
    aspect-ratio: 4 / 3.6;
  }
}
