:root {
  color-scheme: dark;
  --bg: #040510;
  --fg: #f6f6f8;
  --muted: rgba(246, 246, 248, 0.65);
  --primary: #61f2ff;
  --accent: #ff9ef5;
  --card: rgba(9, 10, 24, 0.65);
  --border: rgba(255, 255, 255, 0.1);
  --blur: blur(32px);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: linear-gradient(145deg, #02030a 20%, #05061c 60%, #0f0a22 100%);
  color: var(--fg);
  line-height: 1.7;
  overflow-x: hidden;
}

.hero,
.section,
.contact {
  width: 100%;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.eyebrow {
  font-family: "Space Mono", monospace;
  color: var(--primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.7rem;
  margin: 0 0 0.8rem;
}

.hero {
  position: relative;
  padding: 6rem clamp(1.5rem, 4vw, 8rem) 4rem;
  display: grid;
  gap: 4rem;
  backdrop-filter: blur(30px);
  animation-delay: 0.1s;
}

.hero__content {
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
}

.hero__lead {
  color: var(--muted);
  font-size: 1.2rem;
}

.hero__cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 900px;
}

.hero__meta div {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.hero__meta span {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.2rem;
}

.btn {
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(120deg, var(--primary), var(--accent));
  color: #030307;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: opacity 0.3s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--fg);
}

main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 8rem) 4rem;
}

.section {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 2.5rem clamp(1.5rem, 3vw, 3.5rem);
  background: rgba(2, 3, 12, 0.7);
  backdrop-filter: blur(18px);
  animation-delay: 0.2s;
}

.section__header {
  margin-bottom: 1.5rem;
}

.section__lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pill-grid article {
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.pill-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

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

.timeline article {
  border-left: 2px solid var(--primary);
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.015);
  border-radius: 16px;
  transition: transform 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.timeline header p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.timeline ul {
  padding-left: 1.3rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
}

.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.skill-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 1.5rem;
  background: radial-gradient(
      circle at top right,
      rgba(97, 242, 255, 0.25),
      transparent 50%
    ),
    rgba(255, 255, 255, 0.02);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.skill-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.skill-card__tag {
  font-family: "Space Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.skill-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.skill-card__chips span {
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  color: var(--muted);
}

.research__grid,
.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.research__grid article,
.contact__grid div {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.contact {
  margin: 0;
  padding: 2.5rem clamp(1.5rem, 3vw, 3.5rem);
  border: 1px solid var(--border);
  border-radius: 32px 32px 0 0;
  background: rgba(3, 4, 12, 0.9);
  animation-delay: 0.8s;
}

.research__links,
.contact__links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  justify-content: flex-start;
  transition: border-color 0.2s ease, background 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

.link-pill::after {
  content: "↗";
  font-size: 0.75rem;
  margin-left: auto;
  opacity: 0.7;
}

.link-pill:hover {
  border-color: var(--primary);
  background: rgba(97, 242, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.25);
}

.pill-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.pill-icon svg {
  width: 100%;
  height: 100%;
}

.contact__links .link-pill {
  width: 100%;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Ccircle fill='%23ffffff' fill-opacity='0.02' cx='1' cy='1' r='1'/%3E%3C/svg%3E");
  opacity: 0.25;
  mix-blend-mode: screen;
  z-index: 0;
}

.orb {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  z-index: 0;
  animation: float 20s ease-in-out infinite alternate;
}

.orb-one {
  top: -60px;
  left: 10%;
  background: radial-gradient(circle, #61f2ff, transparent);
  animation-duration: 18s;
}

.orb-two {
  bottom: 10%;
  right: 8%;
  background: radial-gradient(circle, #ff9ef5, transparent);
  animation-duration: 24s;
}

.orb-three {
  top: 40%;
  left: 60%;
  background: radial-gradient(circle, #7f6dff, transparent);
  animation-duration: 28s;
}

.pill-grid article:hover,
.timeline article:hover,
.skill-card:hover,
.research__grid article:hover,
.contact__grid div:hover {
  transform: translateY(-6px);
  border-color: rgba(97, 242, 255, 0.5);
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.35);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 30px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

main .section:nth-of-type(1) {
  animation-delay: 0.25s;
}

main .section:nth-of-type(2) {
  animation-delay: 0.32s;
}

main .section:nth-of-type(3) {
  animation-delay: 0.39s;
}

main .section:nth-of-type(4) {
  animation-delay: 0.46s;
}

@keyframes float {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(50px, -40px, 0);
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 4rem;
  }

  .timeline article {
    padding-left: 1rem;
  }

  .skill-card {
    padding: 1.35rem;
  }
}

@media (max-width: 900px) {
  .hero,
  .section,
  .contact {
    width: 100%;
  }

  .section {
    border-radius: 24px;
    padding: 2rem 1.5rem;
  }

  .contact {
    margin: 0;
    padding: 2rem 1.5rem;
    border-radius: 24px;
  }
}

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
    align-items: center;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 3.2rem 1.1rem 2.2rem;
    gap: 2rem;
  }

  .hero__cta {
    flex-direction: column;
    gap: 0.8rem;
  }

  main {
    padding: 0 1.1rem 2.5rem;
    gap: 1.6rem;
  }

  .section {
    padding: 1.6rem 1.1rem;
  }

  .contact {
    padding: 1.6rem 1.1rem;
  }

  .contact__grid {
    gap: 1rem;
  }

  .contact__links {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}

@media (max-width: 600px) {
  body {
    line-height: 1.6;
  }

  .hero__content h1 {
    font-size: clamp(2rem, 9vw, 2.6rem);
  }

  .pill-grid,
  .skills__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero__meta {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .hero__meta div {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.2rem;
  }

  .btn,
  .link-pill {
    width: 100%;
    justify-content: center;
  }

  .skill-card {
    padding: 1.25rem;
  }

  .hero__lead,
  .section__lead {
    font-size: 1rem;
  }

  .hero__meta div,
  .pill-grid article,
  .timeline article,
  .research__grid article,
  .contact__grid div {
    padding: 0.9rem;
  }

  .pill-grid article,
  .skill-card,
  .timeline article {
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none;
  }

  .hero,
  .section,
  .contact {
    animation: none;
    opacity: 1;
  }

  .pill-grid article,
  .timeline article,
  .skill-card,
  .research__grid article,
  .contact__grid div,
  .link-pill {
    transition: none;
  }
}
