/* ═══════════════════════════════════════════════════════════
   SHARON PALLATH — PORTFOLIO 2026
   Editorial theme · dark grid · Italiana + Inter
   Home: single-viewport 3D orbit gallery (spiral / list)
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg: #0b0a09;
  --ink: #0c0c0c;
  --bone: #ece8e0;
  --sand: #d8d2c4;
  --dim: rgba(236, 232, 224, 0.65);
  --mute: rgba(236, 232, 224, 0.45);
  --faint: rgba(236, 232, 224, 0.25);
  --hair: rgba(236, 232, 224, 0.12);
  --grid: rgba(236, 232, 224, 0.045);
  --serif: "Italiana", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --pad: clamp(1.25rem, 3.2vw, 2.8rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@font-face {
  font-family: "Harabara";
  src: url("../assets/fonts/Harabara.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

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

html { background: var(--bg); }

body {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 108px 108px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 108px 108px,
    radial-gradient(120% 90% at 50% 40%, #0e0d0b 0%, #0b0a09 55%, #080807 100%);
  color: var(--bone);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
}
body.is-home { overflow: hidden; height: 100svh; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
a, button { touch-action: manipulation; }
:focus-visible { outline: 1px solid var(--sand); outline-offset: 5px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

.micro {
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--sand);
}

/* ═══════════ LOADER ═══════════ */

.loader {
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
}
.loader__name { font-family: var(--serif); font-size: clamp(1.8rem, 4.4vw, 3rem); letter-spacing: 0.08em; }
.loader__pct { font-size: 0.64rem; letter-spacing: 0.3em; color: var(--mute); font-variant-numeric: tabular-nums; }

/* ═══════════ TOP BAR ═══════════ */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: 5.4rem;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }

.bar__logo {
  width: 2.9rem; height: 2.9rem; border-radius: 50%;
  border: 1px solid rgba(236, 232, 224, 0.28);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em;
  color: var(--bone);
  transition: background-color 0.4s, color 0.4s, border-color 0.4s;
}
.bar__logo:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }

.bar__toggle {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.85rem;
}
.toggle-btn {
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  color: var(--mute);
  padding: 0.5rem 0.1rem;
  transition: color 0.4s;
}
.toggle-btn.is-active { color: var(--bone); }
.toggle-btn:hover { color: var(--sand); }
.bar__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

.pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--bone); color: var(--ink);
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.02em;
  transition: transform 0.45s var(--ease), background-color 0.4s;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); transition: transform 0.4s var(--ease); }
.pill:hover { transform: scale(1.05); background: #fff; }
.pill:hover i { transform: scale(1.5); }

/* ═══════════ HOME STAGE ═══════════ */

.stage {
  position: fixed; inset: 0;
  perspective: 1300px;
  perspective-origin: 50% 42%;
}
.orbit {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.card {
  position: absolute; top: 40%; left: 50%;
  width: var(--cardW, 300px);
  aspect-ratio: 2 / 3;
  margin-left: calc(var(--cardW, 300px) / -2);
  margin-top: calc(var(--cardW, 300px) * -0.75);
  border-radius: 14px;
  overflow: hidden;
  will-change: transform, filter;
  cursor: pointer;
  backface-visibility: hidden;
  background: #141210;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transition: filter 0.55s ease, transform 0.7s var(--ease);
}
.card:hover img { filter: grayscale(0) contrast(1); transform: scale(1.045); }
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(236, 232, 224, 0.08);
  pointer-events: none;
}

/* hero type block — lifted above the caption row */
.hero-type {
  position: fixed; left: 0; right: 0; bottom: 9.6rem; z-index: 40;
  text-align: center;
  pointer-events: none;
  padding: 0 var(--pad);
}
.hero-type__eyebrow {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.34em;
  color: var(--sand); text-transform: uppercase;
  margin-bottom: 1rem;
}
.hero-type__name {
  font-family: "Harabara", var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7.2vw, 7rem);
  line-height: 1;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
}
.hero-hint {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 0.9rem; z-index: 41;
  font-size: 0.64rem; letter-spacing: 0.3em; color: var(--mute);
  pointer-events: none;
}

/* caption — centered below the name */
.caption {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 5.6rem; z-index: 41;
  justify-content: center;
  display: flex; align-items: center; gap: 0.9rem;
  pointer-events: none;
  max-width: 40vw;
}
.caption__num { font-size: 0.7rem; letter-spacing: 0.22em; color: var(--sand); font-variant-numeric: tabular-nums; }
.caption__line { width: 2.6rem; height: 1px; background: rgba(236, 232, 224, 0.35); flex-shrink: 0; }
.caption__text {
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bone);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* rotating circular badge bottom-left */
.badge {
  position: fixed; left: var(--pad); bottom: 4.6rem; z-index: 41;
  width: 8.6rem; height: 8.6rem;
  pointer-events: none;
}
.badge svg { width: 100%; height: 100%; overflow: visible; animation: badge-spin 22s linear infinite; }
.badge text {
  font-family: var(--sans); font-size: 10.5px; font-weight: 500;
  letter-spacing: 3.4px; text-transform: uppercase;
  fill: var(--sand);
}
.badge::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 7px; height: 7px; margin: -3.5px;
  border-radius: 50%; background: var(--sand);
}
@keyframes badge-spin { to { transform: rotate(360deg); } }

/* ═══════════ MENU OVERLAY ═══════════ */

.menu {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 8, 7, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0; visibility: hidden;
  display: flex; align-items: center; justify-content: center;
}
.menu__links { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.menu__link {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7.5vh, 4.6rem);
  line-height: 1.16;
  color: var(--dim);
  display: flex; align-items: baseline; gap: 1.1rem;
  transition: color 0.4s, letter-spacing 0.55s var(--ease);
}
.menu__link em { font-family: var(--sans); font-style: normal; font-size: 0.6rem; letter-spacing: 0.3em; color: var(--mute); }
.menu__link:hover, .menu__link.is-current { color: var(--bone); letter-spacing: 0.06em; }
.menu__foot {
  position: absolute; bottom: 2.2rem; left: 0; right: 0;
  text-align: center;
  font-size: 0.62rem; letter-spacing: 0.28em; color: var(--mute);
}

/* ═══════════ SUBPAGES ═══════════ */

.page {
  min-height: 100svh;
  display: flex; flex-direction: column;
  padding: clamp(7rem, 16vh, 10rem) var(--pad) 2.4rem;
  max-width: 880px; margin: 0 auto;
}
.page__head { text-align: center; margin-bottom: clamp(2.6rem, 7vh, 4.6rem); }
.page__eyebrow {
  font-size: 0.68rem; font-weight: 500; letter-spacing: 0.34em;
  color: var(--sand); text-transform: uppercase;
  margin-bottom: 1.4rem;
}
.page__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.2rem, 9vw, 5.5rem);
  line-height: 0.95; letter-spacing: 0.02em;
  color: var(--bone);
}
.page__intro {
  font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.6;
  color: var(--dim);
  max-width: 52ch; margin: 1.8rem auto 0;
}

.page__foot {
  margin-top: auto;
  padding-top: clamp(3.5rem, 9vh, 6rem);
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  font-size: 0.72rem; letter-spacing: 0.06em; color: var(--mute);
}

/* about */
.about-portrait {
  width: min(340px, 72vw); margin: 0 auto clamp(2.4rem, 6vh, 4rem);
  border-radius: 14px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.about-portrait img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.6s ease, transform 0.8s var(--ease);
}
.about-portrait:hover img { filter: grayscale(0); transform: scale(1.03); }
.about-body {
  columns: 2; column-gap: 3rem;
  font-size: 0.94rem; line-height: 1.75; color: rgba(236, 232, 224, 0.75);
  margin-bottom: clamp(3rem, 8vh, 5rem);
}
.about-body p { break-inside: avoid; margin-bottom: 1.2rem; }
.clients { border-top: 1px solid var(--hair); padding-top: 2.2rem; }
.clients__label {
  font-size: 0.66rem; font-weight: 500; letter-spacing: 0.3em;
  color: var(--mute); text-transform: uppercase;
  margin-bottom: 1.6rem;
}
.clients__list { display: flex; flex-wrap: wrap; gap: 0.9rem 2.6rem; }
.clients__list li {
  font-family: var(--serif); font-size: 1.5rem;
  color: rgba(236, 232, 224, 0.85);
  transition: color 0.35s;
}
.clients__list li:hover { color: var(--bone); }

/* contact */
.contact-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2.6rem 2rem;
  border-top: 1px solid var(--hair);
  padding-top: clamp(2.4rem, 6vh, 3.6rem);
}
.contact-cols h3 {
  font-size: 0.62rem; font-weight: 500; letter-spacing: 0.3em;
  color: var(--mute); text-transform: uppercase;
  margin-bottom: 1rem;
}
.contact-cols a, .contact-cols p {
  display: block;
  font-size: 0.9rem; line-height: 2; color: rgba(236, 232, 224, 0.8);
  transition: color 0.3s; width: fit-content;
}
.contact-cols a:hover { color: var(--bone); }

/* portfolio */
.works-list { border-top: 1px solid var(--hair); }
.work-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.6rem;
  padding: 1.35rem 0.2rem;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  transition: opacity 0.4s, padding-left 0.5s var(--ease);
}
.work-row strong {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem); line-height: 1.1;
  color: rgba(236, 232, 224, 0.85);
  transition: color 0.35s;
}
.work-row span { font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--mute); flex-shrink: 0; }
.works-list:hover .work-row { opacity: 0.4; }
.works-list .work-row:hover { opacity: 1; padding-left: 1rem; }
.work-row:hover strong { color: var(--bone); }

.work-preview {
  position: fixed; z-index: 60; top: 0; left: 0;
  width: clamp(170px, 19vw, 280px); aspect-ratio: 2 / 3;
  border-radius: 12px; overflow: hidden;
  pointer-events: none; opacity: 0; transform: scale(0.9);
}
.work-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ═══════════ RESPONSIVE ═══════════ */

@media (max-width: 760px) {
  .bar { height: 4.6rem; }
  .bar__toggle { position: static; transform: none; }
  .bar { gap: 0.8rem; }
  .pill { padding: 0.6rem 1rem; }
  .hero-type { bottom: 8rem; }
  .hero-type__name { font-size: clamp(1.7rem, 8.6vw, 3.4rem); }
  .caption { bottom: 4.6rem; max-width: 86vw; }
  .badge { display: none; }
  .hero-hint { bottom: 0.7rem; }
  .about-body { columns: 1; }
  .menu__link { font-size: clamp(2.2rem, 6.4vh, 3.4rem); }
  .work-preview { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .badge svg { animation: none; }
  .card img, .about-portrait img { transition: none; }
}
