:root {
  --bg: #dcecff;
  --panel: #ffffff;
  --ink: #12263a;
  --accent: #ff6b35;
  --accent-2: #1d8a99;
  --muted: #5b7083;
  --ring: rgba(255, 107, 53, 0.25);
  --shadow: 0 14px 30px rgba(18, 38, 58, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--ink);
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #eaf5ff 0%, #cfe5f9 100%);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(6px);
  z-index: 1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      circle at 22% 28%,
      rgba(35, 96, 184, 0.42),
      transparent 42%
    ),
    radial-gradient(
      circle at 78% 68%,
      rgba(102, 188, 242, 0.34),
      transparent 46%
    ),
    radial-gradient(
      circle at 48% 46%,
      rgba(31, 126, 206, 0.28),
      transparent 50%
    );
  filter: blur(6px);
  opacity: 0.88;
  animation: oceanDriftA 11s ease-in-out infinite alternate;
  z-index: 0;
  pointer-events: none;
}

#oceanDotsCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

#globalBall {
  position: fixed;
  left: 0;
  top: 0;
  width: 68px;
  height: 68px;
  transform: translate3d(26px, 120px, 0);
  border-radius: 50%;
  overflow: hidden;
  background: url("Basketball-Emoji.png") center / cover no-repeat;
  border: none;
  box-shadow:
    inset 0 -8px 14px rgba(24, 16, 8, 0.22),
    inset 0 6px 10px rgba(255, 255, 255, 0.12),
    0 14px 28px rgba(18, 38, 58, 0.34);
  cursor: grab;
  user-select: none;
  touch-action: none;
  will-change: transform;
  filter: saturate(1.08) contrast(1.02);
  z-index: 9999;
}

#globalBall::before,
#globalBall::after {
  content: none;
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

#globalBall:active {
  cursor: grabbing;
}

#globalBall.is-dragging {
  filter: saturate(1.14) brightness(1.03);
}

.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.2rem 1rem 4rem;
  position: relative;
  z-index: 2;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #14213d 0%, #0f3d4c 55%, #126782 100%);
  color: #ecf7ff;
  padding: clamp(1.2rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
  animation: riseIn 650ms ease-out both;
  transform-style: preserve-3d;
  z-index: 1;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(1px);
}

.hero::before {
  width: 340px;
  height: 340px;
  background: radial-gradient(
    circle,
    rgba(255, 107, 53, 0.35),
    transparent 65%
  );
  right: -140px;
  top: -120px;
}

.hero::after {
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(84, 214, 199, 0.25),
    transparent 70%
  );
  left: -120px;
  bottom: -150px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.2rem;
  align-items: center;
}

.interactive-tilt {
  transform: perspective(900px) rotateX(0deg) rotateY(0deg) translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
  transition: transform 220ms ease;
}

h1,
h2,
h3 {
  font-family: "Syne", "Trebuchet MS", sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.title-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  backdrop-filter: blur(4px);
  margin-bottom: 0.8rem;
}

.lead {
  margin: 0 0 0.9rem;
  max-width: 52ch;
  color: rgba(236, 247, 255, 0.94);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
  justify-content: center;
}

.chip {
  border: 1px solid #cfe3ef;
  border-radius: 999px;
  padding: 0.28rem 0.68rem;
  font-size: 0.78rem;
  color: #124d61;
  background: rgba(29, 138, 153, 0.1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.external-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.85rem;
  justify-content: center;
}

.external-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 177, 144, 0.48);
  background: linear-gradient(130deg, #ffb05d 0%, #ff6b35 52%, #dc4514 100%);
  color: #fffaf7;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(220, 69, 20, 0.3);
  transition:
    transform 170ms ease,
    box-shadow 170ms ease,
    filter 170ms ease;
}

.external-link-btn::after {
  content: "↗";
  font-size: 0.74rem;
}

.external-link-btn:hover,
.external-link-btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 26px rgba(220, 69, 20, 0.36);
}

.hero .chip {
  border: 1px solid rgba(236, 247, 255, 0.5);
  color: #f4fbff;
  background: rgba(255, 255, 255, 0.08);
}

.contact-line {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: rgba(236, 247, 255, 0.92);
}

.hero-photo-wrap {
  display: flex;
  justify-content: center;
}

.hero-photo {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(236, 247, 255, 0.28);
  box-shadow: 0 16px 35px rgba(8, 20, 29, 0.35);
}

main {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
  position: relative;
}

.section {
  background: transparent;
  border-radius: var(--radius);
  box-shadow: none;
  padding: 1.25rem;
  animation: riseIn 700ms ease both;
  animation-delay: var(--delay, 0ms);
  text-align: center;
  position: relative;
}

#about {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}

#about .muted {
  color: #1e4f66;
  font-weight: 500;
}

#aboutTextSource,
#aboutApproachSource,
#aboutLifeSource,
#aboutLinkedInSource {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.75;
  max-width: 70ch;
}

.section h2 {
  display: inline-block;
  font-family: "Outfit", "Segoe UI", sans-serif;
  letter-spacing: 0;
  font-weight: 700;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  padding-bottom: 0.04em;
  overflow: visible;
}

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

.projects-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.project-card,
.cv-item,
.badge-card {
  flex: 1 1 240px;
  max-width: 320px;
  background: linear-gradient(160deg, #ffffff 0%, #f5fbff 100%);
  border: 1px solid #d8e8f4;
  border-radius: 14px;
  padding: 1rem;
  transform-style: preserve-3d;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-card.is-active {
  border-color: #6fb7de;
  box-shadow: 0 12px 26px rgba(18, 38, 58, 0.14);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.7rem 0 0.9rem;
  justify-content: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #cfe3ef;
  background: rgba(29, 138, 153, 0.08);
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  color: #124d61;
}

.project-card > *,
.cv-item > *,
.badge-card > * {
  transform: translateZ(10px);
}

.project-card:hover,
.project-card:focus-within,
.cv-item:hover,
.cv-item:focus-within,
.badge-card:hover,
.badge-card:focus-within {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: #9ecde7;
  box-shadow: 0 10px 24px rgba(18, 38, 58, 0.12);
}

.project-card a {
  color: #0e5e87;
  font-weight: 600;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.project-card .project-link-btn,
.project-card .project-link-btn:visited {
  margin-top: auto;
  align-self: center;
  color: #fffaf7;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.78rem;
}

.cv-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.cv-item {
  flex: 1 1 220px;
  padding: 0.9rem;
}

.cv-item h3 {
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

.cv-item p {
  margin: 0;
  color: var(--muted);
}

#expertise .cv-item {
  border: 1px solid #cde1ef;
  box-shadow: 0 8px 18px rgba(18, 38, 58, 0.08);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

#expertise .cv-item:hover {
  transform: translateY(-3px);
  border-color: #98c7e3;
  box-shadow: 0 14px 24px rgba(18, 38, 58, 0.12);
}

#expertise .cv-item h3 {
  color: #0f3d4c;
}

#languages .chip-row {
  margin-top: 0.8rem;
  gap: 0.65rem;
}

#languages .chip {
  background: #ffffff;
  border: 1px solid #d8e8f4;
  color: #0f3d4c;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px rgba(18, 38, 58, 0.08);
}

#hobbies .chip-row {
  margin-top: 0.8rem;
  gap: 0.65rem;
}

#hobbies .chip {
  background: #ffffff;
  border: 1px solid #d8e8f4;
  color: #0f3d4c;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px rgba(18, 38, 58, 0.08);
}

#contact .chip-row {
  margin-top: 0.8rem;
  gap: 0.65rem;
}

#contact .chip {
  background: #ffffff;
  border: 1px solid #d8e8f4;
  color: #0f3d4c;
  font-weight: 600;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 16px rgba(18, 38, 58, 0.08);
}

.badge-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

#certifications .muted,
#projects .muted,
#contact .muted {
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
  color: #1c4b61;
  font-weight: 600;
}

#certifications h2 {
  color: #0f3d4c;
  margin-bottom: 0.35rem;
}

.trailhead-summary {
  margin: 0.9rem auto 0;
  max-width: 920px;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #d2e3f0;
  background: rgba(255, 255, 255, 0.78);
}

.trailhead-summary p {
  margin: 0.4rem 0;
  color: #19495f;
}

.trailhead-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.95rem;
}

.trailhead-card {
  flex: 1 1 230px;
  max-width: 320px;
  background: linear-gradient(160deg, #ffffff 0%, #f5fbff 100%);
  border: 1px solid #d8e8f4;
  border-radius: 14px;
  padding: 0.85rem;
  text-align: left;
  box-shadow: 0 8px 18px rgba(18, 38, 58, 0.08);
}

.trailhead-card h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
  color: #0f3d4c;
}

.trailhead-card p {
  margin: 0;
  color: #1f536a;
}

.trailhead-points {
  margin-top: 0.6rem !important;
  color: #0f3d4c !important;
  font-weight: 700;
}

.badge-card {
  width: min(255px, 100%);
  min-height: 350px;
  padding: 0.9rem;
  border-radius: 16px;
  background: linear-gradient(160deg, #ffffff 0%, #f5fbff 100%);
  border: 1px solid #d8e8f4;
  box-shadow: 0 10px 22px rgba(18, 38, 58, 0.09);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  justify-items: center;
}

.badge-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  color: #0b3a53;
  text-transform: none;
  line-height: 1.35;
  min-height: 2.7em;
  max-width: 100%;
  overflow-wrap: break-word;
  text-wrap: balance;
  text-align: center;
}

.badge-embed {
  width: 100%;
  min-height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-embed iframe {
  display: block;
  margin: 0 auto;
}

.about-particle-wrap {
  margin-top: 0.95rem;
  display: grid;
  gap: 0.55rem;
}

#education .education-focus {
  margin-top: 0.55rem;
  color: #1c4b61;
  font-weight: 600;
}

.about-particle-label {
  margin: 0;
  font-weight: 800;
  color: #0b3a53;
  font-size: 0.98rem;
}

.about-particle-hint {
  margin: 0;
  font-size: 0.82rem;
  color: #3c6177;
}

#aboutParticleCanvas {
  width: 100%;
  height: auto;
  min-height: 280px;
  border-radius: 12px;
  border: 1px solid #c9e0ef;
  background: linear-gradient(135deg, #ffffff 0%, #eef7fd 100%);
}

.project-card p,
.cv-item p,
.muted {
  margin-left: auto;
  margin-right: auto;
}

.badge-placeholder {
  border-radius: 14px;
  border: 2px dashed #bdd2df;
  padding: 1rem;
  background: #f8fcff;
}

.badge-placeholder strong {
  display: block;
  margin-bottom: 0.35rem;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
  border-radius: 8px;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    max-width: 300px;
  }

  .page-wrap {
    padding: 0.8rem 0.8rem 3rem;
  }

  .trailhead-summary,
  .trailhead-card {
    text-align: center;
  }
}

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

  * {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }

  body {
    background: linear-gradient(180deg, #eaf5ff 0%, #cfe5f9 100%);
  }

  .interactive-tilt {
    transform: none !important;
  }
}
