/* Jonnalagadda Kanakadurga — personal site
   Palette taken from a Telangana silk saree: aubergine ink, violet border,
   rani pink body, zari gold. The one bold element is the ikat border band. */

:root {
  --ink: #2B1838;
  --violet: #5A2D82;
  --rani: #C2255C;
  --zari: #B8892A;
  --zari-bright: #E9B949;
  --paper: #FFFFFF;
  --mist: #F6F1F8;
  --muted: #5E4E69;
  --line: #E2D6EA;

  --sans: "Anek Telugu", "Noto Sans Telugu", "Segoe UI", system-ui, sans-serif;
  --serif: "Tiro Telugu", "Noto Serif Telugu", Georgia, serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 10vw, 104px);

  --ikat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Crect width='48' height='24' fill='%235A2D82'/%3E%3Cpath fill='%23C2255C' d='M-1.25 -7.5 L1.25 -7.5 L1.25 -5 L3.75 -5 L3.75 -2.5 L6.25 -2.5 L6.25 0 L8.75 0 L8.75 0 L6.25 0 L6.25 2.5 L3.75 2.5 L3.75 5 L1.25 5 L1.25 7.5 L-1.25 7.5 L-1.25 5 L-3.75 5 L-3.75 2.5 L-6.25 2.5 L-6.25 0 L-8.75 0 L-8.75 0 L-6.25 0 L-6.25 -2.5 L-3.75 -2.5 L-3.75 -5 L-1.25 -5Z'/%3E%3Cpath fill='%23C2255C' d='M-1.25 16.5 L1.25 16.5 L1.25 19 L3.75 19 L3.75 21.5 L6.25 21.5 L6.25 24 L8.75 24 L8.75 24 L6.25 24 L6.25 26.5 L3.75 26.5 L3.75 29 L1.25 29 L1.25 31.5 L-1.25 31.5 L-1.25 29 L-3.75 29 L-3.75 26.5 L-6.25 26.5 L-6.25 24 L-8.75 24 L-8.75 24 L-6.25 24 L-6.25 21.5 L-3.75 21.5 L-3.75 19 L-1.25 19Z'/%3E%3Cpath fill='%23C2255C' d='M46.75 -7.5 L49.25 -7.5 L49.25 -5 L51.75 -5 L51.75 -2.5 L54.25 -2.5 L54.25 0 L56.75 0 L56.75 0 L54.25 0 L54.25 2.5 L51.75 2.5 L51.75 5 L49.25 5 L49.25 7.5 L46.75 7.5 L46.75 5 L44.25 5 L44.25 2.5 L41.75 2.5 L41.75 0 L39.25 0 L39.25 0 L41.75 0 L41.75 -2.5 L44.25 -2.5 L44.25 -5 L46.75 -5Z'/%3E%3Cpath fill='%23C2255C' d='M46.75 16.5 L49.25 16.5 L49.25 19 L51.75 19 L51.75 21.5 L54.25 21.5 L54.25 24 L56.75 24 L56.75 24 L54.25 24 L54.25 26.5 L51.75 26.5 L51.75 29 L49.25 29 L49.25 31.5 L46.75 31.5 L46.75 29 L44.25 29 L44.25 26.5 L41.75 26.5 L41.75 24 L39.25 24 L39.25 24 L41.75 24 L41.75 21.5 L44.25 21.5 L44.25 19 L46.75 19Z'/%3E%3Cpath fill='%23C2255C' d='M22.75 2 L25.25 2 L25.25 4.5 L27.75 4.5 L27.75 7 L30.25 7 L30.25 9.5 L32.75 9.5 L32.75 12 L35.25 12 L35.25 12 L32.75 12 L32.75 14.5 L30.25 14.5 L30.25 17 L27.75 17 L27.75 19.5 L25.25 19.5 L25.25 22 L22.75 22 L22.75 19.5 L20.25 19.5 L20.25 17 L17.75 17 L17.75 14.5 L15.25 14.5 L15.25 12 L12.75 12 L12.75 12 L15.25 12 L15.25 9.5 L17.75 9.5 L17.75 7 L20.25 7 L20.25 4.5 L22.75 4.5Z'/%3E%3Cpath fill='%23E9B949' d='M22.75 7 L25.25 7 L25.25 9.5 L27.75 9.5 L27.75 12 L30.25 12 L30.25 12 L27.75 12 L27.75 14.5 L25.25 14.5 L25.25 17 L22.75 17 L22.75 14.5 L20.25 14.5 L20.25 12 L17.75 12 L17.75 12 L20.25 12 L20.25 9.5 L22.75 9.5Z'/%3E%3Crect x='22.5' y='10.5' width='3' height='3' fill='%235A2D82'/%3E%3Crect x='0' y='10.5' width='2' height='3' fill='%23E9B949'/%3E%3Crect x='46' y='10.5' width='2' height='3' fill='%23E9B949'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--violet); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rani); }

:focus-visible { outline: 3px solid var(--rani); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--violet); color: #fff; padding: 8px 14px; z-index: 100;
  font-family: var(--sans);
}
.skip:focus { left: 8px; }

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

/* Telugu runs a little taller: give it room */
[lang="te"] { line-height: 1.5; }

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--sans); color: var(--violet); margin: 0; }

h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 650;
  font-stretch: 82%;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
h2 span[lang="te"] {
  display: inline-block;
  font-size: 0.55em;
  font-weight: 500;
  font-stretch: 100%;
  color: var(--zari);
  margin-left: 0.4em;
  vertical-align: 0.15em;
}

h3 { font-size: 1.3125rem; font-weight: 600; line-height: 1.3; }

.minor-h {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 2px solid var(--zari);
  display: inline-block;
}

.lede { max-width: 60ch; color: var(--muted); margin: 0 0 1.5rem; }

p { margin: 0 0 1rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; line-height: 1;
  color: #fff; background: var(--violet);
  border: 2px solid var(--violet); border-radius: 6px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { background: var(--rani); border-color: var(--rani); color: #fff; }
.btn-ghost { background: transparent; color: var(--violet); }
.btn-ghost:hover { background: var(--violet); border-color: var(--violet); color: #fff; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 0.9375rem; }
.btn-block { width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(255,255,255,.86); backdrop-filter: blur(8px); }
}
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px 24px;
  min-height: 64px;
}
.brand { display: flex; flex-direction: column; text-decoration: none; font-family: var(--sans); line-height: 1.1; }
.brand [lang="te"] { font-size: 1.375rem; font-weight: 700; color: var(--violet); line-height: 1.3; }
.brand-en { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.01em; }

.site-nav { display: flex; gap: 20px; justify-content: flex-end; font-family: var(--sans); font-size: 0.9375rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; white-space: nowrap; }
.site-nav a:hover { color: var(--rani); }

@media (max-width: 900px) {
  .header-row { grid-template-columns: 1fr auto; padding-top: 8px; }
  .site-nav {
    grid-column: 1 / -1; grid-row: 2;
    justify-content: flex-start; gap: 18px;
    overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px;
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
  .site-nav::-webkit-scrollbar { display: none; }
}

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

.hero { padding-top: clamp(40px, 8vw, 96px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 1fr);
  gap: 32px 56px;
  align-items: end;
  padding-bottom: clamp(40px, 7vw, 80px);
}
.hero-name { display: flex; flex-direction: column; gap: 0.25rem; }
.te-name {
  font-size: clamp(3.25rem, 11vw, 7.25rem);
  font-weight: 700;
  font-stretch: 78%;
  line-height: 1.22;
  color: var(--violet);
}
.en-name {
  font-size: clamp(1.0625rem, 2.2vw, 1.375rem);
  font-weight: 500;
  font-stretch: 112%;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.hero-roles {
  font-family: var(--sans);
  font-size: clamp(1.1875rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.hero-line { color: var(--muted); max-width: 42ch; margin: 0; }

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

/* The saree border */
.anchu {
  height: 36px;
  background: var(--ikat) repeat-x center / auto 30px, var(--violet);
  border-top: 3px solid var(--zari-bright);
  border-bottom: 3px solid var(--zari-bright);
}
.anchu-hero { transform-origin: left center; }

@media (prefers-reduced-motion: no-preference) {
  .anchu-hero { animation: weave 1.1s cubic-bezier(.2,.7,.2,1) .15s both; }
  .te-name { animation: rise .8s ease-out both; }
  @keyframes weave { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Sections ---------- */

.section { padding: var(--section) 0; }
.section-mist { background: var(--mist); }
.section-violet { background: var(--ink); color: #F3ECF7; }
.section-violet h2 { color: #fff; }
.section-violet h2 span[lang="te"] { color: var(--zari-bright); }

/* Story */
.story-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.portrait { margin: 0; position: sticky; top: 96px; }
.portrait img {
  width: 100%;
  border-radius: 120px 120px 8px 8px; /* doorway arch */
  border: 3px solid var(--zari);
  padding: 5px;
  background: #fff;
}
.portrait figcaption { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin-top: 10px; text-align: center; }

.prose { max-width: 62ch; }

.edu { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 62ch; }
.edu li { font-size: 1rem; color: var(--muted); }
.edu b { font-family: var(--sans); font-weight: 600; color: var(--ink); margin-right: 0.4em; }

@media (max-width: 760px) {
  .story-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait { position: static; width: 200px; }
}

/* Roles */
.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 56px;
  margin-top: 1rem;
}
.role { border-left: 4px solid var(--violet); padding: 2px 0 2px 20px; }
.role:nth-child(2n) { border-left-color: var(--rani); }
.role h3 { margin-bottom: 0.4rem; }
.role p { color: var(--muted); max-width: 46ch; margin-bottom: 0.6rem; }
.role a { font-family: var(--sans); font-weight: 600; font-size: 1rem; }

@media (max-width: 680px) { .roles { grid-template-columns: 1fr; gap: 32px; } }

/* Writing */
.book {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-top: 1rem;
}
.book-cover img {
  border-radius: 2px 6px 6px 2px;
  box-shadow: -6px 0 0 var(--ink), 0 18px 40px -18px rgba(43,24,56,.55);
}
.book-title { font-size: clamp(1.625rem, 3.4vw, 2.125rem); font-stretch: 90%; }
.book-title i { font-family: var(--serif); font-weight: 400; }
.book-title span[lang="te"] { display: block; font-size: 0.75em; color: var(--zari); font-weight: 600; }
.book-sub { color: var(--muted); margin: 0.5rem 0 1.5rem; }

.te-quote {
  margin: 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--rani);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--ink);
  max-width: 34em;
}
.te-quote p { margin: 0 0 0.6rem; }
.translation { font-style: italic; color: var(--muted); max-width: 58ch; margin: 1rem 0 0.25rem; }
.source { font-family: var(--sans); font-size: 0.875rem; color: var(--muted); margin-bottom: 1.75rem; }

.plain-list { margin: 0; padding-left: 1.1em; max-width: 66ch; }
.plain-list li { margin-bottom: 0.5rem; }
.plain-list li::marker { color: var(--rani); }

@media (max-width: 760px) {
  .book { grid-template-columns: 1fr; gap: 32px; }
  .book-cover { max-width: 240px; }
}

/* Talks */
.talks-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 56px; }
.topics, .sessions { list-style: none; margin: 0; padding: 0; }
.topics li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.topics li:first-child { padding-top: 0; }
.sessions li { margin-bottom: 1.1rem; color: var(--muted); font-size: 1.0625rem; }
.sessions b { display: block; font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: 1.125rem; }
.venues { max-width: 70ch; margin-bottom: 2rem; }
@media (max-width: 760px) { .talks-grid { grid-template-columns: 1fr; } }

/* Videos */
.videos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
}
.video h3 { font-size: 1.125rem; margin-top: 14px; color: var(--ink); }
.video h3 span[lang="te"] { display: block; color: var(--violet); }
.meta { font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); margin: 4px 0 0; }
.video-feature { grid-column: 1 / -1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: end; margin-bottom: 8px; }
.video-feature p:not(.meta) { color: var(--muted); margin: 10px 0 0; max-width: 36ch; }
.video-feature h3 { font-size: clamp(1.375rem, 3vw, 1.875rem); font-stretch: 90%; color: var(--violet); margin: 0; }

.yt {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0; border: 0; border-radius: 8px; overflow: hidden;
  background: var(--ink); cursor: pointer;
}
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.yt:hover img { transform: scale(1.03); }
.play {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: var(--rani);
  box-shadow: 0 0 0 6px rgba(255,255,255,.35);
}
.play::after {
  content: ""; position: absolute; left: 26px; top: 20px;
  border-style: solid; border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #fff;
}
.video:not(.video-feature) .play { width: 52px; height: 52px; margin: -26px 0 0 -26px; }
.video:not(.video-feature) .play::after { left: 21px; top: 16px; border-width: 10px 0 10px 16px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.more { margin-top: 2rem; font-family: var(--sans); font-weight: 600; }

@media (max-width: 1000px) { .videos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .videos { grid-template-columns: 1fr; gap: 32px; }
  .video-feature { grid-template-columns: 1fr; gap: 14px; }
}

/* Ledger lists: recognition and community */
.ledger { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.ledger li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 4px 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.ledger li:first-child { border-top: 1px solid var(--line); }
.yr { font-family: var(--sans); font-weight: 600; color: var(--rani); font-size: 1rem; padding-top: 3px; }
.ledger b { font-family: var(--sans); font-weight: 600; font-size: 1.125rem; color: var(--ink); }
.ledger-wide b { display: block; margin-bottom: 2px; }
.ledger-wide li > span:last-child { color: var(--muted); }
@media (max-width: 600px) {
  .ledger li { grid-template-columns: 1fr; }
}

/* Beyond */
.beyond p { font-size: clamp(1.25rem, 2.6vw, 1.625rem); line-height: 1.6; max-width: 40ch; margin: 0; }

/* Consult & invite */
.consult-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px 72px;
  align-items: start;
}
.expect { margin: 0 0 1.5rem; padding-left: 1.1em; }
.expect li { margin-bottom: 0.6rem; }
.expect li::marker { color: var(--rani); }
.call { font-family: var(--sans); font-size: 1.0625rem; }
.call a { font-weight: 600; }

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--violet);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 32px);
  font-family: var(--sans);
}
.section-mist .form { border-color: #E3D7EB; border-top-color: var(--rani); }
.form-note { font-size: 0.9375rem; color: var(--muted); line-height: 1.5; margin-bottom: 1.25rem; }
.field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
label, legend { display: block; font-size: 0.9375rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; padding: 0; }
input[type="text"], input[type="tel"], input[type="date"], select {
  width: 100%; min-height: 48px;
  padding: 10px 12px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff;
  border: 1.5px solid #CDBDD8; border-radius: 6px;
}
input::placeholder { color: #8C7C96; }
input:focus, select:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(90,45,130,.18); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--rani); }
.choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.choices label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 1rem; margin: 0; min-height: 40px; cursor: pointer; }
.choices input { width: 20px; height: 20px; accent-color: var(--violet); margin: 0; }
.form-error { color: var(--rani); font-size: 0.9375rem; font-weight: 600; margin: 0 0 12px; }

@media (max-width: 820px) { .consult-grid { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .field-row { grid-template-columns: 1fr; } }

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

.site-footer { background: var(--ink); color: #E7DCEE; font-family: var(--sans); font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--zari-bright); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px 48px;
  padding-top: 48px; padding-bottom: 40px;
}
.footer-name { font-size: 1.25rem; font-weight: 600; color: #fff; line-height: 1.4; }
.footer-name [lang="te"] { color: var(--zari-bright); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.crisis {
  grid-column: 1 / -1;
  border: 1px solid rgba(233,185,73,.5);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 8px 0 0;
  line-height: 1.55;
}
.crisis b { color: #fff; }
.copy { grid-column: 1 / -1; font-size: 0.875rem; color: #BFAECB; margin: 0; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }

@media print {
  .site-header, .anchu, .form, .videos { display: none; }
}
