:root {
  --bg-start: #05070f;
  --bg-end: #121b35;
  --accent-one: rgba(88, 140, 255, 0.35);
  --accent-two: rgba(255, 196, 125, 0.22);
  --text-primary: #f5f7ff;
  --text-secondary: rgba(238, 241, 255, 0.72);
  --card-bg: rgba(14, 18, 36, 0.7);
  --card-border: rgba(255, 255, 255, 0.08);
  --github-link: #9bc5ff;
  --shadow-soft: 0 32px 45px rgba(5, 8, 23, 0.55);
  --mascot-color: #f5f7ff;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height, 72px) + 2rem);
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 20% 20%, var(--accent-one) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, var(--accent-two) 0%, transparent 40%),
    linear-gradient(160deg, var(--bg-start), var(--bg-end));
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: -25vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 65%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

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

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.hero {
  min-height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 6vw clamp(4rem, 6vw, 6rem);
}

.hero__inner {
  width: min(92vw, 1024px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}

.hero__tagline {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 570px;
  margin: 0 auto;
  gap: 0;
  text-align: left;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
  letter-spacing: 0.03em;
}

.hero__tagline-label {
  text-transform: uppercase;
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
  letter-spacing: 0.18em;
  color: rgba(238, 241, 255, 0.58);
}

.hero__tagline-words {
    text-transform: uppercase;
  font-size: clamp(0.75rem, 1.6vw, 0.85rem);
  letter-spacing: 0.18em;
  color: rgba(238, 241, 255, 0.58);
  position: relative;
  min-height: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background:transparent;
  overflow: hidden;
}

.hero__tagline-word {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero__tagline-word.is-active {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__tagline-words--typing .hero__tagline-word {
  position: static;
  inset: auto;
  opacity: 1;
  transform: none;
  transition: none;
}

.hero__tagline-word--typing {
  position: relative;
  padding-right: 0.75rem;
}

.hero__tagline-word--typing::after {
  content: '';
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 2px;
  height: 1.25em;
  background: currentColor;
  border-radius: 1px;
  transform: translateY(-50%);
  animation: caretBlink 1s steps(2, jump-none) infinite;
}

@keyframes caretBlink {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
.navbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: min(92vw, 100%);
  margin-inline: auto;
  margin-top: clamp(4rem, 24vh, 12rem);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  padding: 1rem 1.5rem;
  border-radius: 0 0 32px 32px;
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: blur(0);
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
  z-index: 10;
}


.navbar__links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(8, 11, 26, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 22px 34px -20px rgba(5, 8, 23, 0.7);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(18px);
}

.navbar--is-stuck {
  background: rgba(8, 11, 26, 0);
  box-shadow: 0 26px 46px -24px rgba(5, 8, 23, 0.70);
  backdrop-filter: blur(4px);
}

.navbar__brand {
  padding: 0.75rem 1.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd480 !important;
}

.navbar__links {
  display: flex;
  gap: 0.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  align-items: center;
  justify-content: center;
}

.navbar__links a {
  color: var(--text-primary);
  padding: 0.7rem 1.5rem;
}

.navbar__brand:hover,
.navbar__brand:focus-visible,
.navbar__links a:hover,
.navbar__links a:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 26px 40px -18px rgba(5, 8, 23, 0.9);
}

.hero__figure {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(70vw, 460px);
  aspect-ratio: 1;
  isolation: isolate;
}

.hero__figure::before {
  content: "";
  position: absolute;
  inset: 1%;
  border-radius: 50%;
  background: rgba(144, 187, 255, 0.05);
  filter: blur(124px);
  z-index: -1;
}

.mascot {
  width: min(60vw, 380px);
  max-width: 420px;
  aspect-ratio: 2 / 3;
  display: block;
  background-color: #c5d1e3;
  mask-image: url('../img/mascot.svg');
  mask-repeat: no-repeat;
  mask-size: contain;
  mask-position: center;
  -webkit-mask-image: url('../img/mascot.svg');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  -webkit-mask-position: center;
  filter: drop-shadow(0 32px 45px rgba(5, 8, 23, 0.55));
  transition: filter 0.4s ease;
  will-change: transform;
}

.mascot.is-active {
  filter: drop-shadow(0 42px 55px rgba(5, 8, 23, 0.65));
}

.section {
  width: min(92vw, 1024px);
  margin: 0 auto;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2.5rem;
  padding: clamp(3rem, 5vw, 4rem) 0;
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.section__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: rgba(238, 241, 255, 0.55);
}

.about__inner {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 4rem);
  align-items: center;
}

.about__photos {
  position: relative;
  width: min(70vw, 260px);
  aspect-ratio: 3 / 4;
  margin-inline: auto;
}

.about-photo {
  position: absolute;
  width: 72%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(96, 132, 255, 0.28), rgba(33, 46, 96, 0.15));
  border: 2px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 48px -26px rgba(5, 8, 23, 0.75);
  backdrop-filter: blur(12px);
}

.about-photo--one {
  top: 0;
  left: 12%;
  transform: rotate(-8deg);
}

.about-photo--two {
  top: 16%;
  right: 8%;
  transform: rotate(7deg);
}

.about-photo--three {
  bottom: -8%;
  left: 22%;
  transform: rotate(-3deg);
}

.about__content {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.about__subheading {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.text-highlight {
  color: #b7ccff;
  font-weight: 600;
}

.section__title {
  margin: 0;
  font-size: clamp(1.9rem, 1.6rem + 1.2vw, 2.4rem);
  letter-spacing: 0.01em;
}

.section__subtitle {
  margin: 0;
  color: var(--text-secondary);
  max-width: 800px;
}

.projects__list {
  display: flex;
  align-items: stretch;
  gap: 1.8rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scrollbar-width: thin;
  scroll-snap-type: x mandatory;
}

.projects__list::-webkit-scrollbar {
  height: 6px;
}

.projects__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}

.project-card {
  flex: 1;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  scroll-snap-align: start;
  backdrop-filter: blur(12px);
}

.project-card__cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(157, 213, 255, 0.4), rgba(88, 126, 255, 0.2));
  position: relative;
  overflow: hidden;
}

.project-card__cover::after {
  content: "Image Placeholder";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(245, 247, 255, 0.65);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.project-card__description {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.project-card__link {
  color: var(--github-link);
  font-weight: 500;
  width: fit-content;
}

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

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  backdrop-filter: blur(12px);
}

.contact-card__avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: linear-gradient(145deg, rgba(157, 213, 255, 0.4), rgba(88, 126, 255, 0.2));
  color: rgba(6, 8, 18, 0.8);
}

.contact-card__name {
  margin: 0.4rem 0 0;
  font-size: 1.1rem;
}

.contact-card__links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-card__link {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(155, 197, 255, 0.12);
  border: 1px solid rgba(155, 197, 255, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  color: var(--github-link);
}

.contact-card__link::before {
  content: "";
  width: 22px;
  height: 22px;
  background: currentColor;
  mask: var(--contact-icon) center/contain no-repeat;
  -webkit-mask: var(--contact-icon) center/contain no-repeat;
}

.contact-card__link--github {
  --contact-icon: url("../img/github.svg");
}

.contact-card__link--mail {
  --contact-icon: url("../img/mail.svg");
  color: #ffd480;
}

.contact-card__link--linkedin {
  --contact-icon: url("../img/linkedin.svg");
  color: #7ab8ff;
}

.contact-card__link:hover,
.contact-card__link:focus-visible {
  outline: none;
  transform: translateY(-2px) scale(1.05);
  background: rgba(155, 197, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 12px 24px rgba(5, 8, 23, 0.55);
  color: #fff;
}

.scroll-top {
  position: fixed;
  bottom: clamp(1.25rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 20, 40, 0.65);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 18px 32px -18px rgba(5, 8, 23, 0.9);
  backdrop-filter: blur(18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  z-index: 40;
}

.scroll-top:hover,
.scroll-top:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(8px);
}

.scroll-top--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.footer {
  padding: 2.5rem 6vw 3rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.footer__copy {
  margin: 0;
  letter-spacing: 0.04em;
}

@keyframes slow-drift {
  0%, 100% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  40% {
    transform: scale(1.08) translate3d(2vw, -1vw, 0);
  }
  70% {
    transform: scale(0.96) translate3d(-1vw, 2vw, 0);
  }
}

@media (max-width: 960px) {
  .about__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about__content {
    align-items: center;
  }

  .about__photos {
    width: min(80vw, 220px);
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 720px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 1.4rem;
  }

  .navbar__links {
    width: 100%;
    justify-content: space-between;
    font-size: 0.9rem;
  }

  .section {
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .hero__figure {
    width: 88vw;
  }

  .mascot {
    width: 72vw;
  }
}
