/* =========================================================
   President's Blog: Sheikh Hasina
   Bangladesh-inspired theme: deep green + red, light/dark modes
   ========================================================= */

:root {
  --green: #00693e;
  --green-dark: #024a2c;
  --red: #f42a41;
  --gold: #c9a227;

  --bg: #ffffff;
  --bg-alt: #f6f7f5;
  --bg-card: #ffffff;
  --text: #1b1f1d;
  --text-muted: #5a625d;
  --border: #e4e7e3;
  --header-bg: rgba(255, 255, 255, 0.96);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --overlay: rgba(2, 20, 12, 0.55);

  --font-head: 'Playfair Display', 'Noto Sans Bengali', serif;
  --font-body: 'Inter', 'Noto Sans Bengali', sans-serif;

  --fs-scale: 1;
  --radius: 14px;
}

html[data-theme="dark"] {
  --bg: #0f1512;
  --bg-alt: #131c17;
  --bg-card: #17211b;
  --text: #eef1ee;
  --text-muted: #a7b0aa;
  --border: #253128;
  --header-bg: rgba(15, 21, 18, 0.92);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --overlay: rgba(0, 0, 0, 0.65);
}

html[data-fontsize="-1"] { --fs-scale: 0.9; }
html[data-fontsize="0"]  { --fs-scale: 1; }
html[data-fontsize="1"]  { --fs-scale: 1.12; }
html[data-fontsize="2"]  { --fs-scale: 1.26; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: calc(16px * var(--fs-scale));
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .25s ease, color .25s ease;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--green);
  color: #fff; padding: 10px 16px; z-index: 9999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  display: inline-block; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-size: .78rem; color: var(--green); margin-bottom: .6em;
}
html[data-theme="dark"] .eyebrow { color: #6fd6a6; }

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.section-foot { text-align: center; margin-top: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green); color: #fff; padding: 13px 28px;
  border-radius: 999px; font-weight: 600; border: none; font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.btn:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn.outline:hover { background: #fff; color: var(--green); }
.btn.ghost { background: transparent; border: 2px solid var(--green); color: var(--green); }
html[data-theme="dark"] .btn.ghost { color: #6fd6a6; border-color: #6fd6a6; }

/* =========================== Intro Video Gate =========================== */
#intro-gate {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10000; background: #000;
  overflow: hidden; cursor: pointer;
  transition: opacity .7s ease, visibility .7s ease;
}
#intro-gate.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#intro-gate::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(2,10,7,.15) 0%, rgba(2,10,7,.1) 50%, rgba(2,10,7,.55) 100%);
}
#intro-video {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
  animation: kenburns 9s ease-in-out infinite alternate;
}
/* On tall/narrow (mobile) screens, cover crops most of a landscape video
   away. Show the whole frame instead, letterboxed on the black gate. */
@media (max-width: 760px), (orientation: portrait) {
  #intro-video { object-fit: contain; animation: none; }
}

/* =========================== Floating side tabs (Share / Act / Listen) =========================== */
.side-tabs {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 800;
  display: flex; flex-direction: column; box-shadow: -4px 4px 18px rgba(0,0,0,.18);
  border-radius: 10px 0 0 10px; overflow: hidden;
}
.side-tab {
  background: var(--green-dark); color: #fff; border: none; border-bottom: 1px solid rgba(255,255,255,.15);
  padding: 18px 10px; font-weight: 700; font-size: .82rem; letter-spacing: .03em;
  writing-mode: vertical-rl; transform: rotate(180deg); transition: background .2s ease, padding .2s ease;
}
.side-tab:last-child { border-bottom: none; }
.side-tab:hover { background: var(--green); padding-left: 14px; padding-right: 14px; }

/* =========================== Floating accessibility widget =========================== */
.side-access {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 800;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 4px 4px 18px rgba(0,0,0,.18); border-radius: 0 16px 16px 0; overflow: hidden;
}
.side-access-btn {
  background: var(--green-dark); color: #fff; border: none; width: 52px; padding: 14px 0;
  display: flex; align-items: center; justify-content: center; border-bottom: 1px solid rgba(255,255,255,.15);
}
.side-access-btn:last-child { border-bottom: none; }
.side-access-btn:hover { background: var(--green); }
.side-fs { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.split-circle {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(90deg, #0f1512 50%, #fff 50%); border: 1px solid rgba(255,255,255,.5);
}

@media (max-width: 760px) {
  .side-tab { padding: 13px 7px; font-size: .74rem; }
  .side-access-btn { width: 42px; padding: 10px 0; }
  .split-circle { width: 18px; height: 18px; }
  /* Keep page content clear of the fixed side-tab strip (right) and the
     fixed accessibility widget (left), both centered on the viewport */
  .container { padding-right: 56px; padding-left: 56px; }
}

/* =========================== Header / Nav =========================== */
.site-header {
  position: sticky; top: 0; z-index: 500; background: var(--header-bg);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: inline-flex; width: 34px; height: auto; }
.brand-mark svg { width: 100%; height: auto; border-radius: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 1.15rem; }
.brand-text small { color: var(--text-muted); font-size: .78rem; letter-spacing: .04em; }

.main-nav ul { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  display: inline-block; padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: .93rem;
  color: var(--text); transition: background .2s, color .2s;
}
.main-nav a:hover, .main-nav a.active { background: var(--green); color: #fff; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* =========================== Hero Slider =========================== */
.hero {
  position: relative; height: min(88vh, 720px); height: min(88svh, 720px); min-height: 460px; overflow: hidden; color: #fff;
}
.hero-slide {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: 0; transition: opacity 1.1s ease;
  overflow: hidden; pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide.active .hero-bg { animation: kenburns 7s ease-in-out forwards; }
.hero-bg { position: absolute; top: -3%; right: -3%; bottom: -3%; left: -3%; background-size: cover; background-position: center; }
.hero-slide::after {
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(180deg, rgba(2,20,12,.25) 0%, rgba(2,20,12,.35) 45%, rgba(2,20,12,.85) 100%);
}
.hero-content {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 0 20px 64px; max-width: 1180px; margin: 0 auto;
}
.hero-title {
  font-size: clamp(2rem, 5.2vw, 4rem); color: var(--slide-color, #fff); max-width: 760px; margin-bottom: .3em;
  opacity: 0; transform: translateY(24px); transition: opacity .8s ease .15s, transform .8s ease .15s;
  text-shadow: 0 2px 18px rgba(0,0,0,.35);
}
.hero-slide.active .hero-title { opacity: 1; transform: translateY(0); }

.hero-dots { position: absolute; right: 80px; bottom: 64px; z-index: 3; display: flex; flex-direction: column; gap: 10px; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); border: none;
}
.hero-dots button.active { background: #fff; width: 12px; height: 34px; border-radius: 8px; }

.hero-progress { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--gold); z-index: 3; width: 0%; }

@media (max-width: 760px) {
  /* Hero: shorter, breathing room for wrapped titles, dots clear of both
     the side-tab strip and the text underneath them */
  .hero { height: 100svh; min-height: 560px; max-height: 780px; }
  .hero-content { padding: 0 20px 84px; padding-right: 56px; padding-left: 56px; }
  .hero-title { font-size: 1.9rem; }
  .hero-dots { right: 56px; bottom: 84px; gap: 8px; }
  .hero-dots button { width: 8px; height: 8px; }
  .hero-dots button.active { width: 10px; height: 26px; }

  /* Show the whole 16:9 photo on a 9:16 screen instead of cropping it */
  .hero-bg {
    top: 0; right: 0; bottom: 0; left: 0;
    background-size: contain; background-repeat: no-repeat; background-color: #04140c;
  }
  .hero-slide.active .hero-bg { animation: none; }
}

@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.09); }
}

/* =========================== Stats strip =========================== */
.stats-strip { background: var(--green-dark); color: #fff; padding: 52px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; text-align: center; }
.stat-number { font-family: var(--font-head); font-size: clamp(1.8rem, 3vw, 2.6rem); color: #ffe9a8; }
.stat-label { font-size: .88rem; color: #e2ede6; margin-top: 4px; }

/* =========================== About teaser / cards =========================== */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.about-grid > * { min-width: 0; }
.about-photo {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .12s ease-out, box-shadow .25s ease; transform-style: preserve-3d; will-change: transform;
}
.about-photo img { width: 100%; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 40px; perspective: 1000px; }
.pillar-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 22px; text-align: center; box-shadow: var(--shadow);
  transition: transform .12s ease-out, box-shadow .25s ease; transform-style: preserve-3d; will-change: transform;
}
.pillar-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.14); }
html[data-theme="dark"] .pillar-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.pillar-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  border-radius: 50%; margin-bottom: 14px; color: var(--green);
  background: linear-gradient(135deg, rgba(0,105,62,.12), rgba(201,162,39,.14));
}
html[data-theme="dark"] .pillar-icon { color: #6fd6a6; }
.pillar-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.pillar-card p { font-size: 1rem; margin: 0; }

/* =========================== Timeline =========================== */
.timeline { position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before {
  content: ""; position: absolute; left: 110px; top: 0; bottom: 0; width: 2px; background: var(--border);
}
.timeline-item { position: relative; display: grid; grid-template-columns: 110px 1fr; gap: 28px; padding-bottom: 42px; z-index: 1; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-year { font-family: var(--font-head); font-weight: 700; color: var(--green); text-align: right; padding-top: 2px; }
html[data-theme="dark"] .timeline-year { color: #6fd6a6; }
.timeline-dot {
  position: absolute; left: 104px; top: 6px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--gold);
}
.timeline-body { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; }
.timeline-body h3 { font-size: 1.1rem; margin-bottom: 6px; }
.timeline-body p { margin: 0; font-size: .95rem; }

/* =========================== Listen / Act / Share =========================== */
.las-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 26px; }
.las-card {
  padding: 34px 26px; border-radius: var(--radius); text-align: center; color: #fff;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.las-card.listen { background: linear-gradient(135deg, #024a2c, #00693e); }
.las-card.act    { background: linear-gradient(135deg, #7a0f1f, #c81e35); }
.las-card.share  { background: linear-gradient(135deg, #7a5c00, #c9a227); }
.las-card .icon-lg {
  display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px;
  border-radius: 50%; margin-bottom: 14px; background: rgba(255,255,255,.16);
}
.las-card h3 { color: #fff; }
.las-card p { color: rgba(255,255,255,.9); }
.las-card .btn { margin-top: 10px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.6); }
.las-card .btn:hover { background: #fff; color: var(--text); }
.las-share-row { display: flex; justify-content: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.las-share-row a, .las-share-row button {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.6); color: #fff;
  border-radius: 999px; padding: 8px 14px; font-size: .85rem;
}
.las-share-row a:hover, .las-share-row button:hover { background: #fff; color: var(--text); }

/* =========================== Video grid =========================== */
.video-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.video-search { flex: 1; min-width: 220px; position: relative; }
.video-search .video-search-icon { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; display: flex; }
.video-search input {
  width: 100%; padding: 12px 16px 12px 44px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-size: .95rem;
}
.video-count { color: var(--text-muted); font-size: .9rem; white-space: nowrap; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px; perspective: 1200px; }
.video-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease-out, box-shadow .25s ease;
  transform-style: preserve-3d; will-change: transform;
}
.video-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.16); }
html[data-theme="dark"] .video-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.55); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play {
  position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.15); transition: background .2s;
}
.video-play span {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(244,42,65,.92);
  display: flex; align-items: center; justify-content: center;
}
.video-play span::before {
  content: ""; display: block; margin-left: 4px;
  border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent #fff;
}
.video-card:hover .video-play { background: rgba(0,0,0,.35); }
.video-meta { padding: 16px 18px; }
.video-meta .ep { font-weight: 700; font-family: var(--font-head); font-size: 1.05rem; }
.video-meta .date { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }

.show-more-wrap { text-align: center; margin-top: 44px; }

.video-embed-frame { position: relative; width: 100%; aspect-ratio: 16/9; }
.video-embed-frame iframe { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

/* =========================== Leaders / quotes =========================== */
.leaders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; perspective: 1200px; }
.leader-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px;
  transition: transform .12s ease-out, box-shadow .25s ease; transform-style: preserve-3d; will-change: transform;
}
.leader-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.14); }
html[data-theme="dark"] .leader-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.5); }
.leader-head { display: flex; align-items: center; gap: 14px; }
.leader-avatar {
  width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: #fff; flex-shrink: 0;
  background: linear-gradient(135deg, var(--green), var(--green-dark)); position: relative; overflow: hidden;
}
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-cc {
  position: absolute; bottom: -5px; right: -8px; font-size: .62rem; font-weight: 700; letter-spacing: .03em;
  background: var(--gold); color: #23200a; border-radius: 999px; padding: 2px 6px; border: 2px solid var(--bg-card);
}
.leader-name { font-weight: 700; font-size: 1rem; }
.leader-title { font-size: .82rem; color: var(--text-muted); }
.leader-quote { font-family: var(--font-head); font-size: 1.05rem; font-style: italic; line-height: 1.55; }
.leader-quote::before { content: open-quote; color: var(--gold); font-size: 1.4rem; }
.leader-quote::after { content: close-quote; color: var(--gold); font-size: 1.4rem; }
.leader-context { font-size: .8rem; color: var(--text-muted); }

/* =========================== Gallery =========================== */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; perspective: 1200px; }
.gallery-item {
  position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in;
  transition: transform .12s ease-out, box-shadow .25s ease; transform-style: preserve-3d; will-change: transform;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); color: #fff; font-weight: 600; font-size: .92rem;
}
.lightbox {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.9); z-index: 3000;
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 24px; right: 30px; color: #fff; font-size: 2rem; background: none; border: none; }

/* =========================== Contact =========================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-grid > * { min-width: 0; }
.contact-form { display: grid; gap: 14px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 13px 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-card); color: var(--text); font-family: inherit; font-size: .95rem;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-info-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.contact-info-card li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.contact-info-card li:last-child { border-bottom: none; }
.contact-info-card li svg, .contact-info-card li .monogram-sm { flex-shrink: 0; color: var(--green); }
html[data-theme="dark"] .contact-info-card li svg { color: #6fd6a6; }
.monogram-sm {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--bg-alt); font-size: .68rem; font-weight: 700;
}
.form-status { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .9rem; display: flex; align-items: center; gap: 10px; }
.form-status.ok { background: rgba(0,105,62,.12); color: var(--green); }
html[data-theme="dark"] .form-status.ok { color: #6fd6a6; }
.form-status.err { background: rgba(244,42,65,.12); color: var(--red); }
.form-status svg { flex-shrink: 0; }

/* =========================== Newsletter =========================== */
.newsletter { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 50px 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.newsletter-inner h2 { margin-bottom: 4px; font-size: 1.4rem; }
.newsletter-inner p { margin: 0; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input {
  padding: 13px 18px; border-radius: 999px; border: 1px solid var(--border); min-width: 260px;
  background: var(--bg-card); color: var(--text); font-size: .95rem;
}
.newsletter-form button {
  padding: 13px 26px; border-radius: 999px; border: none; background: var(--green); color: #fff; font-weight: 600;
}
.newsletter-form button:hover { background: var(--green-dark); }

/* =========================== Footer =========================== */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 40px; }
.footer-col h3 { font-size: 1rem; margin-bottom: 14px; }
.footer-col li { padding: 5px 0; }
.footer-col a:hover { color: var(--green); }
.footer-brand p { font-size: .9rem; }
.social-icons { display: flex; gap: 10px; margin-top: 14px; }
.social-icons a {
  width: 38px; height: 38px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.social-icons a:hover { background: var(--green); }

.footer-bottom {
  display: flex; justify-content: space-between; padding: 18px 20px; font-size: .8rem;
  color: var(--text-muted); flex-wrap: wrap; gap: 8px;
}

/* =========================== Share modal =========================== */
.share-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.6); z-index: 4000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.share-modal[hidden] { display: none; }
.share-modal-card {
  background: var(--bg-card); border-radius: var(--radius); padding: 30px; max-width: 360px; width: 100%;
  position: relative; box-shadow: var(--shadow); text-align: center;
}
.share-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 1.4rem; color: var(--text-muted); }
.share-options { display: grid; gap: 10px; margin-top: 18px; }
.share-options a, .share-options button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-alt);
  color: var(--text); font-size: .95rem; text-align: center;
}
.share-options a:hover, .share-options button:hover { background: var(--green); color: #fff; }

/* =========================== Video player modal =========================== */
.player-modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.88); z-index: 5000;
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.player-modal[hidden] { display: none; }
.player-modal-card { position: relative; width: 100%; max-width: 900px; }
.player-close {
  position: absolute; top: -44px; right: 0; background: none; border: none; color: #fff; font-size: 2rem;
}

/* =========================== Writings (homepage teaser cards) =========================== */
.writings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; perspective: 1200px; }
.writing-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; padding: 26px;
  transition: transform .12s ease-out, box-shadow .25s ease; transform-style: preserve-3d; will-change: transform;
}
.writing-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.16); }
html[data-theme="dark"] .writing-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,.55); }
.writing-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 50%; margin-bottom: 14px; color: var(--green);
  background: linear-gradient(135deg, rgba(0,105,62,.12), rgba(201,162,39,.14));
}
html[data-theme="dark"] .writing-icon { color: #6fd6a6; }
.writing-date { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.writing-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.writing-card p { font-size: .92rem; flex: 1; }
.writing-more { font-weight: 600; color: var(--green); font-size: .9rem; }
html[data-theme="dark"] .writing-more { color: #6fd6a6; }

/* =========================== Writings (full essay list page) =========================== */
.essay-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.essay {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 32px; box-shadow: var(--shadow);
}
.essay-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.essay-head .writing-icon { margin-bottom: 0; flex-shrink: 0; }
.essay-head h3 { font-size: 1.35rem; margin: 2px 0 0; }
.essay-lede { font-size: 1.05rem; font-style: italic; color: var(--text); }
.essay-full summary {
  cursor: pointer; font-weight: 600; color: var(--green); list-style: none; display: inline-block; margin-top: 4px;
}
html[data-theme="dark"] .essay-full summary { color: #6fd6a6; }
.essay-full summary::-webkit-details-marker { display: none; }
.essay-full summary::after { content: " +"; }
.essay-full[open] summary::after { content: " -"; }
.essay-body { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.essay-body p { font-size: 1rem; }

.sample-tag {
  display: inline-block; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  font-size: .68rem; color: var(--gold);
}
.sample-notice {
  max-width: 780px; margin: 0 auto 32px; padding: 12px 18px; border-radius: 10px;
  background: rgba(201,162,39,.12); border: 1px solid rgba(201,162,39,.35);
  font-size: .85rem; color: var(--text-muted); text-align: center;
}
.sample-notice code { background: rgba(0,0,0,.08); padding: 1px 6px; border-radius: 4px; }
html[data-theme="dark"] .sample-notice code { background: rgba(255,255,255,.1); }

/* =========================== Small utilities =========================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.monogram {
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: .8rem; letter-spacing: .02em;
}

/* =========================== Misc / responsive =========================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--border); display: none; padding: 10px 20px 18px;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { display: block; }
  .timeline::before { left: 18px; }
  .timeline-item { grid-template-columns: 1fr; padding-left: 38px; }
  .timeline-year {
    text-align: left; font-size: .85rem; margin-bottom: 6px; display: inline-block;
    background: var(--bg-alt); padding: 2px 10px; border-radius: 6px;
  }
  .timeline-dot { left: 12px; top: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
}
