/* ==========================================================================
   Shoaib Akhtar — Portfolio
   Design tokens → base → layout → components → sections → utilities
   Built on top of Bootstrap 5 (grid, collapse); everything else is custom.
   ========================================================================== */

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --ink: #0b1744;
  /* headings & body emphasis (deep brand navy) */
  --ink-2: #1e293b;
  /* body text                          */
  --muted: #475569;
  /* secondary text  (7.5:1 on white)   */
  --subtle: #566275;
  /* captions        (6:1 on white)     */
  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --brand: #0b2dbe;
  /* primary brand colour                */
  --brand-gradient: linear-gradient(150deg, #0e3fa8 0%, #1436d8 48%, #0b2dbe 100%);
  --accent: #0b2dbe;
  /* primary action  (9.6:1 on white)   */
  --accent-hover: #0e3fa8;
  --accent-soft: #eef1ff;
  --accent-line: #c5cffa;
  --on-dark: #ffffff;
  --on-dark-dim: rgba(255, 255, 255, .86);

  --ff: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, .06);
  --shadow-md: 0 8px 24px -8px rgba(11, 18, 32, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --nav-h: 68px;
}

/* ── Base ───────────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  font-family: var(--ff);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
  margin: 0;
}

strong,
b {
  font-weight: 500;
}

p {
  margin: 0 0 1rem;
}

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

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform .2s var(--ease);
}

.skip-link:focus {
  transform: none;
  color: #fff;
}

.visually-hidden-focusable:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary-x,
.btn-secondary-x,
.btn-ghost-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font: 500 .9375rem/1 var(--ff);
  padding: .85rem 1.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary-x {
  background: var(--brand-gradient);
  color: #fff;
}

.btn-primary-x:hover {
  background: var(--accent-hover);
  filter: brightness(1.08);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary-x {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-secondary-x:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-ghost-x {
  background: transparent;
  color: var(--accent);
  padding-left: 0;
  padding-right: 0;
}

.btn-ghost-x:hover {
  color: var(--accent-hover);
  gap: .75rem;
}

.btn-ghost-x i {
  transition: transform .2s var(--ease);
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  min-height: var(--nav-h);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}

#nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -.01em;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

.brand-text small {
  display: block;
  font-size: .7rem;
  font-weight: 500;
  color: var(--subtle);
  letter-spacing: 0;
  margin-top: -2px;
}

.navbar-toggler {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--brand-gradient);
  color: #fff;
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.navbar-toggler i {
  grid-area: 1 / 1;
  font-size: 1.4rem;
  color: #fff;
  transition: opacity .2s, transform .25s var(--ease);
}

.navbar-toggler .icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(.7);
}

.navbar-toggler[aria-expanded="true"] .icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(.7);
}

.navbar-toggler[aria-expanded="true"] .icon-close {
  opacity: 1;
  transform: none;
}

.nav-link {
  position: relative;
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted) !important;
  padding: .5rem .8rem !important;
  transition: color .2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: .15rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink) !important;
}

.nav-link.active::after,
.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-linkedin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  width: auto;
  height: 38px;
  padding: 0 .75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: .85rem;
  font-weight: 500;
  transition: border-color .2s, color .2s, background-color .2s;
}

.nav-linkedin:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .brand-text small {
    display: none;
  }

  .nav-link {
    padding: .5rem .55rem !important;
    font-size: .875rem;
  }

  .nav-link::after {
    left: .55rem;
    right: .55rem;
  }
}

@media (max-width: 991.98px) {
  #nav .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--brand-gradient);
    color: #fff;
    padding: .75rem 1rem 1.25rem;
    box-shadow: 0 18px 30px -12px rgba(11, 23, 68, .45);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }

  #nav .navbar-nav {
    max-width: 1140px;
    margin: 0 auto;
  }

  #nav .nav-link {
    color: #fff !important;
    font-size: 1rem;
    padding: .85rem .25rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
  }

  #nav .nav-item:last-child .nav-link {
    border-bottom: 0;
  }

  #nav .nav-link::after {
    display: none;
  }

  #nav .nav-link:hover,
  #nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, .14);
    border-radius: var(--radius-sm);
    padding-left: .75rem !important;
  }

  #nav .nav-linkedin {
    margin-top: .75rem;
    width: 100%;
    justify-content: center;
    height: 44px;
    color: var(--brand);
    background: #fff;
    border-color: #fff;
  }

  #nav .nav-linkedin:hover {
    background: var(--accent-soft);
    color: var(--brand);
  }
}

/* ── Section scaffolding ────────────────────────────────────────────────── */
section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .85rem;
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin-bottom: .75rem;
}

.section-lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 62ch;
}

.section-head {
  margin-bottom: 3rem;
}

@media (max-width: 767.98px) {
  section {
    padding: 4.25rem 0;
  }

  .section-head {
    margin-bottom: 2rem;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
#home {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 4.5rem) 0 4.5rem;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(11, 45, 190, .09), transparent 60%),
    var(--bg);
}

#home::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000, transparent 75%);
  opacity: .55;
}

#home .container {
  position: relative;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .35rem .9rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .18);
}

.hero-title {
  font-size: clamp(2rem, 4.4vw, 2.875rem);
  font-weight: 500;
  letter-spacing: -.02em;
  line-height: 1.12;
  margin-bottom: .75rem;
}

.hero-role {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.25rem;
  letter-spacing: -.01em;
}

.hero-lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 1.5rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  border: 1px solid var(--accent-line);
}

.chip-neutral {
  background: var(--bg);
  color: var(--ink-2);
  border-color: var(--line-strong);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 2rem 0 1.5rem;
}

@media (max-width: 575.98px) {
  .hero-ctas>a {
    flex: 1 1 100%;
  }
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: .9rem;
  font-weight: 500;
}

.hero-links a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.hero-links a:hover {
  color: var(--accent);
}

.profile-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.25rem;
}

.profile-head img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

.profile-head strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
}

.profile-head span {
  color: var(--subtle);
  font-size: .875rem;
}

.facts {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.facts>div {
  display: grid;
  grid-template-columns: 7.25rem 1fr;
  gap: .75rem;
  align-items: baseline;
}

.facts dt {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--subtle);
}

.facts dd {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-2);
  font-weight: 500;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 4rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.metric {
  padding: 1.35rem 1.5rem;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1.1;
}

.metric-label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-top: .35rem;
  line-height: 1.4;
}

@media (max-width: 991.98px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .metric:nth-child(2) {
    border-right: 0;
  }

  .metric:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 479.98px) {
  .metric {
    padding: 1rem;
  }

  .metric-value {
    font-size: 1.6rem;
  }
}

/* ── About ──────────────────────────────────────────────────────────────── */
.about-lead {
  font-size: 1.125rem;
  color: var(--ink);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.about-text {
  color: var(--muted);
  font-size: .9875rem;
}

.about-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--brand-gradient);
  color: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 20px 40px -20px rgba(11, 45, 190, .55);
}

.about-card-title {
  margin: 0 0 1.25rem;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  margin: 0 0 1.75rem;
}

.about-facts dt {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
  font-weight: 400;
}

.about-facts dd {
  margin: .2rem 0 0;
  font-size: 1.05rem;
  color: #fff;
  font-weight: 500;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .28);
}

.about-tags li {
  font-size: .8125rem;
  padding: .4rem .75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
}

.about-sub {
  font-size: 1.05rem;
  margin: 3rem 0 1.25rem;
}

.pillar {
  height: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.4rem;
  transition: box-shadow .2s, transform .2s var(--ease);
}

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

.pillar-num {
  display: block;
  font-size: .8rem;
  color: var(--accent);
  letter-spacing: .08em;
  margin-bottom: .6rem;
}

.pillar h4 {
  font-size: 1rem;
  margin-bottom: .4rem;
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

@media (max-width: 575.98px) {
  .about-card {
    padding: 1.5rem;
  }

  .about-facts {
    gap: 1rem;
  }

  .about-sub {
    margin-top: 2rem;
  }
}

/* ── Experience (tabbed) ────────────────────────────────────────────────── */
.exp {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.exp-tabs {
  display: grid;
  gap: .5rem;
}

.exp-tab {
  text-align: left;
  display: grid;
  gap: .1rem;
  width: 100%;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  transition: background-color .2s, border-color .2s, color .2s, box-shadow .2s;
}

.exp-tab:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
}

.exp-co {
  font-size: .975rem;
  font-weight: 500;
}

.exp-dt {
  font-size: .8125rem;
  color: var(--subtle);
}

.exp-tab[aria-selected="true"] {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--shadow-md);
}

.exp-tab[aria-selected="true"] .exp-dt {
  color: rgba(255, 255, 255, .88);
}

.exp-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  animation: panelIn .25s var(--ease);
}

.exp-panel[hidden] {
  display: none;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.exp-head {
  margin-bottom: 1rem;
}

.exp-head h3 {
  font-size: 1.2rem;
}

.exp-head p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .95rem;
}

.exp-head p span {
  color: var(--subtle);
}

.impact {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.1rem;
}

.bullets {
  display: grid;
  gap: .55rem;
  margin-bottom: 1.25rem;
}

.bullets li {
  position: relative;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: .9375rem;
}

.bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
}

.stack-label {
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0 0 .5rem;
}

@media (max-width: 991.98px) {
  .exp {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .exp-tabs {
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 1fr);
    overflow-x: auto;
    padding-bottom: .25rem;
    scroll-snap-type: x proximity;
  }

  .exp-tab {
    scroll-snap-align: start;
  }
}

@media (max-width: 575.98px) {
  .exp-panel {
    padding: 1.25rem;
  }

  .exp-tabs {
    grid-auto-columns: 78%;
  }
}


/* ── Skills ─────────────────────────────────────────────────────────────── */
.skill-card {
  height: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .2s, box-shadow .2s;
}

.skill-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.skill-card-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}

.skill-card-head h3 {
  font-size: 1.05rem;
}

.skill-note {
  margin: 1rem 0 0;
  font-size: .85rem;
  color: var(--subtle);
}

/* ── Services ───────────────────────────────────────────────────────────── */
.service-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}

.service-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.service-card .icon-tile {
  margin-bottom: 1.1rem;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: .6rem;
}

.service-card>p {
  color: var(--muted);
  font-size: .95rem;
}

.benefits {
  display: grid;
  gap: .5rem;
  margin: .25rem 0 1.25rem;
}

.benefits li {
  display: flex;
  gap: .6rem;
  font-size: .92rem;
  color: var(--ink-2);
}

.benefits li i {
  color: var(--accent);
  margin-top: .2rem;
  flex: 0 0 auto;
}

.service-card .chip-row {
  margin-bottom: 1.5rem;
}

.service-card .btn-ghost-x {
  margin-top: auto;
  align-self: flex-start;
}

/* ── Projects ───────────────────────────────────────────────────────────── */
.project-group+.project-group {
  margin-top: 3.5rem;
}

.group-title {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.group-title .count {
  font-size: .8rem;
  font-weight: 500;
  color: var(--accent-hover);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: .2rem .55rem;
  border-radius: 999px;
}

.project-card {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem 1.25rem;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}

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

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .9rem;
}

.project-tag {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-hover);
}

.project-domain {
  display: block;
  font-size: .8rem;
  color: var(--subtle);
  word-break: break-all;
}

.project-card h4,
.project-card h3 {
  font-size: 1.1rem;
  margin: 0 0 .1rem;
}

.project-card p {
  color: var(--muted);
  font-size: .92rem;
  margin: .6rem 0 1rem;
}

.project-meta {
  margin: 0 0 1rem;
  display: grid;
  gap: .35rem;
  font-size: .85rem;
}

.project-meta div {
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  gap: .5rem;
}

.project-meta dt {
  color: var(--subtle);
  font-weight: 500;
}

.project-meta dd {
  margin: 0;
  color: var(--ink-2);
  font-weight: 500;
}

.project-foot {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  font-size: .875rem;
}

.project-link {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.project-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

/* whole card is the hit-area */
.project-link i {
  transition: transform .2s var(--ease);
}

.project-card:hover .project-link i {
  transform: translate(2px, -2px);
}

.project-note {
  color: var(--subtle);
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* ── Resume ─────────────────────────────────────────────────────────────── */
.resume-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 2.25rem;
}

.resume-block+.resume-block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.resume-block h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.resume-block h3 i {
  color: var(--accent);
}

.resume-roles li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .15rem 1rem;
  padding: .7rem 0;
  border-bottom: 1px dashed var(--line);
}

.resume-roles li:last-child {
  border-bottom: 0;
}

.resume-roles strong {
  color: var(--ink);
  font-weight: 500;
}

.resume-roles span {
  color: var(--muted);
  font-size: .9rem;
}

.resume-roles time {
  color: var(--accent);
  font-size: .85rem;
  font-weight: 500;
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  white-space: nowrap;
}

.edu-list {
  display: grid;
  gap: 1rem;
}

.edu-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .1rem 1rem;
}

.edu-list strong {
  color: var(--ink);
  font-weight: 500;
}

.edu-list span {
  color: var(--muted);
  font-size: .9rem;
}

.edu-list time {
  color: var(--subtle);
  font-size: .85rem;
  font-weight: 500;
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  white-space: nowrap;
}

.resume-side {
  background: var(--brand-gradient);
  color: var(--on-dark);
  border-radius: 14px;
  padding: 2rem;
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.resume-side h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: .6rem;
}

.resume-side p {
  color: var(--on-dark-dim);
  font-size: .95rem;
}

.resume-side .btn-primary-x {
  width: 100%;
  background: #fff;
  color: var(--brand);
}

.resume-side .btn-primary-x:hover {
  background: var(--accent-soft);
  color: var(--brand);
  filter: none;
}

.resume-side .btn-view {
  display: block;
  text-align: center;
  margin-top: .85rem;
  color: var(--on-dark);
  font-size: .9rem;
  font-weight: 500;
}

.resume-side .btn-view:hover {
  color: #fff;
  text-decoration: underline;
}

.resume-meta {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .22);
  font-size: .8rem;
  color: var(--on-dark-dim);
  display: flex;
  align-items: center;
  gap: .5rem;
}

@media (max-width: 575.98px) {
  .resume-panel {
    padding: 1.35rem;
  }

  .resume-roles li,
  .edu-list li {
    grid-template-columns: 1fr;
  }

  .resume-roles time,
  .edu-list time {
    grid-row: auto;
    grid-column: auto;
  }
}

@media (max-width: 991.98px) {
  .resume-side {
    position: static;
  }
}

/* ── Contact ────────────────────────────────────────────────────────────── */
#contact {
  background: var(--brand-gradient);
  color: var(--on-dark);
}

#contact .eyebrow {
  color: #fff;
}

#contact .eyebrow::before {
  background: #fff;
}

#contact .section-title {
  color: #fff;
}

#contact .section-lead {
  color: var(--on-dark-dim);
}

.contact-list {
  display: grid;
  gap: .75rem;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: var(--radius);
  color: var(--on-dark);
  background: rgba(255, 255, 255, .08);
  transition: border-color .2s, background-color .2s;
}

a.contact-link:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.contact-link .icon-tile {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  width: 40px;
  height: 40px;
}

.contact-link .icon-tile i{
      position: relative;
    left: 12px;
    top: 7px;
}

.contact-link small {
  display: block;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
}

.contact-link span {
  font-weight: 500;
  word-break: break-word;
}

.form-card {
  background: var(--bg);
  border-radius: 14px;
  padding: 2rem;
  color: var(--ink-2);
}

.form-card h3 {
  font-size: 1.1rem;
  margin-bottom: .35rem;
}

.form-card>p {
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 1.5rem;
}

.field label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: .4rem;
}

.field label .req {
  color: #b91c1c;
}

.field input,
.field textarea {
  width: 100%;
  font: 400 .975rem var(--ff);
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: .75rem .9rem;
  transition: border-color .2s, box-shadow .2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #6b7788;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 45, 190, .2);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}



.form-note {
  font-size: .8rem;
  color: var(--subtle);
  margin: .5rem 0 0;
}

@media (max-width: 575.98px) {
  .form-card {
    padding: 1.35rem;
  }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--brand-gradient);
  color: var(--on-dark-dim);
  padding: 2.5rem 0;
  font-size: .9rem;
}

footer a {
  color: var(--on-dark);
}

footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
  font-weight: 500;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .45);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .22);
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1rem;
}

/* ── Back to top ────────────────────────────────────────────────────────── */
#btt {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 900;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  border: 0;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s, background-color .2s;
}

#btt.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

#btt:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ── Scroll reveal (progressive enhancement: only hidden when JS is active) ─ */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {

  #nav,
  #btt,
  .skip-link {
    display: none !important;
  }

  section {
    padding: 1.5rem 0;
  }
}

/* ── Form validation, loading state & result dialog ─────────────────────── */
.field-error {
  min-height: 1.25rem;
  margin: .3rem 0 0;
  font-size: .8125rem;
  font-weight: 500;
  color: #b42318;
}

.field-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.field-count {
  margin-top: .3rem;
  font-size: .75rem;
  color: var(--subtle);
  white-space: nowrap;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

.field input.is-valid,
.field textarea.is-valid {
  border-color: #1a7f4b;
}

.field-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.is-loading .btn-spinner {
  display: inline-block;
}

.is-loading .bi-send {
  display: none;
}

.is-loading {
  pointer-events: none;
  opacity: .9;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 20, 90, .55);
  backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}

.dialog-backdrop[hidden] {
  display: none;
}

.dialog {
  width: min(100%, 440px);
  background: var(--bg);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 24px 60px -12px rgba(11, 23, 68, .45);
  animation: pop .25s var(--ease);
  outline: none;
}

.dialog-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  color: #fff;
  background: var(--brand-gradient);
}

.dialog.is-error .dialog-icon {
  background: #b42318;
}

.dialog-title {
  font-size: 1.2rem;
  margin-bottom: .6rem;
}

.dialog-text {
  color: var(--muted);
  margin-bottom: 1.5rem;
  font-size: .975rem;
}

.dialog .btn-primary-x {
  min-width: 140px;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.97);
  }
}