:root {
  --bg: #06131f;
  --bg-deep: #040b14;
  --surface: rgba(8, 17, 27, 0.58);
  --surface-strong: rgba(9, 19, 31, 0.82);
  --line: rgba(187, 231, 255, 0.14);
  --text: #eaf7ff;
  --muted: rgba(234, 247, 255, 0.72);
  --accent-a: #54f2c4;
  --accent-b: #72a6ff;
  --accent-c: #ff934f;
  --accent-d: #e7ff7a;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(87, 144, 255, 0.18), transparent 32%),
    linear-gradient(180deg, #06111b 0%, #071019 30%, #040b14 100%);
  font-family: "Aptos", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

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

.mesh-canvas,
.page-noise,
.page-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.mesh-canvas {
  z-index: -4;
}

.page-noise {
  z-index: -1;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 42%, transparent 92%);
}

.page-noise::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 24%, transparent 55%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 28%);
  filter: blur(24px);
  animation: drift 18s ease-in-out infinite alternate;
}

.page-glow {
  z-index: -3;
  filter: blur(90px);
  opacity: 0.55;
}

.page-glow-a {
  inset: auto auto 8% -12%;
  width: 36rem;
  height: 36rem;
  background: radial-gradient(circle, rgba(84, 242, 196, 0.4), transparent 68%);
  animation: floatGlow 14s ease-in-out infinite;
}

.page-glow-b {
  inset: 6% -10% auto auto;
  width: 42rem;
  height: 42rem;
  background: radial-gradient(circle, rgba(255, 147, 79, 0.26), transparent 68%);
  animation: floatGlow 20s ease-in-out infinite reverse;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 2vw, 2rem);
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(4, 12, 20, 0.8), rgba(4, 12, 20, 0.34));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-a), var(--accent-c));
  box-shadow: 0 0 18px rgba(84, 242, 196, 0.6);
}

.brand-text {
  font-family: "Aptos Display", "Segoe UI Variable Display", "Bahnschrift", sans-serif;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.top-actions a {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.top-actions a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px) saturate(1.2);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 26%);
  opacity: 0.6;
  pointer-events: none;
}

.hero,
.spotlight,
.contact {
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 1.25rem;
  min-height: min(72vh, 760px);
  align-items: stretch;
}

.hero-copy,
.hero-side,
.timeline-body,
.timeline-meta,
.spotlight-card,
.credentials-main,
.credentials-side {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent-d);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  font-family: "Aptos Display", "Segoe UI Variable Display", "Bahnschrift", sans-serif;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 10ch;
  font-size: clamp(3.2rem, 8vw, 6.6rem);
}

.hero-summary,
.section-heading p,
.timeline-body p,
.stack-list p,
.spotlight-card p,
.contact-card p,
.stat-card p {
  color: var(--muted);
}

.hero-summary {
  max-width: 58ch;
  margin: 1.4rem 0 0;
  font-size: 1.06rem;
  line-height: 1.75;
}

.hero-pills,
.chip-grid,
.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.hero-pills {
  margin: 1.6rem 0 1.8rem;
}

.hero-pills span,
.chip-grid span,
.cert-grid li {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10.5rem;
  padding: 0.92rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

.button-primary {
  color: #021119;
  background: linear-gradient(135deg, var(--accent-a), #b6ffd7);
  box-shadow: 0 18px 40px rgba(84, 242, 196, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-side {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.portrait-card {
  position: relative;
  min-height: 36rem;
  padding: 0.85rem;
  border-radius: calc(var(--radius-xl) + 6px);
  background: linear-gradient(180deg, rgba(7, 17, 28, 0.88), rgba(7, 17, 28, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

.portrait-frame {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 33rem;
  border-radius: 1.4rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.portrait-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 31.5rem;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 1.1rem;
  filter: saturate(1.02) contrast(1.01);
}

.hero-side-grid {
  display: grid;
  gap: 1rem;
}

.stat-card {
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-label,
.contact-label {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: rgba(234, 247, 255, 0.66);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.stat-card strong,
.contact-card strong {
  display: block;
  font-size: 1.15rem;
  font-family: "Aptos Display", "Segoe UI Variable Display", "Bahnschrift", sans-serif;
}

.spotlight,
.two-up,
.credentials,
.contact,
.experience {
  margin-top: 1.4rem;
}

.section-heading {
  position: relative;
  z-index: 1;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-heading.wide p {
  max-width: 62ch;
}

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

.spotlight-card {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.spotlight-card h3,
.timeline-meta h3,
.stack-list h3,
.credentials-list h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.experience .section-heading {
  margin-bottom: 1.5rem;
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.35rem;
  padding: 1.25rem;
}

.timeline-item.compact {
  grid-template-columns: 280px 1fr;
}

.timeline-meta {
  padding-right: 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-meta span {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--accent-a);
  font-size: 0.9rem;
  font-weight: 700;
}

.timeline-meta p {
  margin: 0;
  color: rgba(234, 247, 255, 0.75);
}

.timeline-body p {
  margin-top: 0;
  line-height: 1.72;
}

.timeline-body ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
}

.two-up,
.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.two-up .panel,
.credentials .panel {
  padding: 1.35rem;
}

.chip-grid span {
  font-size: 0.95rem;
}

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

.stack-list h3 {
  color: var(--accent-c);
}

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

.credentials-list p {
  margin: 0;
  color: var(--muted);
}

.cert-grid {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.contact-card {
  display: block;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 180ms ease, background 180ms ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.075);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

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

@keyframes drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.04);
  }
}

@keyframes floatGlow {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(3%, -4%, 0);
  }
}

@media (max-width: 1080px) {
  .hero,
  .two-up,
  .credentials,
  .contact-grid,
  .spotlight-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .portrait-card {
    min-height: auto;
  }

  .portrait-frame,
  .portrait-image {
    min-height: 24rem;
  }

  .timeline-meta {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 0;
    padding-bottom: 1rem;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(calc(100% - 1rem), var(--max-width));
    padding-top: 1.4rem;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .top-actions {
    width: 100%;
  }

  .top-actions a {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero,
  .spotlight,
  .contact,
  .two-up .panel,
  .credentials .panel,
  .timeline-item {
    padding: 1.1rem;
  }

  .portrait-frame,
  .portrait-image {
    min-height: 21rem;
  }

  .hero h1 {
    font-size: clamp(2.6rem, 14vw, 4.3rem);
  }

  .section-heading h2 {
    font-size: clamp(1.8rem, 10vw, 2.6rem);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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