/* ==========================================================================
   Roy Puramadam — Lyricist
   Dark editorial portfolio. Static site, no dependencies, no build step.
   ========================================================================== */

:root {
  --bg:       #08090a;
  --bg-2:     #0d0f11;
  --surface:  #121517;
  --line:     rgba(255, 255, 255, 0.09);
  --line-2:   rgba(255, 255, 255, 0.18);
  --text:     #f1f4f3;
  --text-2:   #c3cbc9;
  --muted:    #7e8b89;
  --accent:   #3ed3b0;
  --accent-2: #7ff0d4;
  --accent-d: #17836c;

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono:    "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ml:      "Noto Sans Malayalam", sans-serif;

  --wrap: 1180px;
  --ease: cubic-bezier(.16, .84, .32, 1);

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; line-height: .98; letter-spacing: -0.035em; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
em { font-style: italic; color: var(--text); }

:where(a, button):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 3px; }

[lang="ml"] { font-family: var(--ml); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 26px; }

.dot { color: var(--accent); }

.skip { position: absolute; left: -9999px; z-index: 200; background: var(--accent); color: #04120e; padding: 10px 16px; font-weight: 600; }
.skip:focus { left: 14px; top: 14px; }

/* --- Scroll progress --------------------------------------------------- */

.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--accent-d), var(--accent));
  z-index: 120; transition: width .1s linear;
}

/* --- Nav ---------------------------------------------------------------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding-block: 18px;
  transition: background .4s var(--ease), padding .4s var(--ease), border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 12px;
}
.nav-in { display: flex; align-items: center; gap: 26px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 16.5px; letter-spacing: -0.02em; margin-right: auto; }
.links { display: flex; gap: 26px; }
.links a {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); transition: color .25s; position: relative; padding-block: 4px;
}
.links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--accent); transition: width .3s var(--ease);
}
.links a:hover { color: var(--text); }
.links a:hover::after { width: 100%; }
.cta {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--accent); color: var(--accent);
  padding: 9px 18px; border-radius: 999px; transition: all .3s var(--ease);
}
.cta:hover { background: var(--accent); color: #04120e; }

/* --- Side rail ---------------------------------------------------------- */

.rail {
  position: fixed; left: 22px; bottom: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.rail-line { width: 1px; height: 90px; background: linear-gradient(var(--line-2), transparent); }
.rail-text {
  writing-mode: vertical-rl; font-size: 11px; color: var(--muted);
  letter-spacing: .18em; margin-bottom: 26px;
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; will-change: transform; }
.hero-media picture { display: contents; }
.hero-media img {
  width: 100%; height: 118%; object-fit: cover;
  /* Desktop crop: hold him right of centre so the headline sits in the dark space. */
  object-position: 32% 42%;
  filter: grayscale(.16) contrast(1.03) brightness(1.28);
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    /* Hold the left dark so the headline keeps its contrast, and let his side breathe. */
    linear-gradient(90deg,
      rgba(8,9,10,.88) 0%,
      rgba(8,9,10,.72) 26%,
      rgba(8,9,10,.34) 48%,
      rgba(8,9,10,.06) 68%,
      rgba(8,9,10,.18) 100%),
    /* Light top-and-bottom shading, fading into the page colour beneath. */
    linear-gradient(180deg,
      rgba(8,9,10,.55) 0%,
      rgba(8,9,10,.06) 30%,
      rgba(8,9,10,.34) 74%,
      var(--bg) 98%);
}
/* No portrait supplied yet: fall back to an atmospheric gradient. */
.no-portrait .hero-media img { display: none; }
.no-portrait .hero-veil {
  background:
    radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%),
    linear-gradient(180deg, #0c1013, var(--bg));
}

.hero-in { position: relative; z-index: 2; padding-top: 60px; }

.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .22em;
  color: var(--accent); text-transform: uppercase; margin-bottom: 26px;
}
.hero-title { font-size: clamp(56px, 12.5vw, 168px); letter-spacing: -0.05em; }
.hero-title .l1, .hero-title .l2 { display: block; }
.hero-title .l2 { margin-left: clamp(0px, 4vw, 60px); }

.hero-rule {
  display: block; width: min(420px, 60%); height: 1px; margin: 34px 0 26px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.hero-sub { max-width: 54ch; color: var(--text-2); font-size: clamp(15px, 1.8vw, 18px); }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.cue-line { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); animation: cue 2.1s var(--ease) infinite; }
.cue-text { font-family: var(--mono); font-size: 9.5px; letter-spacing: .3em; color: var(--muted); }
@keyframes cue { 0%, 100% { transform: scaleY(.35); opacity: .4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; transform-origin: top; } }

/* --- Marquee ------------------------------------------------------------ */

.marquee {
  border-block: 1px solid var(--line); padding-block: 20px;
  overflow: hidden; background: var(--bg-2);
}
.marquee-track { display: flex; width: max-content; animation: slide 34s linear infinite; }
.marquee-track span {
  font-family: var(--display); font-size: clamp(20px, 3vw, 34px); font-weight: 500;
  letter-spacing: -0.02em; color: var(--text-2); white-space: nowrap; padding-right: 24px;
}
.marquee-track i { color: var(--accent); font-style: normal; padding-inline: 24px; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* --- Section furniture -------------------------------------------------- */

section { position: relative; }
.intro, .songs, .about, .films, .voices, .gallery, .contact { padding-block: clamp(72px, 11vw, 150px); }

.label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.label.sub { margin-top: 64px; }
.sec-title { font-size: clamp(40px, 7vw, 92px); margin-bottom: 20px; }
.sec-lede { max-width: 56ch; color: var(--muted); font-size: 15.5px; margin-bottom: 54px; }

/* --- Intro statement ---------------------------------------------------- */

.big-statement {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(24px, 4.2vw, 52px); line-height: 1.22; letter-spacing: -0.03em;
  max-width: 21ch; margin: 0;
}
.big-statement .w { display: inline-block; opacity: .14; transition: opacity .5s var(--ease); }
.big-statement .w.lit { opacity: 1; }

/* --- Songs -------------------------------------------------------------- */

.songlist li {
  display: grid; grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: baseline; gap: 22px;
  padding: 26px 0; border-top: 1px solid var(--line);
  transition: border-color .3s;
}
.songlist li:last-child { border-bottom: 1px solid var(--line); }
.songlist li:hover { border-top-color: var(--accent); }
.num, .fnum { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: .1em; }
.stitle {
  font-family: var(--display); font-size: clamp(21px, 3vw, 34px); font-weight: 500;
  letter-spacing: -0.025em; transition: color .3s, transform .4s var(--ease);
}
.songlist li:hover .stitle { color: var(--accent); transform: translateX(8px); }
.smeta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; letter-spacing: .04em; }
.smeta b { color: var(--text-2); font-weight: 400; }

/* --- About -------------------------------------------------------------- */

.about-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(34px, 6vw, 80px); }
.about-right p { color: var(--text-2); font-size: 16.5px; line-height: 1.75; }
.quote {
  margin: 34px 0; padding: 26px 28px;
  border-left: 2px solid var(--accent); background: var(--surface);
}
.quote p {
  margin: 0; font-family: var(--display); font-weight: 400;
  font-size: clamp(17px, 2.1vw, 21px); line-height: 1.5;
  letter-spacing: -0.015em; color: var(--text);
}
.quote cite {
  display: block; margin-top: 16px; font-style: normal;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.quote cite::before { content: "— "; }

.links-row { display: flex; flex-wrap: wrap; gap: 12px 34px; margin: 0; }
.ph { color: var(--accent-2); font-family: var(--mono); font-size: 12.5px; line-height: 1.7; opacity: .85; }

.facts { display: grid; gap: 14px; margin-top: 40px; }
.facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; }

/* --- Films -------------------------------------------------------------- */

.filmlist li {
  display: grid; grid-template-columns: 74px minmax(0, 1.1fr) minmax(0, 1fr) 90px;
  align-items: baseline; gap: 22px;
  padding: 28px 0; border-top: 1px solid var(--line);
  transition: background .3s;
}
.filmlist li:last-child { border-bottom: 1px solid var(--line); }
.filmlist li:hover { background: var(--surface); }
.fname { font-family: var(--display); font-size: clamp(20px, 2.7vw, 31px); font-weight: 500; letter-spacing: -0.025em; }
.fmeta { font-size: 13.5px; color: var(--muted); }
.fyear { font-family: var(--mono); font-size: 13px; color: var(--accent); text-align: right; }

/* --- Voices ------------------------------------------------------------- */

.vlist li { border-top: 1px solid var(--line); padding: 18px 0; }
.vlist li:last-child { border-bottom: 1px solid var(--line); }
.vlist span {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(28px, 5.6vw, 66px); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px var(--line-2);
  transition: color .35s var(--ease), -webkit-text-stroke-color .35s;
  display: inline-block;
}
.vlist li:hover span { color: var(--text); -webkit-text-stroke-color: transparent; }
.vlist.small span { font-size: clamp(20px, 3.4vw, 40px); }

/* --- Gallery ------------------------------------------------------------ */

.grid { columns: 4; column-gap: 14px; }
.gitem {
  break-inside: avoid; margin-bottom: 14px; position: relative;
  overflow: hidden; background: var(--surface); cursor: zoom-in;
  border: 1px solid var(--line);
}
.gitem img {
  width: 100%; height: auto;
  filter: grayscale(.5) brightness(.9);
  transition: transform .7s var(--ease), filter .5s var(--ease);
}
.gitem:hover img { transform: scale(1.045); filter: grayscale(0) brightness(1); }
.gcap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px; font-size: 12px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  opacity: 0; transform: translateY(8px); transition: all .35s var(--ease);
}
.gitem:hover .gcap { opacity: 1; transform: none; }

/* --- Contact ------------------------------------------------------------ */

.contact { border-top: 1px solid var(--line); background: var(--bg-2); }
.contact-title { font-size: clamp(38px, 7.5vw, 96px); margin-bottom: 24px; }
.contact-sub { color: var(--muted); max-width: 46ch; font-size: 16px; margin-bottom: 30px; }
.big-link {
  display: inline-block; font-family: var(--display); font-weight: 500;
  font-size: clamp(20px, 3vw, 34px); letter-spacing: -0.02em;
  color: var(--accent); border-bottom: 1px solid var(--accent-d);
  padding-bottom: 4px; margin-right: 34px; transition: border-color .3s, transform .3s var(--ease);
}
.big-link:hover { border-bottom-color: var(--accent); transform: translateY(-2px); }

/* --- Footer ------------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); padding-block: 40px; }
.foot-in { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.foot-name { font-family: var(--display); font-weight: 700; font-size: 17px; }
.foot-ml { font-family: var(--ml); font-size: 13px; color: var(--accent); }
.foot-legal { width: 100%; font-size: 11.5px; color: var(--muted); margin: 8px 0 0; line-height: 1.7; }

/* --- Lightbox ----------------------------------------------------------- */

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(4, 6, 6, .96);
  display: grid; place-items: center;
  padding: 40px 70px;
  animation: fade .25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lightbox img { max-width: 100%; max-height: 86vh; object-fit: contain; }
.lb-close, .lb-nav {
  position: absolute; background: transparent; border: 1px solid var(--line-2);
  color: var(--text); cursor: pointer; border-radius: 50%;
  width: 44px; height: 44px; font-size: 24px; line-height: 1;
  display: grid; place-items: center; transition: all .25s;
}
.lb-close:hover, .lb-nav:hover { border-color: var(--accent); color: var(--accent); }
.lb-close { top: 22px; right: 22px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--muted); margin: 0; }

/* --- Scroll reveal ------------------------------------------------------ */

[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-delay="1"] { transition-delay: .09s; }
[data-delay="2"] { transition-delay: .18s; }
[data-delay="3"] { transition-delay: .27s; }
[data-delay="4"] { transition-delay: .36s; }

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 1100px) { .grid { columns: 3; } }

@media (max-width: 900px) {
  .rail { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .filmlist li { grid-template-columns: 54px minmax(0,1fr) 74px; }
  .fmeta { grid-column: 2 / -1; grid-row: 2; }
}

@media (max-width: 760px) {
  .links { display: none; }
  .grid { columns: 2; column-gap: 10px; }
  .gitem { margin-bottom: 10px; }
  .songlist li { grid-template-columns: 46px 1fr; gap: 14px; padding: 20px 0; }
  .smeta { grid-column: 2; text-align: left; margin-top: 6px; }
  .songlist li:hover .stitle { transform: none; }
  .lightbox { padding: 16px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
  .hero-title .l2 { margin-left: 0; }
  .vlist span { -webkit-text-stroke-width: .8px; }
  /* Phone: the 4:5 crop fills the viewport height exactly, so his face sits in the
     upper half and vertical object-position has no effect. Keep the type across the
     lower face as the reference does, but hold the veil back so he stays visible. */
  /* Vertical object-position is inert here (the crop already fills the height exactly),
     so oversize the image and lift it to push his face toward the top. The extra height
     guarantees the frame stays covered after the shift. */
  .hero-media img {
    height: 138%;
    transform: translateY(-19vh);
    object-position: 50% 0;
    filter: grayscale(.18) contrast(1.02) brightness(1.2);
  }
  .hero-in { padding-top: 40vh; }
  .hero-veil {
    background:
      linear-gradient(180deg,
        rgba(8,9,10,.55) 0%,
        rgba(8,9,10,.18) 22%,
        rgba(8,9,10,.42) 46%,
        rgba(8,9,10,.88) 68%,
        var(--bg) 90%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .big-statement .w { opacity: 1; }
  .marquee-track { animation: none; }
}
