:root {
  color-scheme: dark;
  /* ── Terminal Ops — DevOps dark theme ── */
  --bg: #06090f;
  --bg-soft: #0b1221;
  --surface: rgba(11, 22, 40, 0.88);
  --surface-strong: rgba(11, 22, 40, 0.97);
  --text: #dff0ff;
  --muted: #6b90b0;
  --soft: #a8c8e0;
  /* Cyan = primary infra accent */
  --accent: #06b6d4;
  /* Green = pipeline / success */
  --accent-2: #10b981;
  /* Sky-blue = links / highlights */
  --accent-3: #38bdf8;
  --accent-4: #06b6d4;
  --border: rgba(6, 182, 212, 0.13);
  --line: rgba(6, 182, 212, 0.18);
  --header-bg: rgba(6, 9, 15, 0.86);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  --btn-primary-bg: linear-gradient(135deg, #06b6d4, #0ea5e9);
  --btn-primary-fg: #020a10;
  --btn-primary-hover-bg: linear-gradient(135deg, #22d3ee, #38bdf8);
  --btn-primary-shadow: 0 0 20px rgba(6, 182, 212, 0.28);
  --font-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f0f6ff;
  --bg-soft: #ffffff;
  --surface: rgba(6, 18, 42, 0.045);
  --surface-strong: rgba(6, 18, 42, 0.075);
  --text: #0a1628;
  --muted: #3d607a;
  --soft: #1e3a52;
  --accent: #0284c7;
  --accent-2: #059669;
  --accent-3: #0369a1;
  --accent-4: #0284c7;
  --border: rgba(2, 132, 199, 0.14);
  --line: rgba(2, 132, 199, 0.1);
  --header-bg: rgba(240, 246, 255, 0.9);
  --shadow: 0 22px 60px rgba(6, 18, 42, 0.1);
  --btn-primary-bg: linear-gradient(135deg, #0284c7, #0369a1);
  --btn-primary-fg: #f8fafc;
  --btn-primary-hover-bg: linear-gradient(135deg, #0ea5e9, #0284c7);
  --btn-primary-shadow: 0 4px 16px rgba(2, 132, 199, 0.28);
}

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

html {
  scroll-behavior: smooth;
  /* Snug scroll offset to keep scrolled headers very close (12px offset) to the bottom of the sticky header on all desktop and mobile viewports */
  scroll-padding-top: calc(var(--site-header-bottom, 68px) + 0.75rem);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a {
  color: inherit;
}

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

/* Terminal-grid background — cyan scanlines + dual ops-console glows */
.site-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 182, 212, 0.045) 1px, transparent 1px),
    linear-gradient(rgba(6, 182, 212, 0.045) 1px, transparent 1px),
    radial-gradient(ellipse at 0% 0%, rgba(6, 182, 212, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 10%, rgba(14, 165, 233, 0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto, auto;
}

html[data-theme="light"] .site-bg {
  background:
    linear-gradient(90deg, rgba(2, 132, 199, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(2, 132, 199, 0.055) 1px, transparent 1px),
    radial-gradient(ellipse at 0% 0%, rgba(2, 132, 199, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 10%, rgba(3, 105, 161, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(5, 150, 105, 0.06) 0%, transparent 50%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto, auto, auto;
}


.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: var(--accent);
  color: #12151b;
  z-index: 100;
}

.wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-inner {
  position: relative;
  z-index: 2;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.logo-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.35);
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.12);
}

html[data-theme="light"] .logo-mark {
  border-color: rgba(2, 132, 199, 0.28);
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.1);
}

.logo-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.nav a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--text);
}

.nav-mobile-footer {
  display: none;
}

.header-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.theme-toggle,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.theme-toggle {
  position: relative;
  width: 52px;
  height: 34px;
}

.theme-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

html[data-theme="dark"] .theme-icon--sun,
html[data-theme="light"] .theme-icon--moon {
  opacity: 0.18;
  transform: scale(0.84);
}

html[data-theme="dark"] .theme-icon--moon,
html[data-theme="light"] .theme-icon--sun {
  opacity: 1;
  transform: scale(1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-toggle:active {
  transform: scale(0.92);
}

.nav-toggle__bars {
  display: flex;
  width: 18px;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scale(0.5);
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  /* z-index 49: above page content, below site-header (z-index 50) */
  z-index: 49;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s linear;
}

.nav-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html[data-theme="light"] .nav-backdrop.is-active {
  background: rgba(0, 0, 0, 0.4);
}

/*
  Modern, side-effect free scroll lock:
  Toggled via the 'nav-open' class on the HTML tag, preventing page scroll
  while the mobile menu is active, without overriding standard scroll APIs.
*/

.hero {
  min-height: auto;
  display: grid;
  align-items: center;
  padding: clamp(2.25rem, 5vw, 4.25rem) 0 clamp(2rem, 4vw, 3.2rem);
}

.hero-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
}

@media (min-width: 920px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  }
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-title {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.9rem, 7.5vw, 5.45rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-statement {
  max-width: 30ch;
  margin: 1rem 0 0;
  color: var(--soft);
  font-size: clamp(1.22rem, 2.2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: 0;
}

.lede {
  max-width: 58ch;
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
  margin-top: 1.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  box-shadow: var(--btn-primary-shadow);
}

.btn-primary:hover {
  background: var(--btn-primary-hover-bg);
}

html[data-theme="light"] .btn-secondary {
  border-color: rgba(15, 23, 42, 0.14);
  background: #fff;
  color: var(--text);
}

html[data-theme="light"] .btn-secondary:hover {
  border-color: rgba(3, 105, 161, 0.35);
  background: #f0f7fc;
}

.btn-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.contact-strip a {
  text-decoration: none;
}

.contact-strip a:hover {
  color: var(--text);
}

.resume-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(155deg, var(--surface-strong), var(--bg-soft));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.resume-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
}

.resume-panel__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}

.panel-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.resume-panel__top strong {
  display: block;
  max-width: 34ch;
  font-size: 1.2rem;
  line-height: 1.35;
}

.cert-badge {
  display: block;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  line-height: 0;
}

html[data-theme="light"] .cert-badge {
  background: #fff;
}

.cert-badge img {
  display: block;
  width: clamp(70px, 14vw, 94px);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0;
}

.metric-grid div {
  padding: 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.metric-grid dt {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-grid dd {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1;
}

.profile-note {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.08);
}

.profile-note span {
  display: block;
  color: var(--accent-3);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-note p {
  margin: 0.45rem 0 0;
  color: var(--soft);
  font-size: 0.95rem;
}

.section {
  padding: clamp(3rem, 6vw, 4.65rem) 0;
}

.section-compact {
  padding-top: clamp(2.25rem, 4vw, 3.25rem);
}

.section-alt {
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

html[data-theme="light"] .section-alt {
  background: rgba(15, 23, 42, 0.025);
}

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

.section-head h2,
.credential-copy h3,
.contact-panel h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(1.45rem, 3.6vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-head p:not(.eyebrow),
.credential-note,
.contact-lead {
  max-width: 62ch;
  margin: 0.85rem 0 0;
  color: var(--muted);
}

.impact-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.impact-card,
.skill-block,
.timeline-item,
.credential-card,
.contact-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

html[data-theme="light"] .impact-card,
html[data-theme="light"] .skill-block,
html[data-theme="light"] .timeline-item,
html[data-theme="light"] .credential-card,
html[data-theme="light"] .contact-panel {
  background: rgba(255, 255, 255, 0.76);
}

.impact-card {
  min-height: 220px;
  padding: clamp(1.1rem, 3vw, 1.45rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.impact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.36);
}

.impact-card span {
  width: fit-content;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.impact-card h3,
.skill-block h3,
.timeline-body h3 {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.impact-card p {
  margin: 1.25rem 0 0;
  color: var(--muted);
}

.two-col {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 920px) {
  .two-col {
    grid-template-columns: 0.75fr 1.25fr;
    align-items: start;
  }

  .sticky-head {
    position: sticky;
    top: 96px;
  }
}

.skill-grid {
  display: grid;
  gap: 1rem;
}

.skill-block {
  padding: 1.15rem;
}

.skill-block h3 {
  margin-bottom: 0.85rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  padding: 0.36rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

html[data-theme="light"] .chips li {
  background: rgba(15, 23, 42, 0.035);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 0.95rem;
  padding: clamp(1rem, 3vw, 1.35rem);
}

@media (min-width: 780px) {
  .timeline-item {
    grid-template-columns: 210px 1fr;
  }
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.timeline-date {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
}

.timeline-loc {
  color: var(--muted);
}

.timeline-client,
.timeline-role {
  margin: 0 0 0.25rem;
  color: var(--accent-3);
  font-size: 0.92rem;
  font-weight: 800;
}

.timeline-client {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: fit-content;
  max-width: 100%;
  line-height: 1.35;
}

.timeline-client a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.22em;
}

.timeline-client a:hover {
  text-decoration: underline;
}

.timeline-client a::after {
  content: "";
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-left: 0.22em;
  background: currentColor;
  clip-path: polygon(36% 0, 100% 0, 100% 64%, 82% 64%, 82% 31%, 29% 84%, 16% 71%, 69% 18%, 36% 18%);
  opacity: 0.72;
}

.timeline-separator {
  color: var(--muted);
  font-weight: 600;
}

.company-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0.14rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  object-fit: contain;
}

.company-logo img,
.company-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.timeline-role {
  color: var(--muted);
}

.bullet-list {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.bullet-list li {
  margin-bottom: 0.5rem;
}

.bullet-list li:last-child {
  margin-bottom: 0;
}

.credentials-grid {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

@media (min-width: 860px) {
  .credentials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.credential-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.2rem, 3vw, 1.6rem);
  min-height: 100%;
}

.credential-card--cert {
  border-color: rgba(245, 158, 11, 0.22);
  background:
    linear-gradient(145deg, rgba(245, 158, 11, 0.07), transparent 55%),
    var(--surface);
}

html[data-theme="light"] .credential-card--cert {
  background:
    linear-gradient(145deg, rgba(201, 109, 0, 0.06), transparent 55%),
    rgba(255, 255, 255, 0.76);
}

.credential-label {
  margin: 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credential-cert {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}

@media (min-width: 520px) {
  .credential-cert {
    flex-direction: row;
    align-items: flex-start;
  }
}

.credential-badge {
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  line-height: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

html[data-theme="light"] .credential-badge {
  background: #fff;
}

.credential-badge:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

.credential-badge img {
  display: block;
  width: clamp(76px, 18vw, 96px);
}

.credential-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.credential-copy h3 {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.credential-code {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.credential-note {
  margin: 0.15rem 0 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.credential-link {
  display: inline-block;
  width: fit-content;
  margin-top: 0.35rem;
  color: var(--accent-3);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.credential-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.education-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.education-list li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.education-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.education-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.education-degree {
  display: block;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
}

.education-meta {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.education-year {
  flex-shrink: 0;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--accent-3);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

html[data-theme="light"] .education-year {
  background: rgba(15, 23, 42, 0.04);
}

.contact-panel {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  background:
    linear-gradient(135deg, rgba(98, 214, 161, 0.12), transparent 45%),
    var(--surface);
}

@media (min-width: 860px) {
  .contact-panel {
    grid-template-columns: 0.92fr 1.08fr;
    align-items: start;
  }
}

.copy-status {
  min-height: 1.25rem;
  margin: 0.65rem 0 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

.contact-actions {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 560px) {
  .contact-actions {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-link {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  text-decoration: none;
}

html[data-theme="light"] .contact-link {
  background: rgba(15, 23, 42, 0.035);
}

.contact-link span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-link strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-footer {
  padding: 1.6rem 0 2.3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem 1rem;
}

.footer-inner p {
  margin: 0;
}

.hero-in {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-rise 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-in--1 {
  animation-delay: 0.04s;
}

.hero-in--2 {
  animation-delay: 0.12s;
}

.hero-in--3 {
  animation-delay: 0.2s;
}

.hero-in--4 {
  animation-delay: 0.28s;
}

.hero-in--5 {
  animation-delay: 0.36s;
}

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal--pending {
  opacity: 0;
  transform: translateY(22px);
}

.reveal--visible {
  animation: reveal-up 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   RESPONSIVE DESIGN & MOBILE LAYOUT BREAKPOINT (767px and below)
   ============================================================================ */
@media (max-width: 767px) {
  
  /* --- 1. Site Header & Sticky-to-Fixed Layout States --- */
  .header-inner {
    min-height: 62px;
  }

  /**
   * When the mobile drawer is open (.is-nav-open), force the sticky header 
   * to position:fixed. This prevents sticky breakdown bugs caused by body 
   * overflow:hidden, keeping the header and toggle always pinned to the viewport.
   */
  .site-header.is-nav-open {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }

  .header-toolbar {
    position: relative;
    z-index: 4;
  }

  /* --- 2. Mobile Menu Toggle Button (Hamburger) --- */
  .nav-toggle {
    display: inline-flex;
  }

  html[data-theme="light"] .nav-toggle {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
    color: #0f172a;
  }

  /* --- 3. Body Scroll Lock States --- */
  html.nav-open,
  html.nav-open body {
    overflow: hidden !important;
  }

  /* --- 4. Floating Mobile Navigation Drawer --- */
  .nav {
    position: fixed;
    z-index: 3;
    /* Dynamically positioned exactly below the header's pixel height offset */
    top: var(--site-header-bottom, 62px);
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    box-shadow: var(--shadow);
    
    /* Fade down transition parameters */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s linear;
  }

  /* Expand menu drawer on active state */
  .site-header.is-nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* --- 5. Navigation Links & Interactive Hover States --- */
  .nav a {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.94rem;
    text-decoration: none;
    display: block;
    transition: background 0.15s ease, color 0.15s ease;
  }

  /* Standard link hover/focus states */
  .nav a:hover,
  .nav a:active {
    background: var(--surface);
    color: var(--accent-3);
  }

  /* Dark mode color theme overrides for active links */
  html[data-theme="dark"] .nav a:hover,
  html[data-theme="dark"] .nav a:active {
    color: var(--accent-2);
  }

  .hero {
    min-height: 0;
    padding: 2.15rem 0 2.6rem;
  }

  .hero-title {
    max-width: 11ch;
    font-size: clamp(2.65rem, 13vw, 4.1rem);
    line-height: 0.98;
  }

  .hero-statement {
    max-width: 28ch;
    font-size: clamp(1.16rem, 5.2vw, 1.55rem);
    line-height: 1.25;
  }

  .lede {
    font-size: 1rem;
  }

  .resume-panel__top {
    grid-template-columns: 1fr;
  }

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

  .contact-actions {
    grid-template-columns: 1fr;
  }
}

html.nav-open,
html.nav-open body {
  overflow: hidden;
}


/* ============================================================================
   AI PLATFORM SECTION
   ============================================================================ */

.ai-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .ai-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ai-card--lead {
    grid-column: 1 / -1;
  }
}

.ai-card {
  position: relative;
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

html[data-theme="light"] .ai-card {
  background: rgba(255, 255, 255, 0.76);
}

.ai-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.36);
}

/* Lead card — copy beside the serving-stack diagram */
.ai-card--lead {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  padding: clamp(1.25rem, 3.5vw, 1.85rem);
  background:
    linear-gradient(145deg, rgba(6, 182, 212, 0.08), transparent 55%),
    var(--surface);
}

html[data-theme="light"] .ai-card--lead {
  background:
    linear-gradient(145deg, rgba(2, 132, 199, 0.07), transparent 55%),
    rgba(255, 255, 255, 0.76);
}

.ai-card--lead:hover {
  transform: none;
}

@media (min-width: 900px) {
  .ai-card--lead {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
  }
}

.ai-card__copy {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ai-card__copy > * {
  margin: 0;
}

.ai-kicker {
  margin: 0;
  color: var(--accent-2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-card h3 {
  margin: 0.6rem 0 0;
  font-size: 1.08rem;
  letter-spacing: 0;
}

.ai-card--lead h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem);
  line-height: 1.2;
}

.ai-card > p:not(.ai-kicker),
.ai-card__copy > p:not(.ai-kicker) {
  color: var(--muted);
  font-size: 0.95rem;
}

.ai-card > p:not(.ai-kicker) {
  margin: 0.85rem 0 0;
}

/* Serving stack — vertical layer list with pipeline connectors */
.ai-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.ai-stack li {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 0.72rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

html[data-theme="light"] .ai-stack li {
  background: rgba(15, 23, 42, 0.035);
}

/* Connector between stacked layers */
.ai-stack li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.45rem;
  bottom: -0.5rem;
  width: 1px;
  height: 0.5rem;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.5;
}

.ai-stack__tag {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.6;
}

.ai-stack__body {
  color: var(--soft);
  font-size: 0.85rem;
  line-height: 1.5;
}

@media (max-width: 460px) {
  .ai-stack li {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .ai-stack li:not(:last-child)::after {
    display: none;
  }
}

/* Chip variants used by the AI section and the AI skill blocks */
.chips--accent li {
  border-color: rgba(6, 182, 212, 0.28);
  background: rgba(6, 182, 212, 0.09);
  color: var(--text);
}

html[data-theme="light"] .chips--accent li {
  border-color: rgba(2, 132, 199, 0.26);
  background: rgba(2, 132, 199, 0.08);
}

.chips--sm {
  margin-top: 0.95rem;
}

.chips--sm li {
  padding: 0.28rem 0.5rem;
  font-size: 0.67rem;
}

.skill-block--accent {
  border-color: rgba(6, 182, 212, 0.3);
  background:
    linear-gradient(150deg, rgba(6, 182, 212, 0.08), transparent 60%),
    var(--surface);
}

html[data-theme="light"] .skill-block--accent {
  border-color: rgba(2, 132, 199, 0.24);
  background:
    linear-gradient(150deg, rgba(2, 132, 199, 0.07), transparent 60%),
    rgba(255, 255, 255, 0.76);
}

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

  .ai-card:hover {
    transform: none;
  }
}
