/* =========================================================
   Dr. Chanchal Kumar Roy — Portfolio
   Design tokens derived from Figma "Teacher Protfolio"
   ========================================================= */

/* Self-hosted fonts (Satoshi body/headings, DM Sans labels, Roboto brand).
   The .woff2 urls stay unstamped: the <link rel="preload"> hrefs in header.php
   target these exact paths, so a query string would download each font twice. */
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 400; font-display: swap; src: url("../assets/fonts/satoshi-400.woff2") format("woff2"); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 500; font-display: swap; src: url("../assets/fonts/satoshi-500.woff2") format("woff2"); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 700; font-display: swap; src: url("../assets/fonts/satoshi-700.woff2") format("woff2"); }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../assets/fonts/dm-sans.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../assets/fonts/roboto.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --teal: #247C9E;
  --teal-dark: #1d6580;
  --teal-tint: rgba(36, 124, 158, 0.10);
  --ink: #121212;
  --ink-70: rgba(18, 18, 18, 0.70);
  --gray-900: #404040;
  --gray-600: #5e5e5e;
  --gray-300: #d9dee1;
  --gray-100: #f4f6f7;
  --white: #ffffff;
  --line: #e7ebed;

  --font-body: 'Satoshi', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-label: 'DM Sans', var(--font-body); /* small labels, tags and captions in the Figma file */
  --font-brand: 'Roboto', var(--font-body);

  --container: 1288px; /* 1240px content + 24px side padding, matches Figma 100px page gutters at 1440 */
  --u: calc(min(100vw, 1440px) / 1440); /* 1 Figma px at the current viewport, capped at 1440 */
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 16px rgba(18, 18, 18, 0.06);
  --shadow-md: 0 18px 45px rgba(18, 18, 18, 0.10);
  --header-h: 84px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; }
p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: max(24px, env(safe-area-inset-left, 0px)) max(24px, env(safe-area-inset-right, 0px));
}

.section { padding-block: 96px; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  height: 33px;
  margin: 0;
  padding: 10px 24px;
  background: #e6e5e5;
  border-radius: 8px;
  color: #3b3b3b;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  letter-spacing: 0.0769em;
  text-transform: uppercase;
}
.section-head.centered { max-width: none; margin-bottom: 60px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.section-head.centered .section-title { font-size: max(34px, calc(48 * var(--u))); line-height: 1.2; letter-spacing: -0.04em; color: #3b3b3b; }
.section-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-title.center { text-align: center; }
.section-sub { margin-top: 16px; color: var(--ink-70); font-size: 17px; }
.center { text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 11px 24px; font-size: 15px; }
.btn-contact-now { border-radius: 999px; }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--gray-300); }
.btn-outline:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

/* ============================================================
   HEADER
   ============================================================ */
/* Transparent over the hero (the hero circle runs behind it), turns white once scrolled */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease, backdrop-filter .25s ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  height: 108px;
  display: flex;
  align-items: center;
  gap: 24px;
  transition: height .25s ease;
}
.site-header.scrolled .header-inner { height: var(--header-h); }
.brand {
  flex: none;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 29.3px;
  letter-spacing: -0.06em;
  color: var(--gray-900);
}
.main-nav { margin-left: clamp(24px, 14vw, 203px); }
.nav-list { display: flex; align-items: center; gap: 28px; padding-left: 15px; }
.btn.btn-contact-now {
  margin-left: auto;
  height: 52px;
  padding: 10px 24px;
  background: var(--white);
  color: var(--gray-900);
  font-size: 20px;
  border: 0;
  box-shadow: 0 0 0 1px rgba(18, 18, 18, 0.06);
}
.btn.btn-contact-now:hover { background: var(--teal); color: var(--white); }
.nav-link {
  font-weight: 700;
  font-size: 18px;
  color: var(--gray-900);
  position: relative;
  padding: 6px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--teal);
  transition: width .22s ease;
}
.nav-link:hover, .nav-link.active { color: var(--teal); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 2.5px;
  background: var(--gray-900);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 0;
}
/* Desktop layout follows the 1440 Figma frame; every offset is scaled by --u so it shrinks with the viewport */
.hero-inner {
  position: relative;
  z-index: 1;
  min-height: calc(800 * var(--u));
  padding-top: calc(196 * var(--u));
}
.hero-copy { max-width: max(calc(539 * var(--u)), 460px); }
.hero-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: max(44px, calc(74 * var(--u)));
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--gray-900);
}
.hero-subtitle {
  margin-top: 20px;
  color: var(--teal);
  font-weight: 500;
  font-size: max(20px, calc(28 * var(--u)));
  line-height: 1.2;
}
.hero-desc {
  margin-top: 20px;
  max-width: 417px;
  color: var(--ink-70);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
}
.hero-actions { margin-top: 34px; display: flex; gap: 20px; flex-wrap: wrap; }
.hero-actions .btn {
  height: 60px;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 20px;
  font-weight: 700;
}
.hero-actions .btn-primary { background: var(--gray-900); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.hero-actions .btn-primary:hover { background: #2a2a2a; }
.hero-actions .btn-outline { color: var(--gray-900); border: 2px solid rgba(18, 18, 18, 0.3); }

/* Visual: a 1240*u wide box pinned to the right edge of the container, children placed at Figma coordinates */
.hero-visual {
  position: absolute;
  top: 0; bottom: 0;
  right: 24px;
  width: calc(1240 * var(--u));
  pointer-events: none;
}
/* Only the left half of the circle is ever visible: a semicircle of the Figma radius, then a flat body running past the
   screen edge (the hero clips it). This fills the top-right and bottom-right corners on any screen width. */
.hero-circle {
  position: absolute;
  left: calc(594 * var(--u));
  top: calc(-65 * var(--u));
  width: 100vw;
  height: calc(1011 * var(--u));
  border-radius: calc(505.5 * var(--u)) 0 0 calc(505.5 * var(--u));
  background: #bdd8e2; /* rgba(36, 124, 158, 0.3) over white, made solid */
}
.hero-portrait {
  position: absolute;
  left: calc(666 * var(--u));
  top: calc(80 * var(--u));
  width: calc(542 * var(--u));
  max-width: none;
  height: auto;
}
.hero-social {
  position: absolute;
  left: calc(1194 * var(--u));
  top: calc(249 * var(--u));
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}
.hero-social a {
  width: 45px; height: 45px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(18, 18, 18, 0.3);
  backdrop-filter: blur(6.7px);
  color: #504d4d;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.hero-social a:hover { background: var(--teal); color: var(--white); transform: scale(1.08); }

/* Stats band */
.stats-band { background: var(--teal); padding-block: 16px; }
.stats-band .container { max-width: 1440px; padding-inline: calc(120 * var(--u)); }
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-card {
  position: relative;
  padding: 20px 24px;
  border-radius: 12px;
  text-align: center;
  color: var(--white);
}
/* 2px vertical divider fading in and out, sits on the boundary between cards */
.stat-card + .stat-card::before {
  content: "";
  position: absolute;
  left: -1px; top: 50%;
  width: 2px; height: 112px;
  transform: translateY(-50%);
  background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.24) 50%, rgba(255,255,255,0.08) 100%);
}
.stat-num {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: max(32px, calc(48 * var(--u)));
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
}
.stat-label {
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
  font-size: max(15px, calc(20 * var(--u)));
  line-height: 1.4;
}

/* ============================================================
   ABOUT
   ============================================================ */
.tabs {
  display: inline-flex;
  gap: 10px;
  background: #f6f6f6;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 6px;
  margin: 0 auto 60px;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12);
  flex-wrap: wrap;
}
.about { text-align: center; }
.about.section { padding-block: 80px; }
.about .tabs { display: inline-flex; }
.about > .container { display: flex; flex-direction: column; align-items: center; }
.tab-panel { width: 100%; text-align: left; }
.tab {
  height: 56px;
  padding: 10px 32px;
  border: 1px solid rgba(18, 18, 18, 0.1);
  background: var(--white);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  color: var(--ink);
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tab:hover { border-color: var(--gray-900); }
.tab.active { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.tab-panel { display: none; animation: fade .4s ease; }
.tab-panel.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.about-grid {
  display: grid;
  grid-template-columns: min(503px, 42%) 1fr;
  gap: 67px;
  align-items: start;
}
/* Figma crops a 724x573 photo inside a 503x532 frame, shifted 80px left */
.about-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 503 / 532;
  background: #a4bcc3;
}
.about-media img {
  position: absolute;
  left: -15.9%; top: 0;
  width: 143.9%;
  max-width: none;
  height: auto;
}
.about-text .section-title {
  max-width: 513px;
  margin-bottom: 20px;
  font-size: max(34px, calc(48 * var(--u)));
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #3b3b3b;
}
.about-text p { color: rgba(18, 18, 18, 0.8); font-weight: 500; font-size: 18px; line-height: 1.6; }
.about-text p + p { margin-top: 1.6em; }

.profile-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px 80px;
  margin-top: 60px;
}
.profile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transition: transform .2s ease;
}
.profile-link:hover { transform: translateY(-3px); }
.pl-icon {
  width: 51px; height: 51px;
  display: grid; place-items: center;
}
.pl-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pl-icon-orcid, .pl-icon-rg { border-radius: 50%; padding: 7px; }
.pl-icon-orcid { background: #a6cd3c; }
.pl-icon-orcid img { filter: brightness(0) invert(1); }
.pl-icon-rg { background: #04d4ac; }
.pl-icon-rg img { width: 29px; height: 29px; }
.pl-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 5px;
}
.profile-link .arrow { width: 22px; height: 22px; color: var(--ink); }
.profile-link:hover .pl-label { color: var(--teal); }
.profile-link:hover .arrow { color: var(--teal); }

.timeline { display: flex; flex-direction: column; gap: 24px; max-width: 720px; }
.timeline li { display: flex; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.tl-year { font-weight: 700; color: var(--teal); font-size: 20px; min-width: 64px; }
.timeline h4 { font-size: 20px; margin-bottom: 6px; }
.timeline p { color: var(--ink-70); }
/* space between a tab panel title (Education, CV, Profession) and its content */
.tab-panel > .section-title { margin-bottom: 32px; }
.cv-text { max-width: 620px; color: var(--ink-70); margin: 0 0 28px; font-size: 17px; }
.profession-list { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
/* "> li", not a descendant selector.
   These entries are rich text, and the editor can emit its own <ul><li> — the
   list button wraps a line in exactly that. With a descendant selector the rule
   then lands on the INNER <li> as well as the outer one, giving the entry two
   nested borders. Scoping to direct children means only the entry itself is
   outlined, whatever the editor put inside it. */
.profession-list > li { padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-70); }
.profession-list strong { color: var(--ink); }
/* Nested lists inside an entry: keep them inline with the entry's own text
   rather than inheriting the page's default list indent and markers. */
.profession-list > li ul,
.profession-list > li ol { margin: 8px 0 0; padding-left: 20px; }

/* ============================================================
   RESEARCH AREAS
   ============================================================ */
.research { background: #c7e5ee; }
.research.section { padding-block: 80px; }

/* Shared split heading: label pill, rule, then title left / intro right */
.section-head.split { max-width: none; margin-bottom: 60px; }
.split .eyebrow {
  display: inline-flex;
  align-items: center;
  height: 33px;
  margin: 0;
  padding: 10px 24px;
  background: #e6e5e5;
  border-radius: 8px;
  color: #3b3b3b;
  font-weight: 500;
  font-size: 13px;
  line-height: 13px;
  letter-spacing: 0.0769em;
}
.research .split .eyebrow { background: var(--white); }
.head-rule { margin: 20px 0 16px; border: 0; border-top: 1px solid rgba(18, 18, 18, 0.3); }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; }
.split .section-title {
  font-size: max(34px, calc(48 * var(--u)));
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #3b3b3b;
}
.split .section-sub {
  flex: 0 1 499px;
  margin: 0;
  color: rgba(18, 18, 18, 0.8);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.6;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.research-card {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 12px 12px 20px;
  background: var(--white);
  border: 1px solid rgba(18, 18, 18, 0.05);
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  transition: transform .22s ease, box-shadow .22s ease;
}
.rc-icon {
  display: grid;
  place-items: center;
  width: 72px; height: 72px;
  border-radius: 4.8px;
  background: #f6f6f6;
}
.rc-icon img { max-width: 62px; max-height: 62px; }
.rc-info { display: flex; flex-direction: column; gap: 8px; }
.research-card h3 {
  font-size: 28px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--gray-900);
}
.research-card p { color: rgba(18, 18, 18, 0.6); font-weight: 500; font-size: 18px; line-height: 1.4; }
.research-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14); }

/* ============================================================
   FUNDED PROJECTS
   ============================================================ */
.projects.section { padding-block: 80px; }
/* margin-bottom mirrors .blog-grid — it is what opens the gap above the
   section's centred call-to-action ("View All Projects" on the homepage). */
.projects-grid { display: flex; flex-direction: column; gap: 20px; margin-bottom: 32px; }
.project-card {
  display: grid;
  grid-template-columns: min(590px, 46%) 1fr;
  align-items: center;
  gap: 60px;
}
.project-card + .project-card { padding-top: 20px; border-top: 1px solid rgba(18, 18, 18, 0.3); }
.project-card:nth-child(even) { grid-template-columns: 1fr min(590px, 46%); }
.project-card:nth-child(even) .project-img { order: 2; }
.project-card:nth-child(even) .project-body { order: 1; }
.project-img {
  width: 100%;
  aspect-ratio: 590 / 472;
  object-fit: contain;
  background: #fbfbfb;
  box-shadow: 0 4px 13.9px rgba(0, 0, 0, 0.08);
}
.project-body { display: flex; flex-direction: column; gap: 20px; max-width: 574px; }
.project-body h3 { font-size: 32px; font-weight: 700; line-height: 1.1; color: #3b3b3b; }
.project-body > p { margin-top: -4px; color: rgba(18, 18, 18, 0.8); font-weight: 500; font-size: 18px; line-height: 1.6; }
.project-meta { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; font-size: 20px; font-weight: 500; line-height: 1.1; color: #3b3b3b; }
.project-meta li { position: relative; padding-left: 24px; }
.project-meta li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #adadad;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.project-meta strong { font-weight: 500; color: inherit; }
.link-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 48px;
  margin-top: 12px;
  padding: 10px 24px;
  background: var(--gray-900);
  border-radius: 4px;
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  transition: background .2s ease, transform .2s ease;
}
.link-more:hover { background: var(--teal); transform: translateY(-2px); }

/* ============================================================
   SNAPSHOTS GALLERY
   ============================================================ */
.snapshots.section { padding-block: 80px; background: #c7e5ee; }
.snapshots .section-title {
  max-width: 452px;
  margin: 0 auto 40px;
  font-size: max(40px, calc(66 * var(--u)));
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: #3b3b3b;
}
/* Full-bleed strip: it spans the whole viewport, so there is no boxed-in gap at
   either edge. The first slide is inset by a computed gutter that lines it up
   with the .container edge used by every other section, and the rest bleeds off
   the right to invite the swipe. --edge is the small pad at the end of the
   scroll (kept small on purpose, so the last slide can reach the edge). */
.gallery-track {
  --gutter: max(24px, calc((100% - var(--container)) / 2 + 24px));
  --edge: max(24px, env(safe-area-inset-right, 0px));
  width: 100%;
  padding-inline: var(--gutter) var(--edge);
  scroll-padding-inline: var(--gutter) var(--edge);
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-row { --gh: min(290px, 58vw); display: flex; gap: 24px; width: max-content; }
/* Uniform landscape tiles (3:2): every snapshot gets the same frame, so the
   strip has an even rhythm and each carousel step travels the same distance.
   object-fit: cover crops to fill the frame — change the ratio here, in one
   place, if you want a different shape. */
.gallery-row img {
  height: var(--gh);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.publications.section { padding-block: 80px; background: #f6f6f6; }
.pub-list { display: flex; flex-direction: column; }
.pub-item {
  display: grid;
  grid-template-columns: auto minmax(0, 960px) auto;
  justify-content: space-between;
  align-items: start;
  column-gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid #d2ccc0;
}
.pub-num {
  padding-top: 2px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 22px;
  line-height: 36px;
  color: #939393;
}
.pub-body { display: flex; flex-direction: column; gap: 10px; }
.pub-body h3 { font-size: 22px; line-height: 36px; font-weight: 700; color: #0c1400; }
.pub-excerpt { color: rgba(18, 18, 18, 0.85); font-size: 16px; line-height: 26px; }
.pub-meta { padding-top: 6px; color: #d2ccc0; font-size: 12.48px; line-height: 18.72px; word-spacing: 3px; }
.pub-meta span { color: #4b7887; word-spacing: normal; }
.pub-actions { display: flex; gap: 12px; }
.btn-chip {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 10px 24px;
  border: 2px solid #ddd;
  border-radius: 4px;
  font-weight: 500;
  font-size: 16px;
  text-transform: uppercase;
  color: var(--gray-900);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.pub-actions .btn-chip:first-child { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.btn-chip:hover, .pub-actions .btn-chip:first-child:hover { background: var(--teal); border-color: var(--teal); color: var(--white); }

/* ============================================================
   TEAM
   ============================================================ */
.team.section { padding-block: 80px; background: var(--white); }
.team .head-row { align-items: flex-end; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.team-card { display: flex; flex-direction: column; gap: 17px; }
.team-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 280 / 327;
  object-fit: cover;
  object-position: center top;
  border-radius: 12px;
  background: #c8e7e8;
}
.team-card h3 { margin-bottom: -9px; font-size: max(20px, calc(28 * var(--u))); font-weight: 700; line-height: 1.2; color: var(--gray-900); }
.team-card p { color: rgba(18, 18, 18, 0.6); font-weight: 500; font-size: 16px; line-height: 1.4; }

/* ============================================================
   COURSES
   ============================================================ */
.courses.section { padding-block: 80px; background: #f6f6f6; }
.courses .section-head.centered .section-title { font-size: max(40px, calc(66 * var(--u))); }
.courses-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.course-card { display: flex; flex-direction: column; gap: 16px; }
.course-thumb { position: relative; aspect-ratio: 396 / 264; overflow: hidden; border-radius: 4px; background: #b2bec7; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.course-card:hover .course-thumb img { transform: scale(1.04); }
/* YouTube-style play badge, 64x45 as in Figma */
.play-btn {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px; height: 45px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f00;
  color: var(--white);
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.play-btn svg { width: 22px; height: 22px; }
.course-card:hover .play-btn { transform: scale(1.1); }
.course-tag {
  position: absolute; top: 10px; right: 10px;
  padding: 0 10px;
  background: #f0f0f0;
  border-radius: 4px;
  color: var(--gray-900);
  font-weight: 700;
  font-size: 13px;
  line-height: 26px;
  letter-spacing: 0.0385em;
  text-transform: uppercase;
}
.course-body { display: flex; flex-direction: column; gap: 12px; }
.course-body h3 { font-size: max(21px, calc(28 * var(--u))); font-weight: 700; line-height: 1.2; color: var(--gray-900); }
.course-meta { font-family: var(--font-label); color: rgba(18, 18, 18, 0.8); font-weight: 500; font-size: 18px; line-height: 1.6; }
.course-meta span { color: #4b7887; }
.course-meta b { font-weight: 700; }
/* Short course summary. Clamped so a long syllabus cannot stretch the card. */
.course-desc {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(18, 18, 18, 0.6);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  overflow: hidden;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact.section { position: relative; overflow: hidden; padding-block: 100px; background: #c7e5ee; }
.contact.section::before {
  content: "";
  position: absolute;
  left: -29px; bottom: 0;
  width: 258px; height: 254px;
  background: url("../assets/img/hero-pattern-1.png") left bottom / cover no-repeat;
  opacity: .6;
  pointer-events: none;
}
.contact-inner { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: stretch; }
.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 40px;
  background: var(--white);
  border-radius: 14px;
}
.contact-info .head-rule { margin: 15px 0; }
.contact-info .section-title { font-size: max(34px, calc(48 * var(--u))); line-height: 1.2; letter-spacing: -0.04em; color: #3b3b3b; }
.contact-info .section-sub { margin-top: 12px; color: #666; font-weight: 500; font-size: 16px; line-height: 26px; }
.contact-name { font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -0.03em; color: var(--gray-900); }
.ci-affil { margin-top: 10px; color: #666; font-weight: 500; font-size: 16px; line-height: 26px; }
.contact-list { margin-top: 10px; display: flex; flex-direction: column; }
.contact-list li { display: flex; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid #e4dfd6; }
.contact-list li:last-child { border-bottom: 0; }
.ci-label { flex: 0 0 64px; font-weight: 500; font-size: 10.4px; line-height: 16px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(18, 18, 18, 0.6); }
.ci-value { font-weight: 500; font-size: 18px; line-height: 1.2; color: #18192b; }
a.ci-value:hover { color: var(--teal); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 48px 40px;
  background: var(--white);
  border-radius: 14px;
}
.contact-form h3 { font-size: 26px; line-height: 36px; font-weight: 700; text-transform: uppercase; color: #3b3b3b; }
.form-fields { display: flex; flex-direction: column; gap: 24px; }
.field { position: relative; display: block; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(64, 64, 64, 0.6);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  transition: border-color .2s ease;
  resize: none;
}
.contact-form textarea { display: block; height: 35px; overflow: hidden; padding-right: 36px; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(18, 18, 18, 0.6); opacity: 1; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-bottom-color: var(--teal); }
.attach { position: absolute; right: 0; top: -3px; width: 24px; height: 24px; color: rgba(18, 18, 18, 0.6); pointer-events: none; }
.contact-form .checkbox { display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; color: var(--gray-900); font-weight: 700; font-size: 16px; line-height: 1.5; cursor: pointer; }
.contact-form .checkbox input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 17px; height: 18px;
  margin: 0;
  border: 1px solid var(--gray-900);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.contact-form .checkbox input:checked {
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  border-color: var(--teal);
}
.contact-form .checkbox input:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.contact-form .btn-primary { width: 100%; height: 60px; border-radius: 4px; font-size: 20px; font-weight: 700; }
.form-status { margin-top: -20px; font-size: 14px; font-weight: 600; min-height: 18px; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #c0392b; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Honeypot field: moved out of view for humans, still discoverable by naive bots. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============================================================
   BLOG
   ============================================================ */
.blog.section { padding-block: 80px; background: #f6f6f6; }
.blog .eyebrow { background: var(--white); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 32px; }
.blog-card { display: flex; flex-direction: column; }
/* [hidden] must beat the display values above, so JS can filter by toggling it. */
.blog-grid[hidden],
.blog-card[hidden] { display: none; }
.blog-thumb { position: relative; aspect-ratio: 395 / 268; overflow: hidden; border-radius: 4px; background: #b2bec7; }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.blog-card:hover .blog-thumb img { transform: scale(1.04); }
.blog-cat {
  font-family: var(--font-label);
  position: absolute; top: 10px; right: 10px;
  padding: 0 7px;
  background: #f0f0f0;
  border-radius: 4px;
  color: var(--gray-900);
  font-weight: 400;
  font-size: 13px;
  line-height: 26px;
  letter-spacing: 0.0385em;
  text-transform: uppercase;
}
.blog-body { display: flex; flex-direction: column; }
.blog-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 5px;
  color: #666;
  font-weight: 500;
  font-size: 13px;
  line-height: 17px;
  letter-spacing: 0.0769em;
  text-transform: uppercase;
}
.blog-meta .dash { display: block; width: 8px; height: 1px; background: #666; }
.blog-body h3 { margin-top: 7px; font-size: max(20px, calc(26 * var(--u))); font-weight: 700; line-height: 1.2; color: #3b3b3b; transition: color .2s ease; }
.blog-card:hover h3 { color: var(--teal); }
/* Centred call-to-action beneath a section's card list: "Explore All" in the
   blog, "View All Projects" under the homepage's funded projects. One rule for
   both so the two buttons can never drift apart. Scoped per-section rather than
   to the bare .center utility, so a future centred button elsewhere on the site
   is not restyled by accident. */
.blog .center .btn-primary,
.projects .center .btn-primary { background: var(--gray-900); height: 60px; border-radius: 4px; font-size: 20px; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.blog .center .btn-primary:hover,
.projects .center .btn-primary:hover { background: #2a2a2a; }
.projects .eyebrow { font-family: var(--font-label); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #085573; color: var(--white); }
.footer-main { padding-top: 21px; padding-bottom: 49px; }
.footer-connect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  min-height: 109px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.footer-connect h2 { font-size: max(34px, calc(48 * var(--u))); font-weight: 700; line-height: 1; color: var(--white); }
.footer-connect-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-phone-pill,
.footer-chat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 18px;
  transition: background .2s ease, color .2s ease;
}
.footer-phone-pill { width: 216px; background: #f0f0f0; color: var(--gray-900); text-transform: uppercase; }
.footer-chat { padding: 0 25px; background: var(--white); color: #3b3b3b; letter-spacing: 0.0556em; }
.footer-phone-pill:hover, .footer-chat:hover { background: var(--teal); color: var(--white); }

.footer-top { display: flex; justify-content: space-between; gap: 40px; margin-top: 38px; }
.footer-brand { flex: 0 0 338px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.footer-brand h3 { margin-bottom: 16px; font-family: var(--font-body); font-size: 29.3px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: var(--white); }
.footer-brand p { font-size: 16px; line-height: 25.6px; color: var(--white); }
.footer-contact { display: flex; flex-direction: column; gap: 14px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.2); }
.footer-contact li { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 26px; }
.footer-contact svg { flex: none; }
.footer-contact a:hover { text-decoration: underline; }

.footer-links { display: flex; justify-content: space-between; gap: 40px; flex: 0 1 484px; }
.footer-col h4 { margin-bottom: 23px; font-size: 28px; font-weight: 500; line-height: 1; color: var(--white); }
.footer-col ul { display: flex; flex-direction: column; gap: 14px; }
.footer-col li a { font-size: 15px; font-weight: 500; line-height: 23px; color: rgba(255, 255, 255, 0.8); transition: color .2s ease; }
.footer-col li a:hover { color: var(--white); }
.footer-news { flex: 0 1 298px; }
.footer-news h4 { margin-bottom: 10px; }
.footer-news p { margin-bottom: 25px; font-size: 16px; line-height: 26px; }
.footer-newsletter {
  display: flex;
  align-items: center;
  height: 55px;
  margin-bottom: 60px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.footer-newsletter input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--white); font-family: var(--font-label); font-size: 16px; }
.footer-newsletter input::placeholder { color: var(--white); opacity: 1; }
.footer-newsletter input:focus { outline: none; }
.footer-newsletter button { display: grid; place-items: center; border: 0; background: transparent; color: var(--white); cursor: pointer; padding: 0 0 0 8px; }
.footer-newsletter button:hover { color: #c7e5ee; }
.footer-col .footer-social { flex-direction: row; align-items: center; gap: 20px; }
.footer-social a { display: grid; place-items: center; color: var(--white); transition: color .2s ease, transform .2s ease; }
.footer-social a:hover { color: #c7e5ee; transform: translateY(-2px); }

.footer-bottom { padding-block: 15px; background: #f5fbfd; text-align: center; }
.footer-bottom p { font-family: var(--font-label); color: var(--gray-900); font-size: 15px; line-height: 26px; }

/* ============================================================
   BLOG DETAILS PAGE
   ============================================================ */
/* inner pages have no hero behind the header, so it stays solid */
.inner-page .site-header { background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); }
.inner-page .header-inner { height: var(--header-h); }
.inner-page .btn.btn-contact-now { box-shadow: 0 0 0 1px rgba(18, 18, 18, 0.18); }
.inner-page .btn.btn-contact-now:hover { box-shadow: none; }
.inner-page main { padding-top: var(--header-h); }

.post-hero { position: relative; overflow: hidden; padding-block: 64px 72px; background: #c7e5ee; }
.post-hero::before {
  content: "";
  position: absolute;
  right: -29px; bottom: 0;
  width: 258px; height: 254px;
  background: url("../assets/img/hero-pattern-1.png") right bottom / cover no-repeat;
  opacity: .6;
  transform: scaleX(-1);
  pointer-events: none;
}
.post-hero .container { position: relative; }
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
  width: fit-content; max-width: 100%;
  margin-bottom: 28px; padding: 9px 16px;
  background: var(--white); border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  color: #3b3b3b; font-weight: 500; font-size: 14px; line-height: 1.2;
}
.breadcrumb a:hover { color: var(--teal); }
.breadcrumb span[aria-current] { color: rgba(18, 18, 18, 0.6); }
.breadcrumb .sep { color: rgba(18, 18, 18, 0.35); }
.post-cat { font-family: var(--font-label); }
.post-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 28px; }
.post-topline .breadcrumb { margin-bottom: 0; }
.post-title {
  max-width: 900px; margin-top: 18px;
  font-size: max(32px, calc(56 * var(--u)));
  line-height: 1.15; letter-spacing: -0.04em; color: #3b3b3b;
}
.post-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 24px; color: #3b3b3b; font-weight: 500; font-size: 13px; line-height: 17px; letter-spacing: 0.0769em; text-transform: uppercase; }
.post-meta li + li { display: flex; align-items: center; gap: 20px; }
.post-meta li + li::before { content: ""; width: 8px; height: 1px; background: #3b3b3b; }

.post-body.section { padding-block: 80px; background: var(--white); }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 60px; align-items: start; }
.post-cover { margin: 0 0 40px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 4px; background: #b2bec7; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-content { color: rgba(18, 18, 18, 0.8); font-weight: 500; font-size: 18px; line-height: 1.7; }
.post-content > * + * { margin-top: 20px; }
.post-content .lead { font-size: 21px; line-height: 1.6; color: #3b3b3b; }
.post-content h2 { margin-top: 44px; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -0.03em; color: #3b3b3b; }
.post-content h2 + * { margin-top: 14px; }
.post-content strong { color: #3b3b3b; font-weight: 700; }
.post-content a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.post-content ul { display: flex; flex-direction: column; gap: 12px; }
.post-content li { position: relative; padding-left: 26px; }
.post-content li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 12px; height: 12px; background: #adadad;
  clip-path: polygon(25% 5%, 75% 5%, 100% 50%, 75% 95%, 25% 95%, 0 50%);
}
.post-content blockquote { margin: 36px 0; padding: 26px 30px; background: #f6f6f6; border-left: 4px solid var(--teal); border-radius: 4px; }
.post-content blockquote p { font-size: 22px; line-height: 1.5; font-weight: 700; letter-spacing: -0.01em; color: #3b3b3b; }

.post-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-top: 48px; padding-block: 24px; border-block: 1px solid #e4dfd6; }
.post-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.post-tags li { padding: 0 12px; background: #f0f0f0; border-radius: 4px; color: var(--gray-900); font-family: var(--font-label); font-size: 13px; line-height: 30px; letter-spacing: 0.0385em; text-transform: uppercase; }
.share { display: flex; align-items: center; gap: 10px; }
.share-label { margin-right: 4px; font-weight: 700; font-size: 14px; color: #3b3b3b; }
.share a, .share button {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border: 2px solid #ddd; border-radius: 4px; background: var(--white); color: var(--gray-900);
  cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.share a:hover, .share button:hover { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.share button.copied { background: var(--teal); border-color: var(--teal); color: var(--white); }
.share svg { width: 18px; height: 18px; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.post-nav a { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 22px 24px; border: 2px solid #ddd; border-radius: 4px; transition: border-color .2s ease, transform .2s ease; }
.post-nav a:hover { border-color: var(--teal); transform: translateY(-2px); }
.post-nav small { font-weight: 500; font-size: 12px; letter-spacing: 0.0769em; text-transform: uppercase; color: rgba(18, 18, 18, 0.6); }
.post-nav strong { font-size: 18px; line-height: 1.35; font-weight: 700; color: #3b3b3b; }
#post-next a { text-align: right; }

.post-aside { display: flex; flex-direction: column; gap: 28px; position: sticky; top: calc(var(--header-h) + 24px); }
.aside-card { padding: 28px; background: #f6f6f6; border-radius: 8px; }
.aside-card h3 { margin-bottom: 20px; font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; color: #3b3b3b; }
.about-card { text-align: center; }
.about-card img { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%; object-fit: cover; object-position: top center; background: #c8e7e8; }
.about-card h3 { margin-bottom: 4px; }
.about-card p { color: rgba(18, 18, 18, 0.7); font-weight: 500; font-size: 15px; line-height: 1.5; }
.about-card .btn { margin-top: 18px; height: 48px; padding: 0 22px; border-radius: 4px; background: var(--gray-900); color: var(--white); font-size: 16px; font-weight: 700; }
.about-card .btn:hover { background: var(--teal); }
.recent-list li + li { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e4dfd6; }
.recent-item { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; }
.recent-item img { width: 88px; height: 72px; object-fit: cover; border-radius: 4px; }
.recent-item small { display: block; margin-bottom: 4px; font-weight: 500; font-size: 12px; letter-spacing: 0.0769em; text-transform: uppercase; color: #666; }
.recent-item strong { display: block; font-size: 16px; line-height: 1.3; font-weight: 700; color: #3b3b3b; transition: color .2s ease; }
.recent-item:hover strong { color: var(--teal); }
.cat-list { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-list a { display: inline-block; padding: 0 14px; background: var(--white); border-radius: 4px; color: var(--gray-900); font-family: var(--font-label); font-size: 13px; line-height: 36px; letter-spacing: 0.0385em; text-transform: uppercase; transition: background .2s ease, color .2s ease; }
.cat-list a:hover { background: var(--gray-900); color: var(--white); }

.post-cta { padding-block: 72px; background: #c7e5ee; color: #3b3b3b; text-align: center; }
.post-cta h2 { max-width: 720px; margin: 0 auto; font-size: max(30px, calc(44 * var(--u))); line-height: 1.2; letter-spacing: -0.03em; }
.post-cta p { max-width: 560px; margin: 14px auto 0; color: rgba(18, 18, 18, 0.8); font-weight: 500; font-size: 18px; }
.post-cta .btn { margin-top: 28px; height: 60px; padding: 0 32px; border-radius: 4px; background: var(--gray-900); color: var(--white); font-size: 20px; font-weight: 700; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.post-cta .btn:hover { background: var(--teal); }

@media (max-width: 1024px) {
  .post-layout { grid-template-columns: 1fr; gap: 48px; }
  .post-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .post-aside .about-card, .post-aside .cat-card { grid-column: auto; }
}
@media (max-width: 860px) {
  .post-hero { padding-block: 44px 52px; }
  .post-body.section { padding-block: 56px; }
  .post-content { font-size: 17px; }
  .post-content .lead { font-size: 19px; }
  .post-content h2 { margin-top: 36px; font-size: 26px; }
  .post-content blockquote p { font-size: 19px; }
  .post-cta { padding-block: 56px; }
  .breadcrumb { padding: 2px 14px; gap: 0 6px; }
  .breadcrumb a { display: inline-block; padding-block: 12px; }
  .cat-list a { line-height: 44px; }
}
@media (max-width: 640px) {
  .post-aside { grid-template-columns: 1fr; }
  .post-nav { grid-template-columns: 1fr; }
  #post-next a { text-align: left; }
  .post-foot { flex-direction: column; align-items: flex-start; }
  .post-cover { margin-bottom: 28px; }
  .aside-card { padding: 22px; }
  .post-cta .btn { width: 100%; }
  .post-meta { gap: 8px 14px; }
  .post-meta li + li { gap: 14px; }
}


/* whole blog card is clickable through its title link */
.blog-card { position: relative; }
.blog-body h3 a::after { content: ""; position: absolute; inset: 0; }
.blog-body h3 a { color: inherit; }

/* Same for the course grid: the link sits inside the <h3>, and this stretches its
   ::after over the whole card so the image and the excerpt are clickable too.
   .course-card is flex, so position: relative is added here rather than at its
   definition above. color: inherit keeps the heading's --gray-900 instead of the
   default link colour. */
.course-card { position: relative; }
.course-body h3 a::after { content: ""; position: absolute; inset: 0; }
.course-body h3 a { color: inherit; }
[hidden] { display: none !important; }

/* ============================================================
   BLOG LISTING PAGE
   ============================================================ */
.blog-hero .post-title { max-width: 760px; }
.blog-intro { max-width: 620px; margin-top: 18px; color: rgba(18, 18, 18, 0.8); font-weight: 500; font-size: 18px; line-height: 1.6; }

.blog-list.section { padding-block: 64px 80px; background: var(--white); }
.blog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.blog-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.blog-filters button {
  height: 48px; padding: 0 22px;
  border: 1px solid rgba(18, 18, 18, 0.1); border-radius: 90px;
  background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-weight: 500; font-size: 16px; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.blog-filters button:hover { border-color: var(--gray-900); }
.blog-filters button.active { background: var(--gray-900); border-color: var(--gray-900); color: var(--white); }
.blog-search { position: relative; display: block; width: min(100%, 320px); }
.blog-search svg { position: absolute; left: 16px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: rgba(18, 18, 18, 0.6); pointer-events: none; }
.blog-search input {
  width: 100%; height: 48px; padding: 0 16px 0 46px;
  border: 1px solid rgba(18, 18, 18, 0.15); border-radius: 90px;
  background: var(--white); color: var(--ink);
  font-family: var(--font-body); font-weight: 500; font-size: 16px;
  transition: border-color .2s ease;
}
.blog-search input::placeholder { color: rgba(18, 18, 18, 0.6); opacity: 1; }
.blog-search input:focus { outline: none; border-color: var(--teal); }
.blog-list .blog-count { margin: 28px 0 24px; color: #666; font-weight: 500; font-size: 13px; letter-spacing: 0.0769em; text-transform: uppercase; }
.blog-list .blog-grid { margin-bottom: 0; row-gap: 48px; }
.blog-empty { padding: 64px 24px; text-align: center; background: #f6f6f6; border-radius: 8px; }
.blog-empty h2 { font-size: 28px; letter-spacing: -0.03em; color: #3b3b3b; }
.blog-empty p { margin-top: 8px; color: rgba(18, 18, 18, 0.7); font-weight: 500; font-size: 18px; }
.blog-empty .btn { margin-top: 24px; height: 48px; padding: 0 24px; border-radius: 4px; background: var(--gray-900); color: var(--white); font-size: 16px; font-weight: 700; }
.blog-empty .btn:hover { background: var(--teal); }

@media (max-width: 860px) {
  .blog-list.section { padding-block: 48px 64px; }
  .blog-intro { font-size: 17px; }
  .blog-list .blog-grid { row-gap: 36px; }
}
@media (max-width: 560px) {
  .blog-toolbar { display: block; }
  .blog-filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100vw; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
  .blog-search { margin-top: 14px; }
  .blog-filters::-webkit-scrollbar { display: none; }
  .blog-filters button { flex: none; }
  .blog-search { width: 100%; }
  .blog-list .blog-count { margin-top: 20px; }
}

/* ============================================================
   ACCESSIBILITY + MOTION
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
:where(a, button, input, textarea, summary):focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   RESPONSIVE
   Breakpoints: 1100 compact desktop | 1024 small laptop / tablet landscape
                960 hamburger nav | 860 tablet portrait (stacked) | 560 phone | 380 small phone
   Desktop layouts scale with --u (1 Figma px) between 861px and 1440px; above 1440px the design stays at 1440.
   ============================================================ */
@media (max-width: 1100px) {
  .nav-list { gap: 18px; }
  .nav-link { font-size: 16px; }
  .main-nav { margin-left: 32px; }
  .btn.btn-contact-now { font-size: 17px; }
  .team-grid { gap: 24px; }
  .courses-grid, .blog-grid { gap: 20px; }
  .research-grid { gap: 20px; }
  .footer-top { flex-wrap: wrap; row-gap: 48px; }
  .footer-brand { flex: 1 1 100%; }
  .footer-links { flex: 1 1 60%; }
  .footer-news { flex: 1 1 260px; }
}

@media (max-width: 1024px) {
  .head-row { flex-direction: column; gap: 16px; }
  .team .head-row { align-items: flex-start; }
  .split .section-sub { flex: none; max-width: 640px; }
}

/* ---------- Hamburger navigation: slide-in drawer from the right ---------- */
.nav-backdrop, .drawer-cta { display: none; }
@media (max-width: 960px) {
  :root { --header-h: 72px; --drawer-w: min(86vw, 360px); }
  .header-inner { height: var(--header-h); justify-content: space-between; }
  /* no backdrop-filter here: it would make the fixed drawer size itself to the header instead of the screen */
  .site-header, .site-header.scrolled, .inner-page .site-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .brand { font-size: 26px; }
  .btn.btn-contact-now { display: none; }
  .nav-toggle {
    position: relative; z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    margin-right: -8px;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }
  html.nav-open, html.nav-open body { overflow: hidden; }

  .nav-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 1;
    background: rgba(18, 18, 18, 0.5);
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease, visibility 0s linear .3s;
  }
  .nav-backdrop.show { opacity: 1; visibility: visible; transition-delay: 0s; }

  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto; z-index: 2;
    width: var(--drawer-w);
    margin: 0;
    display: flex; flex-direction: column;
    padding: calc(var(--header-h) + 8px) max(24px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) 24px;
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--white);
    box-shadow: -18px 0 45px rgba(18, 18, 18, 0.18);
    visibility: hidden;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.22, .8, .3, 1), visibility 0s linear .32s;
  }
  .main-nav.open { visibility: visible; transform: none; transition-delay: 0s; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
  .nav-list li + li { border-top: 1px solid var(--line); }
  .nav-link { display: block; padding: 16px 0; font-size: 19px; }
  .nav-link::after { display: none; }
  .nav-link.active { color: var(--teal); }
  .main-nav .drawer-cta {
    display: inline-flex;
    margin-top: 28px; height: 52px;
    border-radius: 4px;
    background: var(--gray-900); color: var(--white);
    font-size: 18px; font-weight: 700;
  }
  .main-nav .drawer-cta:hover { background: var(--teal); }
}

/* ---------- Tablet portrait and below: single-column flows ---------- */
@media (max-width: 860px) {
  .section-head.split, .section-head.centered { margin-bottom: 40px; }
  .about.section, .research.section, .projects.section, .snapshots.section, .publications.section,
  .team.section, .courses.section, .contact.section, .blog.section { padding-block: 64px; }

  /* Stacked hero: portrait on its circle first, copy below */
  .hero-inner { display: flex; flex-direction: column; min-height: 0; padding-top: calc(var(--header-h) + 8px); }
  .hero-visual { order: -1; position: relative; right: auto; width: 100%; height: min(92vw, 460px); }
  .hero-circle { left: 50%; top: 50%; width: min(88vw, 440px); height: min(88vw, 440px); transform: translate(-50%, -50%); box-shadow: none; }
  .hero-portrait { left: 50%; top: auto; bottom: 0; width: auto; height: 100%; transform: translateX(-50%); }
  .hero-social { left: auto; right: 0; top: 50%; transform: translateY(-50%); }
  .hero-copy { max-width: none; padding: 28px 0 56px; }
  .hero-title { font-size: clamp(40px, 11vw, 60px); }
  .hero-subtitle { font-size: clamp(19px, 4.6vw, 24px); }

  .stats-band .container { padding-inline: 24px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 24px 16px; border-radius: 0; }
  .stat-card + .stat-card::before { display: none; }
  .stat-card:nth-child(odd) { border-right: 1px solid rgba(255, 255, 255, 0.25); }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }

  .tabs { margin-bottom: 40px; }
  .tab-panel > .section-title { margin-bottom: 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-media { max-width: 560px; }
  .about-text p { font-size: 17px; }
  .profile-links { gap: 28px 40px; margin-top: 48px; }

  .research-grid, .courses-grid, .blog-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  /* keep a lone last card centred instead of left-hanging */
  .courses-grid > :last-child:nth-child(odd),
  .blog-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 10px); }
  .research-card { gap: 24px; }

  .projects-grid { gap: 24px; }
  .project-card,
  .project-card:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .project-card:nth-child(even) .project-img,
  .project-card:nth-child(even) .project-body { order: 0; }
  .project-img { max-height: 420px; }
  .project-body { max-width: none; }
  .project-body h3 { font-size: 26px; }
  .project-meta { font-size: 17px; }

  .pub-item { grid-template-columns: auto minmax(0, 1fr); }
  .pub-body h3 { font-size: 19px; line-height: 1.4; }
  .pub-actions { grid-column: 2; margin-top: 6px; }

  .contact-inner { grid-template-columns: 1fr; gap: 24px; }
  .contact-info, .contact-form { padding: 32px 24px; }
  .contact-list li { flex-direction: column; gap: 4px; }
  .ci-label { flex: none; }

  /* comfortable touch targets */
  a.ci-value { display: inline-block; padding-block: 6px; }
  .contact-form input[type="text"],
  .contact-form input[type="email"],
  .contact-form textarea { padding-top: 12px; }
  .contact-form textarea { height: 47px; }
  .attach { top: 9px; }
  .form-fields { gap: 12px; }
  .contact-form .checkbox { padding-block: 10px; }
  .contact-form .checkbox input { width: 20px; height: 20px; }
  .footer-col li a { display: inline-block; padding-block: 11px; }
  .footer-newsletter input { align-self: stretch; }
  .ci-label { font-size: 11px; }
  .footer-col ul { gap: 0; }
  .footer-contact { gap: 6px; }
  .footer-contact li { min-height: 44px; }
  .footer-social { gap: 4px; }
  .footer-col .footer-social { gap: 4px; }
  .footer-social a { width: 44px; height: 44px; }
  .footer-newsletter { margin-bottom: 20px; }
  .footer-newsletter button { min-width: 44px; min-height: 44px; }
}

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  .container { padding-inline: max(18px, env(safe-area-inset-left, 0px)) max(18px, env(safe-area-inset-right, 0px)); }
  .stats-band .container { padding-inline: 18px; }
  .about.section, .research.section, .projects.section, .snapshots.section, .publications.section,
  .team.section, .courses.section, .contact.section, .blog.section { padding-block: 52px; }
  .section-head.split, .section-head.centered { margin-bottom: 32px; }
  .head-rule { margin: 14px 0 12px; }

  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; }
  .hero-actions .btn { width: 100%; }
  .hero-copy { padding-bottom: 44px; }

  /* tabs become a 2x2 grid instead of a horizontal scroller */
  .about .tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 6px; border-radius: 30px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08); }
  .tab { height: 48px; padding: 8px 12px; font-size: 16px; }
  .pl-label { font-size: 18px; }
  .profile-links { gap: 24px 28px; }

  .research-grid, .blog-grid, .courses-grid { grid-template-columns: 1fr; }
  .courses-grid > :last-child:nth-child(odd),
  .blog-grid > :last-child:nth-child(odd) { grid-column: auto; justify-self: stretch; width: auto; }
  .research-card { gap: 20px; }
  .research-card h3 { font-size: 24px; }
  .research-card p { font-size: 17px; }
  .course-body h3, .blog-body h3 { font-size: 24px; }

  /* team stays two-up on phones with tighter type */
  .team-grid { gap: 20px 14px; }
  .team-card { gap: 12px; }
  .team-card h3 { font-size: 19px; margin-bottom: -8px; }
  .team-card p { font-size: 14px; }

  .gallery-track { --gutter: 18px; --edge: 18px; }
  /* At the desktop height a 3:2 tile is ~93vw wide on a phone, which leaves no
     peek; scale the height down so the next slide stays partly visible. */
  .gallery-row { --gh: min(290px, 48vw); gap: 14px; }

  .project-img { max-height: none; }
  .pub-item { grid-template-columns: 1fr; gap: 12px; }
  .pub-actions { grid-column: auto; margin-top: 4px; }
  .pub-num { font-size: 28px; line-height: 1; }

  .contact-info, .contact-form { padding: 26px 20px; border-radius: 12px; }
  .contact-form h3 { font-size: 22px; }

  .footer-main { padding-bottom: 32px; }
  .footer-connect h2 { font-size: 34px; }
  .footer-connect { padding-block: 24px; }
  .footer-connect-actions { width: 100%; gap: 12px; }
  .footer-phone-pill { flex: 1 1 0; width: auto; min-width: 0; padding: 0 12px; font-size: 16px; }
  .footer-chat { padding: 0 20px; }
  .footer-top { margin-top: 28px; }
  .footer-links { flex-direction: column; gap: 32px; }
  .footer-col h4 { font-size: 24px; margin-bottom: 12px; }
}

/* ---------- Small phones (320-380) ---------- */
@media (max-width: 380px) {
  .brand { font-size: 23px; }
  .hero-title { font-size: clamp(34px, 11.5vw, 44px); }
  .stat-num { font-size: 28px; }
  .stat-label { font-size: 13px; }
  .stat-card { padding: 20px 8px; }
  .section-head.split .section-title, .section-head.centered .section-title, .contact-info .section-title { font-size: 30px; }
  .snapshots .section-title, .courses .section-head.centered .section-title { font-size: 34px; }
  .tab { padding: 8px 6px; font-size: 15px; }
  .pl-label { font-size: 16px; }
  .footer-phone-pill { font-size: 14px; gap: 6px; }
  .footer-chat { padding: 0 14px; font-size: 16px; }
  .team-card h3 { font-size: 17px; }
}

/* ---------- Phones and tablets (up to 860px): text first, then the portrait, following the Figma phone frame ---------- */
@media (max-width: 860px) {
  :root {
    /* 1 Figma px on the 375px phone frame. Capped so tablets stay balanced and short landscape screens do not get a huge hero */
    --m: calc(min(100vw, 600px, max(375px, 100vh * 0.9)) / 375);
    --x: max(0px, calc((375px - 100vw) * 0.85)); /* extra room for text that cannot shrink on 320-360px screens */
  }

  .hero-inner {
    display: block;
    min-height: calc(658 * var(--m) + var(--x));
    padding-top: calc(var(--header-h) + 18px);
  }
  .hero-copy { position: relative; z-index: 2; width: calc(280 * var(--m)); max-width: 100%; padding: 0; }
  .hero-title { font-size: max(28px, calc(32 * var(--m))); line-height: 1.1; }
  .hero-subtitle { margin-top: calc(8 * var(--m)); font-size: max(13px, calc(14 * var(--m))); line-height: 1.2; }
  .hero-desc { margin-top: calc(8 * var(--m)); max-width: none; font-size: max(12px, calc(12 * var(--m))); line-height: 1.6; }
  .hero-actions { display: inline-flex; flex-direction: column; align-items: stretch; gap: calc(12 * var(--m)); margin-top: calc(34 * var(--m)); }
  .hero-actions .btn { width: auto; height: max(42px, calc(42 * var(--m))); padding: 0 calc(16 * var(--m)); font-size: max(16px, calc(16 * var(--m))); font-weight: 500; }
  .hero-actions .btn-outline { border-width: 1px; }
  .hero-actions .btn-primary { background: var(--teal); } /* the phone frame in Figma keeps the teal button */

  /* portrait hangs off the right edge; the blue shape behind it is a left semicircle that runs flat to the screen edge */
  .hero-visual { order: 0; position: absolute; inset: 0; width: auto; height: auto; }
  .hero-circle {
    left: calc(100% - 249 * var(--m)); right: auto; top: calc(343 * var(--m) + var(--x));
    width: 100vw; height: calc(408 * var(--m));
    border-radius: calc(204 * var(--m)) 0 0 calc(204 * var(--m));
    transform: none;
  }
  .hero-portrait {
    left: auto; right: calc(-39 * var(--m)); top: calc(269 * var(--m) + var(--x)); bottom: auto;
    width: calc(301 * var(--m)); height: auto;
    transform: none;
  }
  .hero-social { left: calc(17 * var(--m)); right: auto; top: calc(514 * var(--m) + var(--x)); transform: none; gap: calc(8 * var(--m)); }
  .hero-social a { position: relative; width: max(32px, calc(32 * var(--m))); height: max(32px, calc(32 * var(--m))); }
  .hero-social a::after { content: ""; position: absolute; inset: -6px; } /* 44px touch area */
  .hero-social svg { width: max(14px, calc(14 * var(--m))); height: max(14px, calc(14 * var(--m))); }
}

/* ---------- Phones: compact 2x2 stats with thin cross dividers (Figma phone frame) ---------- */
@media (max-width: 600px) {
  .stats-band { padding-block: 20px; }
  .stats-band .container { padding-inline: 20px; }
  .stats { position: relative; grid-template-columns: 1fr 1fr; row-gap: 22px; }
  .stats::before, .stats::after { content: ""; position: absolute; background: rgba(255, 255, 255, 0.3); pointer-events: none; }
  .stats::before { left: 50%; top: -20px; bottom: -20px; width: 1px; }
  .stats::after { left: -20px; right: -20px; top: calc(50% - 0.5px); height: 1px; }
  .stat-card, .stat-card:nth-child(odd), .stat-card:nth-child(-n+2) { padding: 0; border: 0; }
  .stat-num { font-size: max(14px, calc(14 * var(--m))); line-height: 1.2; }
  .stat-label { margin-top: 12px; font-size: max(12px, calc(12 * var(--m))); line-height: 1.4; }
}

/* ============================================================
   LARGE SCREENS (1600px and up): follows the Figma 1920 frame
   Header, hero and stats use the 1920 values exactly. Every section below
   (and the footer) scales by 1320/1240 so the whole page grows together.
   ============================================================ */
@media (min-width: 1600px) {
  .site-header .container, .hero .container { max-width: 1368px; } /* 1320px of content */

  main > section:not(.hero):not(.stats-band), .site-footer { zoom: 1.0625; }

  .hero-inner { min-height: 860px; padding-top: 185px; }
  .hero-copy { max-width: 539px; }
  .hero-title { font-size: 80px; }
  .hero-subtitle { font-size: 30px; white-space: nowrap; }
  .main-nav { margin-left: 279px; }
  .hero-desc { max-width: 530px; font-size: 20px; }

  .hero-visual { left: 24px; right: auto; width: 1320px; }
  .hero-circle { left: 713px; top: -126px; height: 1133px; border-radius: 566.5px 0 0 566.5px; }
  .hero-portrait { left: 706px; top: 64px; width: 583px; }
  .hero-social { left: 1275px; top: 249px; }

  .stats-band .container { max-width: 1920px; padding-inline: 270px; }
  .stat-num { font-size: 50px; }
}

/* ---------- Toasts (created by js/main.js showToast) ---------- */
.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(380px, calc(100vw - 48px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 14px 18px;
  border-radius: 8px;
  background: #121212;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 18px 45px rgba(18, 18, 18, 0.18);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show { opacity: 1; transform: none; }

.toast-ok { background: var(--teal); }
.toast-err { background: #c0392b; }

@media (max-width: 560px) {
  .toast-root { right: 16px; left: 16px; bottom: 16px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; transform: none; }
}
