/* ============================================================
   SWETHA BASKARAN — KALAMKARI PORTFOLIO
   Design tokens: edit the variables below to retheme the site.
   ============================================================ */

:root {
  /* Kalamkari palette, light mode */
  --cotton: #f3ead8;       /* unbleached cotton — base background */
  --cotton-dim: #e9dec7;   /* slightly deeper cotton, for cards/panels */
  --ink: #241f19;          /* iron black — primary text/line */
  --madder: #9c3b2e;       /* madder red — primary accent */
  --madder-dim: #b65949;
  --indigo: #2b3f66;       /* indigo — secondary accent, New York section */
  --indigo-dim: #4a5f8c;

  --bg: var(--cotton);
  --bg-panel: var(--cotton-dim);
  --text: var(--ink);
  --text-dim: #5a5248;
  --accent: var(--madder);
  --accent-2: var(--indigo);
  --border-color: #241f19;
  --card-shadow: 0 1px 2px rgba(36, 31, 25, 0.08), 0 8px 24px rgba(36, 31, 25, 0.06);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-width: 1180px;
}

:root[data-theme="dark"] {
  --cotton: #1c1812;
  --cotton-dim: #241f18;
  --ink: #ece2cc;
  --madder: #d86a55;
  --madder-dim: #b65949;
  --indigo: #8da3d6;
  --indigo-dim: #6b84bd;

  --bg: var(--cotton);
  --bg-panel: var(--cotton-dim);
  --text: var(--ink);
  --text-dim: #b9ae99;
  --accent: var(--madder);
  --accent-2: var(--indigo);
  --border-color: #ece2cc;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* menu links land below the sticky menu */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  margin: 0 0 0.4em;
  color: var(--text);
}

a { color: var(--accent); }

p { margin: 0 0 1em; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Layout helpers ---------- */

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
}

.section-head {
  margin-bottom: 40px;
}

.section-head .eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

.section-intro {
  max-width: 62ch;
  color: var(--text-dim);
  font-size: 1.03rem;
}

/* ---------- Kalamkari border motif ---------- */

.border-rule,
.border-rule--thick {
  height: 16px;
  background-color: var(--border-color);
  -webkit-mask: url("../images/motifs/raas-leela-line.svg") center / auto 100% repeat-x;
  mask: url("../images/motifs/raas-leela-line.svg") center / auto 100% repeat-x;
  opacity: 0.55;
}

/* Line version of the Raas Leela border, light enough for the minimal look. */

/* The top of the page keeps the filled band from the cloth. */
.hero .border-rule {
  height: 18px;
  -webkit-mask: none;
  mask: none;
  opacity: 1;
  background: url("../images/motifs/raas-leela-border.svg?v=4") center / auto 100% repeat-x;
}

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 18%, transparent);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.site-nav .nav-name {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.nav-studio {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}

.site-nav a.nav-link {
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.site-nav a.nav-link:hover { color: var(--accent); }

.theme-toggle {
  border: 1px solid color-mix(in srgb, var(--border-color) 35%, transparent);
  background: transparent;
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  margin-left: 22px;
}

.nav-links-row { display: flex; align-items: center; }

/* Never let anything make the page wider than the screen. */
html, body { overflow-x: clip; }

/* Smaller screens: menu links go on their own line under the name and
   swipe sideways inside that line, instead of widening the page. */
@media (max-width: 960px) {
  .site-nav .wrap { flex-wrap: wrap; row-gap: 8px; padding-bottom: 10px; }
  .nav-links-row { width: 100%; min-width: 0; }
  .site-nav ul {
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }
  .site-nav ul::-webkit-scrollbar { display: none; }
  .theme-toggle { margin-left: 14px; flex-shrink: 0; }
  html { scroll-padding-top: 110px; }
}

@media (max-width: 640px) {
  .site-nav ul { gap: 14px; }
  .site-nav a.nav-link { font-size: 0.82rem; }
}

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

.hero {
  padding-top: 64px;
  padding-bottom: 0;
  text-align: center;
}

.hero .wrap { padding-top: 80px; padding-bottom: 72px; }

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  margin-bottom: 0.2em;
}

.hero .role {
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.1em;
}

.hero .tagline {
  max-width: 54ch;
  margin: 0 auto;
  font-size: 1.15rem;
  color: var(--text-dim);
}

/* ---------- Where It Began: finished piece ---------- */

.origin-hero {
  margin: 8px 0 0;
  cursor: pointer;
}

.origin-hero img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: var(--card-shadow);
}

.origin-hero figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.carousel-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 1.3rem;
  margin: 48px 0 16px;
}

/* ---------- Carousels (3 across on desktop) ---------- */

/* Arrows sit on top of the pictures' edges, so the pictures line up
   with the headings and text above them. */
.carousel {
  position: relative;
}

.carousel + .carousel { margin-top: 40px; }

.carousel-track {
  --per-view: 3;
  --gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.carousel-track::-webkit-scrollbar { display: none; }

.slide {
  margin: 0;
  scroll-snap-align: start;
  cursor: pointer;
}

.slide-frame {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow: var(--card-shadow);
}

.carousel--portrait .slide-frame { aspect-ratio: 3 / 4; }

.slide-frame img,
.slide-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.slide:hover .slide-frame img,
.slide:focus-visible .slide-frame img,
.slide-frame video { transform: scale(1.03); }

.slide figcaption {
  padding-top: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.slide-sub {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

.slide-title { display: block; color: var(--text); }

.slide-note {
  display: block;
  font-size: 0.84rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.carousel-btn {
  position: absolute;
  top: var(--btn-top, 40%);
  transform: translateY(-50%);
  z-index: 2;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--border-color) 25%, transparent);
  background: var(--bg);
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover:not(:disabled) { color: var(--accent); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.carousel-btn { transition: opacity 0.2s ease; }
.carousel-btn:disabled { opacity: 0; pointer-events: none; }
.carousel--static .carousel-btn { visibility: hidden; }

@media (max-width: 900px) {
  .carousel-track { --per-view: 2; }
}

@media (max-width: 640px) {
  .carousel-track { --per-view: 1.15; --gap: 14px; }
  .carousel-btn { display: none; }
}

/* ---------- Traditional grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

.art-card {
  margin: 0;
  background: var(--bg-panel);
  border: 1px solid color-mix(in srgb, var(--border-color) 14%, transparent);
  padding: 14px 14px 18px;
  cursor: pointer;
  text-align: left;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.art-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(36,31,25,0.1), 0 16px 32px rgba(36,31,25,0.1);
}

.art-card .frame {
  overflow: hidden;
  margin-bottom: 14px;
  background: var(--cotton);
}

.art-card .frame { aspect-ratio: 4 / 5; }

.art-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.art-card .num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.art-card h3 {
  font-size: 1.08rem;
  margin-bottom: 4px;
}

.art-card .medium {
  font-size: 0.86rem;
  color: var(--text-dim);
  margin: 0;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-grid h3 {
  font-size: 1.15rem;
  color: var(--accent);
  margin-bottom: 0.6em;
}

.about-grid .block + .block { margin-top: 2.2em; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; gap: 8px; }
}

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

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 1.1rem;
}

.contact-links a {
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid color-mix(in srgb, var(--border-color) 30%, transparent);
  padding-bottom: 2px;
}

.contact-links a:hover { color: var(--accent); border-color: var(--accent); }

.contact-links .label {
  display: inline-block;
  width: 108px;
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

footer {
  padding: 36px 0 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

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

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lightbox-inner {
  max-width: min(92vw, 1100px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  color: var(--cotton);
  text-align: center;
  margin-top: 16px;
  max-width: 60ch;
}

.lightbox-caption .num { color: var(--madder-dim); font-family: var(--font-display); }
.lightbox-caption h3 { color: var(--cotton); margin: 2px 0 4px; }
.lightbox-caption p { color: #cfc3ad; font-size: 0.9rem; margin: 0; }

.lightbox-progress {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

.lightbox-progress[hidden] { display: none; }

.progress-thumb {
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0.6;
}

.progress-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.progress-thumb:hover { opacity: 0.9; }

.progress-thumb.active {
  opacity: 1;
  border-color: var(--madder-dim);
}

.lightbox-btn {
  position: absolute;
  background: transparent;
  border: none;
  color: var(--cotton);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 10px;
  opacity: 0.75;
}

.lightbox-btn:hover { opacity: 1; }

.lightbox-close { top: 14px; right: 18px; font-size: 1.8rem; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .lightbox-prev { left: -4px; }
  .lightbox-next { right: -4px; }
}

.lightbox-inner > video {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  margin: 0 auto;
}

.lightbox-inner > [hidden] { display: none; }

.process-note {
  margin: 8px 0 0;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ---------- Traditional works: finished piece large, process beside it ---------- */

.trad-item {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 36px;
  align-items: start;
}

.trad-item + .trad-item {
  margin-top: 64px;
  padding-top: 64px;
  border-top: 1px solid color-mix(in srgb, var(--border-color) 14%, transparent);
}

.trad-hero {
  margin: 0;
  cursor: pointer;
}

.trad-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  box-shadow: var(--card-shadow);
}

.trad-side .num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 0.95rem;
}

.trad-side h3 {
  font-size: 1.6rem;
  margin: 4px 0 6px;
}

.trad-side .medium {
  margin: 0;
  color: var(--text-dim);
}

.trad-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: 1.15rem;
  margin: 32px 0 14px;
}

.carousel--two .carousel-track { --per-view: 2; }

.trad-item--solo { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }

@media (max-width: 760px) {
  .trad-item { grid-template-columns: 1fr; gap: 20px; }
  .carousel--two .carousel-track { --per-view: 1.3; }
}

.about-photo {
  margin: 0 0 28px;
  max-width: 340px;
}

.about-photo img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: var(--card-shadow);
}

/* Studio name: the brand, set above the artist's name */
.hero .studio-name {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.8rem, 8.5vw, 5rem);
  letter-spacing: 0.005em;
  color: var(--accent);
  margin: 0 0 0.15em;
}

.hero .artist-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--text);
  margin: 0 0 0.5em;
}

.hero .name-note {
  max-width: 52ch;
  margin: 1.4em auto 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.footer-note {
  margin-top: 6px;
  font-size: 0.8rem;
  opacity: 0.75;
}
