:root {
  color-scheme: dark;
  --bg: #090b10;
  --bg-soft: #111720;
  --panel: rgba(18, 24, 34, 0.78);
  --panel-strong: #151c27;
  --text: #f5f7fb;
  --muted: #a9b3c4;
  --line: rgba(255, 255, 255, 0.12);
  --teal: #45d7bd;
  --amber: #f2b35d;
  --violet: #a98cff;
  --rose: #f0728b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, rgba(69, 215, 189, 0.08), transparent 36%),
    linear-gradient(240deg, rgba(242, 179, 93, 0.07), transparent 34%);
  opacity: 0.84;
  z-index: -2;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.site-header.is-scrolled {
  background: rgba(9, 11, 16, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand,
.site-nav,
.hero-actions,
.project-top,
.split-heading,
.site-footer,
.contact-panel {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.72rem;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(69, 215, 189, 0.5);
  border-radius: 50%;
  background: rgba(69, 215, 189, 0.11);
  color: var(--teal);
}

.site-nav {
  gap: 1.6rem;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a {
  position: relative;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.42rem;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--teal);
  transition: transform 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 96vh;
  display: grid;
  align-items: center;
  padding: 9rem 6vw 6rem;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(199, 112, 240, 0.14), transparent 34%),
    linear-gradient(315deg, rgba(69, 215, 189, 0.09), transparent 28%),
    linear-gradient(180deg, rgba(18, 13, 31, 0.78), var(--bg) 74%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.hero-content {
  width: min(760px, 100%);
}

.hero-figure {
  justify-self: end;
  width: min(530px, 100%);
  filter: drop-shadow(0 28px 70px rgba(0, 0, 0, 0.42));
  animation: floatFigure 6s ease-in-out infinite;
}

.hero-figure img {
  width: 100%;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.35rem;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.12rem;
  line-height: 1.2;
}

.hero-copy {
  max-width: 650px;
  color: #d6deeb;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.dynamic-line {
  min-height: 2.4rem;
  margin-bottom: 1.15rem;
  color: #f1e9ff;
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  font-weight: 800;
}

.dynamic-line span[data-dynamic-role] {
  color: var(--violet);
}

.typing-caret {
  display: inline-block;
  width: 3px;
  height: 1.05em;
  margin-left: 0.18rem;
  transform: translateY(0.15em);
  background: var(--teal);
  animation: blink 900ms steps(2, start) infinite;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.78rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

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

.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--teal), var(--amber));
  color: #071014;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary {
  margin-top: 2rem;
  background: rgba(69, 215, 189, 0.1);
  color: var(--teal);
}

.scroll-cue {
  position: absolute;
  left: 6vw;
  bottom: 2rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
}

.section {
  padding: 6.5rem 6vw;
}

.section-heading {
  width: min(980px, 100%);
  margin-bottom: 2.4rem;
}

.band {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border-block: 1px solid var(--line);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.45fr) minmax(280px, 0.8fr);
  gap: 2rem;
  align-items: center;
}

.about-copy {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.stats,
.skill-grid,
.project-grid {
  display: grid;
  gap: 1rem;
}

.about-avatar {
  justify-self: center;
  width: min(240px, 100%);
  padding: 1rem;
}

.about-avatar img {
  width: 100%;
}

.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.stats div {
  padding: 1.35rem;
}

.stats strong {
  display: block;
  color: var(--amber);
  font-size: 1.75rem;
  line-height: 1;
}

.stats span,
.skill-card p,
.project-card p,
.timeline-item p {
  color: var(--muted);
}

.skill-grid,
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card,
.project-card {
  padding: 1.35rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.skill-card:hover,
.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(69, 215, 189, 0.42);
  background: rgba(23, 31, 43, 0.9);
}

.skill-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: rgba(240, 114, 139, 0.12);
  color: var(--rose);
  font-weight: 800;
}

.split-heading {
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.text-link {
  color: var(--teal);
  font-weight: 800;
}

.project-card.featured {
  border-color: rgba(242, 179, 93, 0.42);
  background: linear-gradient(145deg, rgba(242, 179, 93, 0.12), rgba(21, 28, 39, 0.88));
}

.project-top {
  justify-content: space-between;
  margin-bottom: 2.4rem;
  color: var(--teal);
  font-weight: 800;
}

.project-top a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

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

.tags span {
  padding: 0.34rem 0.58rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d9e2ef;
  font-size: 0.78rem;
}

.resume-section {
  background: #0b1017;
}

.timeline {
  display: grid;
  gap: 1rem;
  max-width: 920px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  padding: 1.35rem;
}

.timeline-date {
  color: var(--amber);
  font-weight: 800;
}

.contact-section {
  padding-bottom: 4rem;
}

.contact-panel {
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.4rem, 4vw, 3rem);
}

.contact-panel h2 {
  max-width: 760px;
}

.contact-links {
  display: grid;
  gap: 0.85rem;
  min-width: min(330px, 100%);
}

.contact-links a {
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.contact-links a:hover,
.contact-links a:focus-visible {
  color: var(--text);
  border-color: var(--teal);
}

.site-footer {
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 6vw 2.2rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 72px;
    left: 1rem;
    right: 1rem;
    display: grid;
    gap: 0;
    padding: 0.6rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(13, 18, 27, 0.96);
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
  }

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

  .site-nav a {
    padding: 0.86rem;
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    min-height: 92vh;
    padding-top: 8rem;
  }

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

  .hero-figure {
    justify-self: center;
    width: min(430px, 88vw);
    order: -1;
    opacity: 0.92;
  }

  .about-grid,
  .skill-grid,
  .project-grid,
  .contact-panel {
    grid-template-columns: 1fr;
  }

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

  .contact-panel {
    display: grid;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 64px;
  }

  .site-nav {
    top: 64px;
  }

  .section {
    padding: 4.6rem 1rem;
  }

  .hero {
    padding: 7rem 1rem 5rem;
  }

  h1 {
    font-size: clamp(2.55rem, 16vw, 4.4rem);
  }

  .timeline-item,
  .split-heading,
  .site-footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .timeline-item {
    gap: 0.35rem;
  }

  .button {
    width: 100%;
  }
}

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

@keyframes blink {
  50% {
    opacity: 0;
  }
}

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

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