/* ============================================
   Chief Justice Harish Tandon — Official Archive
   Design System: "Framed Content Layout"
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ── Tokens ── */
:root {
  --black:       #000000;
  --bg:          #060606;
  --panel:       #0c0c0c;
  --panel-alt:   #101010;
  --frame-line:  rgba(255,255,255,.08);
  --frame-hover: rgba(255,255,255,.14);
  --gold:        #b89b5e;
  --gold-dim:    #8a7340;
  --white:       #f0ede8;
  --grey:        #9a9a9a;
  --grey-dark:   #5a5a5a;

  --serif:   'Cormorant Garamond', Georgia, serif;
  --sans:    'Source Sans 3', 'Segoe UI', sans-serif;

  --frame-pad: clamp(2rem, 4vw, 4rem);
  --gap:       clamp(1.5rem, 3vw, 3rem);
  --max-w:     1280px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--white);
  text-decoration: none;
  transition: color .25s ease;
}
a:hover { color: var(--gold); }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
}

/* ──────────────────────────────
   GATEWAY (Password Page)
   ────────────────────────────── */
.gateway {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--black);
}

.gateway__card {
  border: 1px solid var(--frame-line);
  padding: 3.5rem 3rem;
  max-width: 420px;
  width: 90%;
  text-align: center;
  background: var(--panel);
}

.gateway__label {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--white);
  letter-spacing: .04em;
  margin-bottom: .35rem;
}

.gateway__sub {
  font-size: .8rem;
  color: var(--grey-dark);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-bottom: 2.5rem;
}

.gateway__input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--frame-line);
  color: var(--white);
  font-family: var(--sans);
  font-size: .95rem;
  padding: .9rem 1.2rem;
  text-align: center;
  letter-spacing: .08em;
  outline: none;
  transition: border-color .3s;
}
.gateway__input:focus { border-color: var(--gold); }
.gateway__input::placeholder { color: var(--grey-dark); }

.gateway__error {
  color: #c0392b;
  font-size: .82rem;
  margin-top: 1rem;
  opacity: 0;
  transition: opacity .3s;
}
.gateway__error.visible { opacity: 1; }

.gateway__hint {
  font-size: .72rem;
  color: var(--grey-dark);
  margin-top: 2rem;
  letter-spacing: .05em;
}

/* ──────────────────────────────
   TOP NAVIGATION
   ────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  border-bottom: 1px solid var(--frame-line);
}

.topbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--frame-pad);
  height: 64px;
}

.topbar__brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: .05em;
}

.topbar__nav { list-style: none; display: flex; gap: 0; height: 64px; }

.topbar__nav li a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.15rem;
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--grey);
  border-left: 1px solid var(--frame-line);
  transition: color .25s, background .25s;
}
.topbar__nav li:last-child a { border-right: 1px solid var(--frame-line); }
.topbar__nav li a:hover,
.topbar__nav li a.active {
  color: var(--gold);
  background: rgba(255,255,255,.02);
}

/* Mobile nav toggle */
.topbar__toggle {
  display: none;
  background: none;
  border: 1px solid var(--frame-line);
  color: var(--white);
  font-size: 1.3rem;
  padding: .4rem .7rem;
  cursor: pointer;
}

/* ──────────────────────────────
   PAGE WRAPPER
   ────────────────────────────── */
.page {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: var(--gap) var(--frame-pad);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ──────────────────────────────
   FRAMED SECTION  (Core Pattern)
   ────────────────────────────── */
.frame {
  border: 1px solid var(--frame-line);
  background: var(--panel);
  padding: var(--frame-pad);
  transition: border-color .3s;
}
.frame:hover { border-color: var(--frame-hover); }

.frame--alt { background: var(--panel-alt); }

.frame__tag {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold);
  margin-bottom: 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--frame-line);
  display: inline-block;
}

.frame__title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  color: var(--white);
  margin-bottom: 1rem;
}

.frame__subtitle {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--grey);
  font-style: italic;
  margin-bottom: .5rem;
}

.frame__text {
  color: var(--grey);
  font-size: .95rem;
  max-width: 640px;
  line-height: 1.8;
}

/* ──────────────────────────────
   HERO SECTION
   ────────────────────────────── */
.hero {
  padding: clamp(3rem, 8vw, 7rem) var(--frame-pad);
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .12;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__name {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero__name span { color: var(--gold); }

.hero__role {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--grey);
  margin-bottom: 1.8rem;
}

.hero__intro {
  color: var(--grey);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.8;
}

/* ──────────────────────────────
   TWO-COLUMN INSIDE FRAME
   ────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--gap);
  align-items: start;
}

.split__img {
  border: 1px solid var(--frame-line);
  overflow: hidden;
}
.split__img img { width: 100%; display: block; }

/* ──────────────────────────────
   DATA ROWS (Ledger style)
   ────────────────────────────── */
.data-row {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--frame-line);
}
.data-row:last-child { border-bottom: none; }

.data-row__label {
  flex: 0 0 140px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold-dim);
  padding-top: .15rem;
}

.data-row__value { flex: 1; color: var(--white); font-size: .95rem; }
.data-row__value p { color: var(--grey); margin-top: .3rem; font-size: .9rem; }

/* ──────────────────────────────
   MULTI-COLUMN GRID
   ────────────────────────────── */
.col-grid {
  display: grid;
  gap: 0;
}
.col-grid--3 { grid-template-columns: repeat(3, 1fr); }
.col-grid--2 { grid-template-columns: repeat(2, 1fr); }

.col-grid__cell {
  padding: var(--frame-pad);
  border-right: 1px solid var(--frame-line);
  border-bottom: 1px solid var(--frame-line);
}
.col-grid__cell:nth-child(3n) { border-right: none; }
.col-grid--2 .col-grid__cell:nth-child(2n) { border-right: none; }
.col-grid__cell:last-child { border-right: none; }

.col-grid__cell h3 {
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: .75rem;
}
.col-grid__cell p { color: var(--grey); font-size: .9rem; }

/* ──────────────────────────────
   EXPANDABLE ITEMS
   ────────────────────────────── */

.accordion__item {
  border-bottom: 1px solid var(--frame-line);
}

.accordion__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem 0;
  cursor: pointer;
  transition: color .25s;
}
.accordion__head:hover { color: var(--gold); }

.accordion__head h3 {
  font-size: 1.1rem;
  font-weight: 400;
  transition: color .25s;
}
.accordion__head:hover h3 { color: var(--gold); }

.accordion__icon {
  font-size: 1.4rem;
  color: var(--gold-dim);
  font-family: var(--sans);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  transition: transform .3s;
}

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.accordion__body__inner {
  padding: 0 0 1.5rem 0;
  color: var(--grey);
  font-size: .92rem;
  line-height: 1.7;
}

.accordion__item.open .accordion__body { max-height: 600px; }
.accordion__item.open .accordion__icon { transform: rotate(45deg); }

/* ──────────────────────────────
   CHRONOLOGICAL LIST
   ────────────────────────────── */
.chrono-entry {
  display: flex;
  gap: 1.5rem;
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--frame-line);
  align-items: flex-start;
}
.chrono-entry:last-child { border-bottom: none; }

.chrono-entry__date {
  flex: 0 0 100px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding-top: .2rem;
}

.chrono-entry__content h4 {
  font-size: 1.15rem;
  margin-bottom: .4rem;
}
.chrono-entry__content p { color: var(--grey); font-size: .9rem; }
.chrono-entry__content img {
  margin-top: 1rem;
  border: 1px solid var(--frame-line);
  max-width: 500px;
}

/* ──────────────────────────────
   STRUCTURED TABLE
   ────────────────────────────── */
.s-table {
  width: 100%;
  border-collapse: collapse;
}
.s-table th, .s-table td {
  text-align: left;
  padding: 1rem 1.2rem;
  border: 1px solid var(--frame-line);
  font-size: .9rem;
}
.s-table th {
  background: rgba(255,255,255,.02);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 400;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.s-table td { color: var(--grey); }
.s-table td strong { color: var(--white); font-weight: 500; }

/* ──────────────────────────────
   CONTACT FORM
   ────────────────────────────── */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  margin-bottom: .4rem;
  color: var(--white);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--frame-line);
  color: var(--white);
  padding: .85rem 1rem;
  font-family: var(--sans);
  font-size: .9rem;
  outline: none;
  transition: border-color .25s;
}
.form-input:focus { border-color: var(--gold); }

.btn {
  display: inline-block;
  border: 1px solid var(--gold-dim);
  background: transparent;
  color: var(--gold);
  font-family: var(--serif);
  font-size: .85rem;
  padding: .85rem 2.2rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  transition: all .25s;
}
.btn:hover {
  background: var(--gold);
  color: var(--black);
}

/* ──────────────────────────────
   CONTACT INFO BOX
   ────────────────────────────── */
.contact-card {
  border: 1px solid var(--frame-line);
  padding: 2rem;
  background: var(--bg);
}
.contact-card__name {
  font-family: var(--serif);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.contact-card__row {
  font-size: .9rem;
  color: var(--grey);
  margin-bottom: .5rem;
}
.contact-card__row span { color: var(--gold); }

/* ──────────────────────────────
   FOOTER
   ────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--frame-line);
  background: var(--black);
  padding: 2rem var(--frame-pad);
  margin-top: auto;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__credit {
  font-size: .78rem;
  color: var(--white);
}
.footer__credit a { color: var(--gold-dim); }
.footer__credit a:hover { color: var(--gold); }

.footer__contact {
  font-size: .78rem;
  color: var(--white);
  text-align: right;
}

.footer__social {
  display: flex;
  gap: .6rem;
}
.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--frame-line);
  border-radius: 50%;
  font-size: .7rem;
  color: var(--grey);
  transition: all .25s;
}
.footer__social a:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ──────────────────────────────
   UTILITIES
   ────────────────────────────── */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

.link-arrow {
  font-size: .78rem;
  color: var(--gold-dim);
  text-transform: uppercase;
  letter-spacing: .1em;
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: all .25s;
}
.link-arrow:hover { color: var(--gold); border-color: var(--gold); }

/* ──────────────────────────────
   RESPONSIVE
   ────────────────────────────── */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .col-grid--3 { grid-template-columns: 1fr; }
  .col-grid--2 { grid-template-columns: 1fr; }
  .col-grid__cell { border-right: none; }
  .data-row { flex-direction: column; gap: .3rem; }
  .data-row__label { flex: none; }
  .chrono-entry { flex-direction: column; gap: .5rem; }

  .topbar__nav { display: none; }
  .topbar__nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--black);
    border-bottom: 1px solid var(--frame-line);
    height: auto;
  }
  .topbar__nav.open li a {
    height: auto;
    padding: .9rem 1.5rem;
    border-left: none;
    border-bottom: 1px solid var(--frame-line);
  }
  .topbar__nav.open li:last-child a { border-right: none; }
  .topbar__toggle { display: block; }

  .footer__inner { flex-direction: column; text-align: center; }
  .footer__contact { text-align: center; }
}
