:root {
  --bg: #0b1020;
  --text: #e9eef5;
  --muted: #a0a8b8;
  --accent: #ff9933;
  --accent2: #138808;
  --deep: #0a2540;
  --card: #11162a;
  --border: #23324d;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
img, svg { max-width: 100%; height: auto; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.skip-link { position: absolute; left: -999px; top: -999px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 6px; }
.skip-link:focus { left: 20px; top: 20px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,16,32,0.9); backdrop-filter: blur(6px); border-bottom: 1px solid var(--border); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; flex-wrap: wrap; }
.brand { font-weight: 700; letter-spacing: 0.2px; display: flex; align-items: center; gap: 10px; }
.logo { width: clamp(28px, 4vw, 36px); height: clamp(28px, 4vw, 36px); border-radius: 6px; }
.nav { display: flex; gap: 12px; flex-wrap: wrap; overflow-x: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.lang-switch { display: flex; gap: 8px; }
.lang-switch .button { padding: 6px 10px; }
.lang-switch .button.active { background: var(--accent); color: #1e1e1e; border-color: transparent; }

.hero { background: linear-gradient(135deg, var(--deep), #0e3259 40%, var(--accent) 40%, var(--accent) 43%, var(--accent2) 43%, var(--accent2) 46%, #0e3259 46%); padding: 80px 0; }
.hero-content { text-align: center; }
.hero h1 { font-size: clamp(32px, 6vw, 52px); margin: 0; font-family: Merriweather, Georgia, 'Times New Roman', serif; font-weight: 700; }
.hero .subtitle { margin-top: 12px; color: var(--muted); font-size: clamp(14px, 2.6vw, 18px); }
.cta { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.button { display: inline-block; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; background: rgba(255,255,255,0.06); }
.button:hover { background: rgba(255,255,255,0.12); }
.button.primary { background: var(--accent); color: #1e1e1e; border-color: transparent; }
.button.primary:hover { filter: brightness(1.07); }

.section { padding: 60px 0; }
.section h2 { font-size: clamp(22px, 3.4vw, 28px); margin: 0 0 18px 0; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.card h3 { margin: 0 0 8px 0; font-size: 20px; }
.card p { margin: 0 0 10px 0; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 120px 1fr; align-items: start; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
.timeline .year { font-weight: 700; color: var(--accent); }
.timeline .event { color: var(--text); }

.facts, .contact { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.facts li, .contact li { color: var(--muted); }

.quotes { display: grid; gap: 14px; }
.quotes blockquote { margin: 0; padding: 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; }
.quotes cite { display: block; margin-top: 8px; color: var(--muted); font-style: normal; }

.gallery { align-items: start; }
.tile { margin: 0; padding: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tile svg { display: block; width: 100%; height: 240px; }
.tile img { display: block; width: 100%; height: 240px; object-fit: cover; }
.tile img.ravi { object-position: 50% 3cm; }
.tile figcaption { padding: 10px 12px; color: var(--muted); }

.links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.links a { color: var(--text); text-decoration: none; }
.links a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--border); padding: 30px 0; background: #0a1328; }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.copyright { margin-top: 18px; color: var(--muted); font-size: 14px; }

address { font-style: normal; color: var(--muted); }
address a { color: var(--text); text-decoration: none; }
address a:hover { text-decoration: underline; }

.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-weight: 700; }
.site-footer .logo { width: 216px; height: 216px; border-radius: 8px; }
.footer-contact { justify-self: start; text-align: left; align-self: center; }
.footer-links { justify-self: end; }
.footer-links .links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; text-align: left; }
.footer-brand { justify-self: start; align-self: center; }
/* removed explicit alignment; revert to auto-fit layout */

/* Tabs */
.tabs-group { margin-top: 12px; }
.tabs-group input[type="radio"] { position: absolute; left: -9999px; }
.tab-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.tab-controls label { cursor: pointer; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: rgba(255,255,255,0.06); }
.tab-controls label:hover { color: var(--text); background: rgba(255,255,255,0.12); }
.tab-panels .tab-panel { display: none; }
#tab-residence:checked ~ .tab-controls label[for="tab-residence"],
#tab-lectures:checked ~ .tab-controls label[for="tab-lectures"],
#tab-vijayghat:checked ~ .tab-controls label[for="tab-vijayghat"] { color: #1e1e1e; background: var(--accent); border-color: transparent; }
#tab-residence:checked ~ .tab-panels #panel-residence,
#tab-lectures:checked ~ .tab-panels #panel-lectures,
#tab-vijayghat:checked ~ .tab-panels #panel-vijayghat { display: block; }

@media (max-width: 900px) {
  .hero h1 { font-size: 40px; }
  .grid.two { grid-template-columns: 1fr; }
  .grid.three { grid-template-columns: 1fr 1fr; }
  .timeline li { grid-template-columns: 90px 1fr; }
  .tile svg, .tile img { height: 200px; }
  .tile img.ravi { object-position: 50% 2cm; }
  .site-footer .logo { width: 160px; height: 160px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand, .footer-contact, .footer-links { justify-self: center; text-align: center; }
  .footer-links .links { grid-template-columns: 1fr; }
  .nav { justify-content: center; }
  .lang-switch { justify-content: center; }
  .brand { justify-content: center; width: 100%; }
  .nav, .lang-switch { width: 100%; }
}
  /* revert mobile layout to auto-fit grid behavior */
}

@media (max-width: 600px) {
  .grid.three { grid-template-columns: 1fr; }
  .tile svg, .tile img { height: 180px; }
  .tile img.ravi { object-position: 50% 1cm; }
}
  .timeline li { grid-template-columns: 80px 1fr; }
}

@media (max-width: 400px) {
  .tile svg, .tile img { height: 160px; }
  .timeline li { grid-template-columns: 70px 1fr; }
}

@media (min-width: 1200px) {
  .container { max-width: 1200px; }
}
  .site-footer .logo { width: 120px; height: 120px; }
}

.nav a:focus, .button:focus, .links a:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.section h2 { font-family: Merriweather, Georgia, 'Times New Roman', serif; font-weight: 700; }
.card h3 { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.nav { justify-content: flex-end; }
