/* =============================================================
   Anisha Karki NP E-Portfolio — Global Stylesheet
   styles.css
   ============================================================= */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Lato:wght@400;700&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --navy:        #1B2A4A;
  --teal:        #3B9E96;
  --teal-light:  #EAF6F5;
  --teal-mid:    #C2E8E5;
  --slate:       #5A6478;
  --slate-light: #767E93;
  --white:       #FFFFFF;
  --off-white:   #F7F9FC;
  --border:      #DEE4ED;
  --shadow-sm:   0 2px 8px rgba(27,42,74,0.07);
  --shadow-md:   0 4px 18px rgba(27,42,74,0.11);
  --shadow-lg:   0 8px 32px rgba(27,42,74,0.14);
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --max-width:   1120px;
  --nav-height:  68px;
  --transition:  all 0.22s ease;
  --font-head:   'Poppins', system-ui, sans-serif;
  --font-body:   'Lato', system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--slate);
  background-color: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--teal);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--navy);
}

ul {
  list-style: none;
}

/* ── Skip to content ───────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ── Focus Visible ─────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 3px;
}
.btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
  max-width: 72ch;
}

p:last-child { margin-bottom: 0; }

strong { color: var(--navy); font-weight: 700; }

/* ── Layout Utilities ──────────────────────────────────────── */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin-inline: auto;
}

.section {
  padding: 88px 0;
}

.section--alt {
  background-color: var(--off-white);
}

.section--teal {
  background-color: var(--teal-light);
}

.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.6rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-intro {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 60ch;
  margin-bottom: 2.8rem;
}

/* ── Grid Systems ──────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background-color: var(--teal-light);
  border-radius: var(--radius-sm);
  margin-bottom: 1.2rem;
  font-size: 1.5rem;
}

.card__title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.card__body {
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.65;
}

.card--accent {
  border-left: 4px solid var(--teal);
}

.card--navy {
  background: var(--navy);
  border: none;
  color: var(--white);
}

.card--navy .card__title,
.card--navy h3,
.card--navy h4 {
  color: var(--white);
}

.card--navy .card__body,
.card--navy p {
  color: rgba(255,255,255,0.8);
}

.card--navy .card__icon {
  background-color: rgba(255,255,255,0.12);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.8rem;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background-color: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.btn--primary:hover {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.btn--outline {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--outline:hover {
  background-color: var(--navy);
  color: var(--white);
}

.btn--outline-white {
  background-color: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn--outline-white:hover {
  background-color: var(--white);
  color: var(--navy);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* ── Animated Link Underline ─────────────────────────────────── */
a:not(.btn):not(.tag) {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left 100%;
  background-size: 0% 1.5px;
  transition: color 0.22s ease, background-size 0.28s ease;
}

a:not(.btn):not(.tag):hover {
  background-size: 100% 1.5px;
}

/* Nav and logo use pill/bg-color hover — suppress underline */
.nav__links a,
.nav__logo {
  background-image: none;
  transition: color 0.22s ease, background-color 0.22s ease;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  box-shadow: none;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav.is-scrolled {
  box-shadow: 0 4px 24px rgba(27,42,74,0.12);
  border-bottom-color: transparent;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  max-width: var(--max-width);
  margin-inline: auto;
}

.nav__logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.nav__logo span {
  color: var(--teal);
}

.nav__logo-sub {
  display: block;
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--slate-light);
  letter-spacing: 0.04em;
  line-height: 1;
  margin-top: 0.15rem;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav__links a {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--slate);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--teal);
  background-color: var(--teal-light);
}

/* Mobile nav toggle (CSS-only) */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Page Hero ──────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #2A4070 100%);
  padding: 72px 0;
  text-align: center;
}

.page-hero__label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-bottom: 0.8rem;
}

.page-hero__title {
  color: var(--white);
  margin-bottom: 0.8rem;
}

.page-hero__sub {
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
  max-width: 52ch;
  margin-inline: auto;
}

/* ── Homepage Hero ──────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #243660 60%, #2E4A78 100%);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(59,158,150,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(59,158,150,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(59,158,150,0.18);
  border: 1px solid rgba(59,158,150,0.4);
  color: var(--teal-mid);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1.4rem;
}

.hero__headline {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero__headline em {
  font-style: normal;
  color: var(--teal-mid);
}

.hero__sub {
  color: rgba(255,255,255,0.78);
  font-size: 1.1rem;
  max-width: 52ch;
  margin-bottom: 0;
}

.hero__photo-wrap {
  display: flex;
  justify-content: center;
}

.hero__photo {
  width: 360px;
  height: 420px;
  background: rgba(59,158,150,0.12);
  border: 2px dashed rgba(59,158,150,0.4);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-head);
  font-size: 0.9rem;
  text-align: center;
}

.hero__photo-icon {
  font-size: 3rem;
  opacity: 0.5;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  width: 48px;
  height: 4px;
  background: var(--teal);
  border-radius: 4px;
  margin: 1rem 0 1.8rem;
}

/* ── Timeline / Resume ──────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--teal-mid);
  border-radius: 2px;
}

.timeline__item {
  position: relative;
  padding: 0 0 2.4rem 2rem;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--teal);
  border: 2px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--teal-mid);
}

.timeline__date {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.timeline__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.timeline__org {
  font-size: 0.9rem;
  color: var(--slate-light);
  margin-bottom: 0.6rem;
}

.timeline__body {
  font-size: 0.95rem;
  color: var(--slate);
}

/* ── Skill Bars ─────────────────────────────────────────────── */
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.skill-item__label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.skill-item__bar {
  height: 8px;
  background: var(--teal-mid);
  border-radius: 4px;
  overflow: hidden;
}

.skill-item__fill {
  height: 100%;
  background: var(--teal);
  border-radius: 4px;
}

/* ── Tag Chips ──────────────────────────────────────────────── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.tag {
  background: var(--teal-light);
  color: var(--teal);
  border: 1px solid var(--teal-mid);
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

/* ── Cert Table ─────────────────────────────────────────────── */
.cert-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.cert-table th {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border);
}

.cert-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--slate);
  vertical-align: middle;
}

.cert-table tr:last-child td {
  border-bottom: none;
}

.cert-table tr:hover td {
  background-color: var(--off-white);
}

.cert-table .cert-name {
  font-weight: 700;
  color: var(--navy);
}

.badge {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
}

.badge--green {
  background: #E6F4EC;
  color: #1F7A42;
}

.badge--blue {
  background: var(--teal-light);
  color: var(--teal);
}

.badge--pending {
  background: #FEF3E2;
  color: #B45309;
}

/* ── Project Cards ──────────────────────────────────────────── */
.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.project-card__header {
  background: linear-gradient(135deg, var(--navy), #2E4A78);
  padding: 1.8rem 2rem;
}

.project-card__type {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-bottom: 0.4rem;
}

.project-card__title {
  color: var(--white);
  font-size: 1.15rem;
  line-height: 1.3;
}

.project-card__body {
  padding: 1.8rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card__section-label {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.3rem;
}

.project-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ── Reflection Entries ─────────────────────────────────────── */
.reflection {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2.4rem 2.8rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.reflection::before {
  content: '\201C';
  position: absolute;
  top: 1.2rem;
  left: 1.6rem;
  font-family: Georgia, serif;
  font-size: 5rem;
  color: var(--teal-mid);
  line-height: 1;
  pointer-events: none;
}

.reflection__meta {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.reflection__date,
.reflection__context {
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reflection__context {
  color: var(--slate-light);
}

.reflection__title {
  margin-bottom: 1rem;
}

.reflection__body {
  font-size: 1rem;
  line-height: 1.85;
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 2.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
  transition: var(--transition);
}

.contact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.contact-card__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--teal-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.contact-card__label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 0.2rem;
}

.contact-card__value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0;
}

/* ── Values / Philosophy ────────────────────────────────────── */
.value-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.4rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.value-item:hover {
  background: var(--teal-light);
}

.value-item__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.value-item__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.value-item__body {
  font-size: 0.93rem;
  color: var(--slate);
  max-width: none;
  margin-bottom: 0;
}

/* ── Quote Block ────────────────────────────────────────────── */
.blockquote {
  background: var(--teal-light);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1.6rem 2rem;
  margin: 2rem 0;
}

.blockquote p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--navy);
  max-width: none;
}

.blockquote cite {
  display: block;
  font-size: 0.88rem;
  color: var(--teal);
  font-weight: 700;
  font-style: normal;
  margin-top: 0.5rem;
}

/* ── Stat / Glance Card ─────────────────────────────────────── */
.glance-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.glance-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.glance-card__num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.glance-card__label {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.glance-card__sub {
  font-size: 0.83rem;
  color: var(--slate-light);
  margin-bottom: 0;
}

/* ── Button size modifier ───────────────────────────────────── */
.btn--sm {
  font-size: 0.84rem;
  padding: 0.45rem 1rem;
}

/* ── Button group alignment modifier ────────────────────────── */
.btn-group--center {
  justify-content: center;
}

/* ── Paper viewer shared components ─────────────────────────── */
.paper-nav {
  margin-top: 3rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.paper-references {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 56px 0 32px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer__brand {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer__brand span { color: var(--teal-mid); }

.footer__tagline {
  font-size: 0.92rem;
  line-height: 1.6;
  max-width: none;
  margin-bottom: 0;
}

.footer__heading {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}

.footer__links a:hover {
  color: var(--teal-mid);
}

.footer__bottom {
  text-align: center;
  font-size: 0.85rem;
}

/* ── Two-column layout ──────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.two-col--wide {
  grid-template-columns: 1.4fr 1fr;
}

/* ── Responsive Breakpoints ─────────────────────────────────── */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__sub {
    margin-inline: auto;
  }

  .hero__photo-wrap {
    order: -1;
  }

  .hero__photo {
    width: 280px;
    height: 320px;
  }

  .btn-group {
    justify-content: center;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__inner > :first-child {
    grid-column: 1 / -1;
  }

  .two-col,
  .two-col--wide {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer__inner > :first-child {
    grid-column: 1;
  }

  .reflection {
    padding: 2rem 1.6rem;
  }

  .reflection::before {
    font-size: 3rem;
    top: 0.8rem;
    left: 1rem;
  }

  .cert-table th:nth-child(3),
  .cert-table td:nth-child(3) {
    display: none;
  }
}

/* ── 900px: sidebar cramping fix ────────────────────────────── */
@media (max-width: 900px) {
  .two-col,
  .two-col--wide {
    grid-template-columns: 1fr;
    gap: 2.4rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .hero {
    min-height: auto;
    padding: 56px 0;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-group {
    flex-direction: column;
  }

  .page-hero {
    padding: 48px 0;
  }
}

/* ── Tap target minimums ────────────────────────────────────── */
.btn {
  min-height: 44px;
}
.btn--sm {
  min-height: 38px;
}
