:root {
  --bg: #f2f5ff;
  --surface: #ffffff;
  --surface-strong: #0f1638;
  --surface-dark: #080d25;
  --text: #10162f;
  --muted: #59627c;
  --line: rgba(16, 22, 47, 0.1);
  --blue: #3157ff;
  --violet: #6a33ff;
  --cyan: #67d4ff;
  --gold: #ffcd4d;
  --shadow: 0 24px 80px rgba(38, 55, 122, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at 15% 20%, rgba(103, 212, 255, 0.22), transparent 24%),
    radial-gradient(circle at 80% 10%, rgba(106, 51, 255, 0.14), transparent 24%),
    linear-gradient(180deg, #fefeff 0%, var(--bg) 100%);
}

main {
  display: grid;
  gap: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(49, 87, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 87, 255, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black 35%, transparent 90%);
}

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

p,
ul,
h1,
h2,
h3 {
  margin: 0;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(40, 56, 120, 0.1);
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nav a {
  position: relative;
  font-size: 0.96rem;
  font-weight: 700;
  color: #1c2550;
  transition:
    color 180ms ease,
    transform 180ms ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  transition: transform 180ms ease;
}

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

.nav a:hover,
.nav a:focus-visible {
  color: var(--blue);
  transform: translateY(-2px);
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr);
  gap: 40px;
  align-items: center;
  padding: 88px 10px 72px;
  animation: heroRise 900ms ease both;
}

.kicker,
.section-title p {
  margin-bottom: 10px;
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  max-width: 11ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(3.4rem, 7vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

h1 span {
  color: #f08a28;
}

.hero-text {
  max-width: 60ch;
  margin-top: 22px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-actions,
.social-row,
.footer-links,
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 800;
  transition:
    transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1.2),
    box-shadow 220ms cubic-bezier(0.2, 0.9, 0.2, 1.2),
    border-color 180ms ease,
    background-position 260ms ease;
  will-change: transform, box-shadow;
}

.button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 90%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 35%,
    rgba(255, 255, 255, 0.46) 50%,
    transparent 65%
  );
  transform: skewX(-20deg);
  transition: left 420ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-8px) scale(1.07);
}

.button:hover::after,
.button:focus-visible::after {
  left: 140%;
}

.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 16px 36px rgba(80, 74, 205, 0.28);
}

.primary:hover,
.primary:focus-visible {
  box-shadow:
    0 30px 54px rgba(80, 74, 205, 0.42),
    0 0 0 6px rgba(106, 51, 255, 0.12);
}

.secondary {
  border-color: rgba(49, 87, 255, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.secondary:hover,
.secondary:focus-visible {
  border-color: rgba(49, 87, 255, 0.3);
  box-shadow:
    0 26px 46px rgba(49, 87, 255, 0.18),
    0 0 0 6px rgba(49, 87, 255, 0.08);
}

.social-row {
  margin-top: 24px;
}

.social-row a,
.footer-links a,
.contact-list a,
.contact-list span {
  padding: 10px 14px;
  border: 1px solid rgba(49, 87, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #1f2954;
  font-size: 0.94rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.social-row a:hover,
.footer-links a:hover,
.contact-list a:hover {
  transform: translateY(-3px);
  border-color: rgba(49, 87, 255, 0.28);
  box-shadow: 0 14px 30px rgba(49, 87, 255, 0.12);
}

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

.avatar-card {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  animation: floaty 6s ease-in-out infinite;
}

.avatar-card::before,
.avatar-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.avatar-card::before {
  inset: 10%;
  background: radial-gradient(circle at 30% 30%, #ffe48b, #ffbf2f);
  box-shadow: 0 24px 60px rgba(255, 188, 46, 0.28);
}

.avatar-card::after {
  inset: 0;
  border: 1px dashed rgba(49, 87, 255, 0.18);
  animation: spin 18s linear infinite;
}

.avatar-ring {
  position: relative;
  z-index: 1;
  width: 72%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.14);
}

.avatar-core {
  width: 78%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #0f1638, #203178);
  box-shadow: 0 20px 45px rgba(14, 21, 58, 0.35);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.08);
}

.floating-tag {
  position: absolute;
  z-index: 2;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  color: #1f2954;
  font-size: 0.9rem;
  font-weight: 800;
  animation: floatTag 4.8s ease-in-out infinite;
}

.top-tag {
  top: 12%;
  right: 6%;
}

.bottom-tag {
  bottom: 14%;
  left: 2%;
  animation-delay: 1.4s;
}

.content-section {
  padding: 72px 10px 0;
}

.section-title {
  max-width: 720px;
}

.section-title.centered {
  margin: 0 auto;
  text-align: center;
}

.section-title.light p,
.section-title.light h2 {
  color: #ffffff;
}

h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.feature-card {
  position: relative;
  grid-column: span 6;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}

.feature-card.compact {
  grid-column: span 3;
}

.feature-card h3,
.timeline-card h3,
.project-card h3,
.info-panel h3,
.contact-panel h3,
.footer h3,
.skill-card h3 {
  margin-bottom: 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.feature-card p,
.timeline-card p,
.project-card li,
.info-panel li,
.contact-panel p,
.footer p,
.skill-card p,
.project-stack,
.timeline-card span {
  color: var(--muted);
  line-height: 1.7;
}

.feature-card:hover,
.skill-card:hover,
.timeline-card:hover,
.project-card:hover,
.info-panel:hover,
.contact-panel:hover,
.contact-form:hover {
  transform:
    perspective(900px)
    translateY(-8px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  box-shadow: 0 28px 70px rgba(38, 55, 122, 0.18);
}

.feature-card::before,
.skill-card::before,
.timeline-card::before,
.project-card::before,
.info-panel::before,
.contact-panel::before,
.contact-form::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(255, 255, 255, 0.42), transparent 34%);
  transition: opacity 220ms ease;
}

.feature-card:hover::before,
.skill-card:hover::before,
.timeline-card:hover::before,
.project-card:hover::before,
.info-panel:hover::before,
.contact-panel:hover::before,
.contact-form:hover::before {
  opacity: 1;
}

.skill-section,
.project-band,
.footer {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
}

.skill-section,
.project-band {
  margin-top: 72px;
  padding: 72px 28px;
}

.skill-section {
  background:
    radial-gradient(circle at top right, rgba(255, 205, 77, 0.25), transparent 24%),
    linear-gradient(135deg, #5d19db, #29155f 68%);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.skill-card {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  background: rgba(7, 12, 34, 0.78);
  color: #ffffff;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}

.skill-card p {
  color: rgba(255, 255, 255, 0.82);
}

.skill-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.timeline {
  position: relative;
  display: grid;
  gap: 22px;
  max-width: 920px;
  margin: 34px auto 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 150px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background: linear-gradient(180deg, var(--blue), var(--violet));
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  padding: 28px 28px 28px 40px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 136px;
  top: 36px;
  width: 24px;
  height: 24px;
  border: 5px solid #ffffff;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 6px 18px rgba(49, 87, 255, 0.2);
}

.timeline-year {
  position: relative;
  z-index: 1;
  padding-right: 18px;
  font-weight: 800;
  color: var(--blue);
}

.project-band {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 205, 77, 0.16), transparent 20%),
    linear-gradient(180deg, #080d25, #111a48);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.project-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  backdrop-filter: blur(10px);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}

.project-card.featured {
  grid-column: span 2;
}

.project-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.project-header span,
.project-header a,
.project-stack {
  color: rgba(255, 255, 255, 0.76);
}

.project-card ul,
.info-panel ul {
  padding-left: 18px;
  margin-top: 16px;
}

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

.info-panel,
.contact-panel,
.contact-form {
  position: relative;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  transition:
    transform 220ms ease,
    box-shadow 220ms ease;
  transform:
    perspective(900px)
    rotateX(var(--tilt-x, 0deg))
    rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  margin-top: 28px;
}

.contact-list {
  margin-top: 24px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.contact-form span {
  color: #233060;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(24, 39, 92, 0.14);
  border-radius: 18px;
  background: #f7f9ff;
  color: var(--text);
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 72px;
  padding: 34px 28px;
  background:
    radial-gradient(circle at top right, rgba(106, 51, 255, 0.18), transparent 24%),
    linear-gradient(180deg, #090f28, #080d25);
  color: #ffffff;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.footer p {
  color: rgba(255, 255, 255, 0.74);
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes floatTag {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

body.has-motion .section-title,
body.has-motion .feature-card,
body.has-motion .skill-card,
body.has-motion .timeline-card,
body.has-motion .project-card,
body.has-motion .info-panel,
body.has-motion .contact-panel,
body.has-motion .contact-form,
body.has-motion .footer {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 700ms ease,
    transform 700ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}

body.has-motion .in-view {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1080px) {
  .hero-section,
  .contact-layout,
  .split-layout,
  .project-grid,
  .skill-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-visual {
    order: 0;
  }

  .feature-card,
  .feature-card.compact,
  .project-card.featured {
    grid-column: span 6;
  }
}

@media (max-width: 800px) {
  .site-shell {
    padding-inline: 14px;
  }

  .topbar,
  .footer,
  .project-grid,
  .skill-grid,
  .contact-layout,
  .split-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    gap: 12px;
  }

  .hero-section,
  .content-section,
  .skill-section,
  .project-band {
    padding-left: 4px;
    padding-right: 4px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .feature-card.compact {
    grid-column: auto;
  }

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

  .timeline-card {
    grid-template-columns: 1fr;
    padding: 28px 22px 24px 54px;
  }

  .timeline-card::before {
    left: 8px;
  }

  .timeline-year {
    padding-right: 0;
  }

  .floating-tag {
    font-size: 0.82rem;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 16px;
  }

  h1 {
    font-size: 2.9rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .hero-text,
  .feature-card p,
  .timeline-card p,
  .project-card li,
  .info-panel li,
  .contact-panel p,
  .footer p,
  .skill-card p {
    font-size: 0.96rem;
  }

  .avatar-card {
    width: min(100%, 320px);
  }

  .top-tag {
    right: -4%;
  }

  .bottom-tag {
    left: -4%;
  }
}
