:root {
  --bg: #04131d;
  --panel: rgba(8, 31, 44, 0.74);
  --panel-strong: rgba(9, 39, 56, 0.9);
  --text: #eff7ff;
  --muted: #a9c5d6;
  --accent: #ff9f43;
  --accent-2: #2ad0c8;
  --line: rgba(122, 166, 190, 0.28);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 5%, #0d2740, #040d15 45%, #02070d 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

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

p {
  color: var(--muted);
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 0;
  letter-spacing: -0.01em;
}

.container {
  width: min(1140px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.5;
}

.orb-a {
  width: 380px;
  height: 380px;
  background: linear-gradient(135deg, #24d3c5, #1389b6);
  top: -80px;
  right: -70px;
  animation: driftA 16s ease-in-out infinite;
}

.orb-b {
  width: 310px;
  height: 310px;
  background: linear-gradient(135deg, #ff9f43, #ffcc67);
  bottom: 8%;
  left: -120px;
  animation: driftB 18s ease-in-out infinite;
}

.orb-c {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #2b89ff, #2ad0c8);
  top: 45%;
  left: 52%;
  animation: driftC 14s ease-in-out infinite;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: min(1140px, calc(100% - 2.5rem));
  margin: 1.25rem auto 0;
  padding: 0.8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(12px);
  background: rgba(4, 20, 31, 0.65);
  box-shadow: var(--shadow);
}

.brand {
  font-size: 1.1rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  gap: 1.2rem;
}

.site-nav a {
  position: relative;
  font-size: 0.95rem;
  color: #d6ebf8;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

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

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  display: block;
  margin: 5px 0;
  transition: transform 0.25s ease;
}

.section {
  padding: 5rem 0 1.5rem;
}

.hero {
  padding-top: 4.6rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: #8fc2dc;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-2));
}

.hero-copy h1 {
  font-size: clamp(2rem, 4.4vw, 3.9rem);
  line-height: 1.1;
  margin: 0.7rem 0 1rem;
}

.hero-subtitle {
  color: #cce4f2;
  font-size: 1.1rem;
  font-weight: 500;
}

#role-rotator {
  transition: opacity 0.22s ease;
}

.hero-text {
  max-width: 56ch;
  margin-bottom: 1.8rem;
}

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

.btn {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #ffd277);
  color: #1f1304;
  box-shadow: 0 10px 28px rgba(255, 159, 67, 0.32);
}

.btn-secondary {
  border-color: rgba(168, 218, 243, 0.32);
  background: rgba(5, 29, 42, 0.65);
}

.hero-card {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 15%;
}

.hero-card-content {
  padding: 1rem 1.1rem 1.2rem;
}

.hero-card-title {
  font-size: 0.82rem;
  color: #8fd9d5;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

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

.section-heading h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  margin: 0.6rem 0 0;
}

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

.panel,
.timeline-item,
.project-card,
.skill-panel,
.metric,
.contact-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 1.3rem;
}

.panel h3 {
  font-size: 1.15rem;
  margin-bottom: 0.7rem;
}

.clean-list {
  margin: 0;
  padding-left: 1rem;
}

.clean-list li + li {
  margin-top: 0.8rem;
}

.metrics {
  padding-top: 2.5rem;
}

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

.metric {
  padding: 1.2rem;
  text-align: center;
  background: linear-gradient(160deg, rgba(15, 47, 63, 0.88), rgba(6, 23, 34, 0.88));
}

.metric h3 {
  margin: 0;
  font-size: clamp(1.8rem, 2.7vw, 2.4rem);
}

.metric p {
  font-size: 0.9rem;
  margin: 0.4rem 0 0;
}

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

.timeline::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--accent-2), transparent);
  opacity: 0.45;
}

.timeline-item {
  padding: 1.2rem 1.2rem 1.2rem 2.1rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 1.45rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-2);
  background: #0a2230;
}

.timeline-meta h3 {
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
}

.timeline-meta p {
  margin: 0;
}

.timeline-meta span {
  color: #86d8d2;
  font-size: 0.9rem;
}

.timeline-item ul {
  margin: 0.9rem 0 0;
  padding-left: 1rem;
  color: #cbdeea;
}

.timeline-item li + li {
  margin-top: 0.55rem;
}

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

.project-card {
  padding: 1.3rem;
  background: linear-gradient(165deg, rgba(12, 46, 63, 0.9), rgba(8, 25, 37, 0.95));
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.project-top h3 {
  margin-bottom: 0.35rem;
}

.project-kicker {
  margin: 0;
  font-size: 0.92rem;
  color: #8fc2dc;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.project-links a {
  color: #8edfd9;
  font-size: 0.93rem;
  white-space: nowrap;
  border: 1px solid rgba(142, 223, 217, 0.28);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  background: rgba(7, 32, 48, 0.55);
}

.project-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
  color: #cae4f2;
}

.project-card li + li {
  margin-top: 0.45rem;
}

.tags {
  margin-top: 0.95rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tags span,
.chip-wrap span {
  border-radius: 999px;
  border: 1px solid rgba(142, 188, 211, 0.32);
  background: rgba(7, 32, 48, 0.78);
  color: #d2ebf7;
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

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

.skill-panel {
  padding: 1.2rem;
}

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

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

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

.cert-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.cert-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 159, 67, 0.68);
}

.cert-card img {
  width: 100%;
  aspect-ratio: 1.5 / 1;
  object-fit: cover;
}

.cert-card span {
  padding: 0.7rem;
  color: #d2ebf7;
  font-size: 0.84rem;
}

.contact-panel {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.2rem;
  background: linear-gradient(160deg, rgba(11, 39, 57, 0.92), rgba(8, 27, 39, 0.94));
}

.contact-links {
  display: grid;
  gap: 0.6rem;
}

.contact-links a {
  border: 1px solid rgba(120, 168, 191, 0.35);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  color: #c9e4f3;
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.contact-links a:hover {
  border-color: rgba(42, 208, 200, 0.85);
  transform: translateX(3px);
}

.site-footer {
  text-align: center;
  padding: 2rem 0 2.3rem;
}

.site-footer p {
  margin: 0;
  color: #8bb4cc;
  font-size: 0.88rem;
}

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

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

@keyframes driftA {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-12px, 20px);
  }
}

@keyframes driftB {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(14px, -14px);
  }
}

@keyframes driftC {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@media (max-width: 1080px) {
  .hero-grid,
  .about-grid,
  .metrics-grid,
  .project-grid,
  .skills-layout,
  .cert-grid,
  .contact-panel {
    grid-template-columns: 1fr 1fr;
  }

  .metrics-grid,
  .cert-grid {
    gap: 0.8rem;
  }
}

@media (max-width: 820px) {
  .site-header {
    margin-top: 0.9rem;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.4rem);
    padding: 0.7rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(5, 22, 33, 0.96);
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .site-header.menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero {
    padding-top: 3.3rem;
  }

  .hero-grid,
  .about-grid,
  .metrics-grid,
  .project-grid,
  .skills-layout,
  .cert-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    padding-left: 2rem;
  }

  .timeline::before {
    left: 12px;
  }

  .timeline-item::before {
    left: 5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
