/* Uttara Kaula — shared stylesheet */

:root {
  --saffron: #e08a1e;
  --saffron-deep: #b5651d;
  --gold: #c8922c;
  --gold-soft: #e5b96b;
  --cream: #faf4e4;
  --paper: #fffdf5;
  --ink: #33281c;
  --ink-soft: #5c4630;
  --accent: #8c2f39;
  --maroon-deep: #42232b;
  --rule: rgba(140, 90, 30, 0.25);
  --card: rgba(255, 252, 240, 0.8);
  --shadow: 0 2px 14px rgba(90, 55, 10, 0.12);
  --shadow-deep: 0 10px 30px rgba(90, 55, 10, 0.16);
  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='24' viewBox='0 0 140 24'%3E%3Cline x1='4' y1='12' x2='52' y2='12' stroke='%23c8922c' stroke-width='1'/%3E%3Cline x1='88' y1='12' x2='136' y2='12' stroke='%23c8922c' stroke-width='1'/%3E%3Cpath d='M61 7.5 L79 7.5 L70 19 Z' fill='none' stroke='%238c2f39' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='70' cy='11.5' r='1.6' fill='%238c2f39'/%3E%3C/svg%3E");
  --ornament-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='24' viewBox='0 0 140 24'%3E%3Cline x1='4' y1='12' x2='52' y2='12' stroke='%23e5b96b' stroke-width='1'/%3E%3Cline x1='88' y1='12' x2='136' y2='12' stroke='%23e5b96b' stroke-width='1'/%3E%3Cpath d='M61 7.5 L79 7.5 L70 19 Z' fill='none' stroke='%23e5b96b' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='70' cy='11.5' r='1.6' fill='%23e5b96b'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

@view-transition { navigation: auto; }

body {
  margin: 0;
  font-family: "Crimson Text", Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--cream);
  background-image: linear-gradient(180deg, #f1e6c8 0%, #f6efd8 55%, var(--cream) 100%);
  background-repeat: no-repeat;
  background-size: 100% 560px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { width: 100%; flex: 1; }

::selection { background: rgba(200, 146, 44, 0.35); }

p { margin: 0 0 1.2rem; text-wrap: pretty; }

a { color: var(--accent); transition: color 0.15s ease; }
a:hover { color: var(--saffron-deep); }

/* Top accent ribbon */
body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--accent) 50%, var(--gold));
}

/* Header + navigation */
.site-header {
  padding: 1.4rem 1rem 1.05rem;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  background: rgba(250, 244, 228, 0.6);
  backdrop-filter: blur(6px);
}

.site-header .brand {
  font-family: "Cormorant Garamond", "Crimson Text", Georgia, serif;
  font-size: 1.55rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.site-header .brand:hover { color: var(--accent); }

.site-nav {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.5rem;
}

.site-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 1.04rem;
  letter-spacing: 0.05em;
  padding: 0.15rem 0;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.site-nav a:hover { color: var(--accent); }
.site-nav a:hover::after { transform: scaleX(1); }

.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Layout */
main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 4.5rem;
}

main.wide { max-width: 72rem; }

/* Page hero */
.page-hero {
  text-align: center;
  margin-bottom: 2.75rem;
}

.page-hero img {
  display: block;
  margin: 0 auto 1.75rem;
  width: min(300px, 74%);
  height: auto;
  padding: 9px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow-deep);
}

.eyebrow {
  font-size: 0.92rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

h1 {
  font-family: "Cormorant Garamond", "Crimson Text", Georgia, serif;
  font-size: clamp(2.2rem, 5.5vw, 3.3rem);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.4rem;
  text-align: center;
  text-wrap: balance;
  letter-spacing: 0.01em;
}

h1::after {
  content: "";
  display: block;
  width: 140px;
  height: 24px;
  margin: 1rem auto 0;
  background: var(--ornament) center / contain no-repeat;
}

.page-hero .subtitle {
  font-family: "Cormorant Garamond", "Crimson Text", Georgia, serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1.35rem;
  margin: 0.9rem auto 0;
  max-width: 36rem;
  text-wrap: balance;
}

h2 {
  font-family: "Cormorant Garamond", "Crimson Text", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin: 2.5rem 0 0.7rem;
  text-wrap: balance;
}

/* Drop cap for article openings */
.dropcap::first-letter {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.6em;
  font-weight: 600;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.14em 0 0;
  color: var(--accent);
}

/* Figures — mounted-print treatment */
figure {
  margin: 2.25rem auto;
  text-align: center;
}

figure img {
  max-width: min(440px, 100%);
  height: auto;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

figure.figure-wide img { max-width: 100%; }

figcaption {
  font-size: 1rem;
  font-style: italic;
  color: var(--ink-soft);
  margin-top: 0.7rem;
}

blockquote {
  margin: 1.6rem 0;
  padding: 1.3rem 1.6rem;
  background: var(--card);
  border-left: 3px solid var(--gold);
  border-radius: 0;
  box-shadow: var(--shadow);
  font-style: italic;
}

blockquote p:last-child { margin-bottom: 0; }

/* Link cards (home page) */
.link-cards {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.link-cards a {
  display: block;
  padding: 1.2rem 1.3rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  height: 100%;
}

.link-cards a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
  border-top-color: var(--accent);
}

.link-cards .card-title {
  display: block;
  font-family: "Cormorant Garamond", "Crimson Text", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.3rem;
}

.link-cards .card-desc {
  display: block;
  font-size: 1.02rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Publications list */
.pub-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.pub-list li {
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow);
}

.pub-list .pub-title {
  font-family: "Cormorant Garamond", "Crimson Text", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
}

.pub-list .pub-title a { text-decoration: none; }
.pub-list .pub-title a:hover { text-decoration: underline; }

.pub-list .pub-author {
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Gallery — masonry art wall, images uncropped */
.gallery-grid {
  columns: 3 240px;
  column-gap: 1.2rem;
  margin-top: 2.25rem;
}

.gallery-grid figure {
  break-inside: avoid;
  margin: 0 0 1.2rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: center;
  transition: box-shadow 0.2s ease;
}

.gallery-grid figure:hover { box-shadow: var(--shadow-deep); }

.gallery-grid a { display: block; line-height: 0; overflow: hidden; }

.gallery-grid img {
  width: 100%;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.gallery-grid a:hover img { transform: scale(1.035); }

.gallery-grid figcaption {
  margin: 0;
  padding: 0.65rem 0.8rem 0.8rem;
  font-size: 0.98rem;
  line-height: 1.4;
}

/* Footer — grounded, deep maroon */
.site-footer {
  margin-top: 2rem;
  border-top: 3px solid var(--gold);
  text-align: center;
  padding: 2.4rem 1rem 2.8rem;
  font-size: 1.02rem;
  color: #e9d8b8;
  background: var(--maroon-deep);
}

.site-footer::before {
  content: "";
  display: block;
  width: 140px;
  height: 24px;
  margin: 0 auto 1.1rem;
  background: var(--ornament-gold) center / contain no-repeat;
}

.site-footer p { margin: 0.35rem 0; }

.site-footer a {
  color: var(--gold-soft);
  text-decoration-color: rgba(229, 185, 107, 0.5);
}

.site-footer a:hover { color: #f2d9a4; }

/* Small screens */
@media (max-width: 600px) {
  body { font-size: 1.16rem; }
  main { padding: 2rem 1rem 3.25rem; }
  .site-header .brand { font-size: 1.3rem; }
  .dropcap::first-letter { font-size: 3.1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link-cards a, .gallery-grid img, .gallery-grid figure, .site-nav a::after { transition: none; }
}
