:root {
  --bg: #242329;
  --bg-muted: #2a2831;
  --surface: rgba(32, 32, 32, 0.72);
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  --accent: #de8b5d;
  --accent-strong: #f29d6d;
  --accent-violet: #8c51d6;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 40px -30px rgba(0, 0, 0, 0.7);
}

body.light {
  --bg: #fbf8ff;
  --bg-muted: #f3ebff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #b5673f;
  --accent-strong: #9f542d;
  --accent-violet: #7f42cb;
  --border: rgba(15, 23, 42, 0.16);
  --shadow: 0 20px 30px -24px rgba(15, 23, 42, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.75rem;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: transparent;
  color: var(--text);
  line-height: 1.6;
  transition:
    background 0.25s ease,
    color 0.25s ease;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.2px),
    linear-gradient(243deg, rgba(140, 81, 214, 0.24) 0%, rgba(222, 139, 93, 0.03) 74%);
  background-size:
    50px 50px,
    cover;
  background-position:
    0 0,
    center;
  background-repeat: repeat, no-repeat;
  animation: dotsWave 5s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(140, 81, 214, 0.16) 0%,
      rgba(140, 81, 214, 0) 45%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(222, 139, 93, 0.13) 0%,
      rgba(222, 139, 93, 0) 46%
    );
}

body.light::before {
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.16) 1px, transparent 1.2px),
    linear-gradient(243deg, rgba(140, 81, 214, 0.16) 0%, rgba(222, 139, 93, 0.06) 74%);
}

@keyframes dotsWave {
  0% {
    background-position:
      0 0,
      center;
  }
  50% {
    background-position:
      0 24px,
      center;
  }
  100% {
    background-position:
      0 0,
      center;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1080px, 92%);
  margin-inline: auto;
}

main,
footer {
  position: relative;
  z-index: 2;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: max(0.65rem, env(safe-area-inset-top)) 0.75rem 0.35rem;
  pointer-events: none;
}

.nav-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(960px, 100%);
  margin-inline: auto;
  padding: 0.35rem 0.45rem 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  backdrop-filter: blur(16px) saturate(1.25);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  box-shadow:
    0 12px 40px -22px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 color-mix(in srgb, #fff 5%, transparent);
}

body.light .nav-dock {
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow:
    0 14px 36px -20px rgba(15, 23, 42, 0.22),
    inset 0 1px 0 color-mix(in srgb, #fff 70%, transparent);
}

.site-nav {
  flex: 1;
  min-width: 0;
}

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.12rem;
  margin: 0;
  padding: 0 0.15rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 10px,
    #000 calc(100% - 10px),
    transparent 100%
  );
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list a {
  display: block;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-family: "Martian Mono", "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition:
    color 0.18s ease,
    background-color 0.18s ease;
}

.nav-list a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent-violet) 18%, transparent);
}

.nav-list a.active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent-violet) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
}

.nav-list a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

.theme-toggle {
  flex-shrink: 0;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border-radius: 999px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  display: grid;
  place-items: center;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.theme-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  transform: scale(1.04);
}

body.light .theme-toggle {
  background: color-mix(in srgb, var(--surface) 96%, transparent);
}

.section {
  padding: 2.75rem 0;
  scroll-margin-top: 5.75rem;
}

.section-muted {
  background: color-mix(in srgb, var(--bg-muted) 82%, transparent);
}

.hero {
  padding-top: 5.75rem;
}

.hero-stack {
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  text-align: center;
}

.hero-content {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  width: min(38rem, 100%);
}

.hero-metrics {
  width: min(720px, 100%);
  margin-top: 0.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.hero-metrics article {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 0.5rem;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.metric-value {
  margin: 0;
  font-family: "Martian Mono", "Inter", sans-serif;
  font-size: 1rem;
}

.metric-label {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.profile-wrap {
  line-height: 0;
  text-align: center;
}

.profile-frame {
  display: inline-block;
  width: 6.5rem;
  border-radius: 100%;
  border: 1px solid rgba(255, 255, 255, 0.141);
  overflow: hidden;
}

body.light .profile-frame {
  border-color: rgba(15, 23, 42, 0.2);
}

.profile-name {
  margin: 0.6rem 0 0;
  font-family: "Martian Mono", "Inter", sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.02rem;
  line-height: 1.2;
}

.eyebrow {
  font-family: "Martian Mono", "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 400;
  font-size: 0.78rem;
  background-image: linear-gradient(142deg, var(--accent-violet) 0%, var(--accent) 43%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.55rem;
}

h1 {
  font-family: "Martian Mono", "Inter", sans-serif;
  font-size: clamp(1.65rem, 3.1vw + 0.85rem, 2.35rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.28;
}

.hero-content h1 {
  margin: 0.15rem 0 0.5rem;
  max-width: 36ch;
}

.hero-content .lead {
  margin: 0;
  max-width: 52ch;
  font-size: clamp(0.9rem, 1.65vw + 0.56rem, 1.0625rem);
  line-height: 1.65;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-kicker {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.blog-teaser {
  margin: 0 0 0.95rem;
  max-width: 52ch;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.cert-cards .card .blog-tag {
  margin-bottom: 0.45rem !important;
}

.cert-cards {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.65rem;
}

.cert-cards .card {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
}

.cert-cards .card h3 {
  font-size: 0.84rem;
  margin: 0 0 0.2rem;
  line-height: 1.35;
}

.cert-cards .card p {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.credly-block {
  margin-bottom: 1.75rem;
}

.credly-block-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.85rem;
}

.credly-heading,
.certs-subheading {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.certs-subheading {
  margin-bottom: 0.85rem;
}

.credly-profile-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.credly-profile-link:hover {
  color: var(--accent-violet);
}

.credly-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.85rem;
}

.credly-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 0.75rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.credly-badge:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.credly-badge img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.credly-badge-name {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

.credly-badge-issuer {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.credly-status {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lead {
  color: var(--text-muted);
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.85;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.btn {
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  transition:
    transform 0.18s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(142deg, var(--accent-violet) 0%, var(--accent) 85%);
  color: #fff;
}

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

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

.card,
.timeline-company {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
}

.card,
.timeline-company,
.project-card {
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.card:hover,
.timeline-company:hover,
.project-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.hero-focus {
  position: relative;
  width: min(620px, 100%);
  margin-inline: auto;
  padding-top: 1.35rem;
  text-align: center;
}

.hero-focus::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(140px, 42%);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-violet) 35%,
    var(--accent) 65%,
    transparent 100%
  );
  opacity: 0.85;
}

.focus-kicker {
  margin: 0 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.focus-lead {
  margin: 0 auto;
  max-width: 48ch;
  font-size: 0.86rem;
  line-height: 1.72;
  color: var(--text-muted);
}

.focus-lead-tight {
  max-width: 52ch;
  font-size: 0.82rem;
  line-height: 1.58;
}

.focus-stack {
  margin-top: 0.55rem;
  justify-content: center;
}

.focus-inline {
  margin-top: 0.45rem;
}

.focus-inline.stack span {
  font-size: 0.68rem;
  padding: 0.16rem 0.48rem;
}

.focus-stack span {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  color: color-mix(in srgb, var(--text) 76%, var(--accent));
}

.profile-photo {
  width: 100%;
  display: block;
  margin: 0;
  border-radius: inherit !important;
  padding: 0.25rem;
  object-fit: cover;
}

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

.timeline {
  display: grid;
  gap: 0.75rem;
}

.timeline-company-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.timeline-company-header h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.company-meta {
  margin: 0;
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline-roles {
  display: grid;
  gap: 0.85rem;
}

.timeline-role + .timeline-role {
  padding-top: 0.85rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.timeline-role h4 {
  margin: 0 0 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.role-meta {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.timeline-role ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-muted);
}

.timeline-role li + li {
  margin-top: 0.35rem;
}

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

.project-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  box-shadow: var(--shadow);
}

.stack {
  margin-top: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.stack span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.project-meta {
  margin: -0.2rem 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.76rem;
  letter-spacing: 0.03em;
}

.blog-tag {
  display: inline-block;
  margin-bottom: 0.7rem !important;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer p {
  color: var(--text-muted);
  margin: 0;
  padding: 0.85rem 0;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 5.5rem;
  }

  .section {
    padding: 2.35rem 0;
    scroll-margin-top: 5.5rem;
  }

  .hero {
    padding-top: 5.5rem;
  }

  .hero-metrics,
  .project-grid,
  .contact-wrap {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  html {
    scroll-padding-top: 5rem;
  }

  .container {
    width: min(1080px, 94%);
  }

  .site-header {
    padding-left: max(0.45rem, env(safe-area-inset-left));
    padding-right: max(0.45rem, env(safe-area-inset-right));
  }

  .nav-dock {
    padding: 0.28rem 0.38rem 0.28rem 0.48rem;
  }

  .nav-list a {
    padding: 0.38rem 0.55rem;
    font-size: 0.64rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .section {
    padding: 2.1rem 0;
    scroll-margin-top: 5rem;
  }

  .hero {
    padding-top: 5.35rem;
  }

  .hero-actions,
  .contact-actions {
    gap: 0.6rem;
    margin-top: 1.15rem;
  }

  .btn {
    width: 100%;
    text-align: center;
    padding: 0.72rem 0.9rem;
  }

  .card,
  .timeline-company,
  .project-card {
    border-radius: 11px;
    padding: 0.8rem 0.85rem;
  }

  .timeline-role ul {
    padding-left: 0.9rem;
  }

  .cert-cards .card {
    padding: 0.62rem 0.68rem;
  }
}
