:root {
  --bg: #06050c;
  --bg-elevated: #0f0b1d;
  --card-bg: rgba(24, 18, 43, 0.74);
  --text: #f3efff;
  --text-soft: #cfc5ea;
  --muted: #9e92c3;
  --accent: #8b5cf6;
  --accent-2: #a855f7;
  --accent-3: #c084fc;
  --border: rgba(170, 138, 255, 0.25);
  --shadow: 0 14px 34px rgba(5, 3, 12, 0.56);
  --glow-soft: 0 0 0 1px rgba(180, 141, 255, 0.2), 0 10px 30px rgba(155, 105, 255, 0.15);
  --header-bg: rgba(12, 9, 23, 0.78);
  --chip-bg: rgba(28, 20, 52, 0.8);
  --surface-alt: rgba(34, 25, 60, 0.62);
  --surface-alt-hover: rgba(44, 32, 76, 0.86);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 12% 12%, rgba(169, 114, 255, 0.2) 0%, transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(146, 88, 255, 0.13) 0%, transparent 36%),
    var(--bg);
  line-height: 1.65;
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, 91.5%);
  margin-inline: auto;
}

.section {
  padding: clamp(4.8rem, 8vw, 7.5rem) 0;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.3rem);
  margin: 0 0 1.8rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero {
  min-height: 95vh;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  padding-top: clamp(6rem, 11vh, 8.5rem);
  padding-bottom: clamp(4.2rem, 7.5vh, 6.4rem);
  isolation: isolate;
  background:
    radial-gradient(1200px 520px at 50% -14%, rgba(157, 102, 255, 0.36) 0%, rgba(157, 102, 255, 0.13) 38%, transparent 70%),
    linear-gradient(165deg, rgba(108, 70, 220, 0.22) 0%, rgba(52, 30, 108, 0.08) 48%, transparent 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(680px 340px at 50% 18%, rgba(182, 126, 255, 0.2) 0%, transparent 72%);
  opacity: 0.85;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  text-align: center;
}

.eyebrow {
  color: #cfb6ff;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}

.hero h1 {
  font-size: clamp(2.7rem, 7.2vw, 5.1rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0.18rem 0 1.15rem;
  text-wrap: balance;
  text-shadow: 0 8px 26px rgba(114, 72, 225, 0.31);
}

.lead {
  max-width: 740px;
  color: var(--muted);
  font-size: clamp(1.06rem, 2.5vw, 1.26rem);
  line-height: 1.75;
  font-weight: 500;
  margin: 0 auto;
  text-wrap: balance;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.76rem 1.34rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease,
    border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 10px 24px rgba(137, 88, 246, 0.36);
}

.btn-primary:hover {
  box-shadow: 0 16px 26px rgba(146, 96, 252, 0.46);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--surface-alt);
  box-shadow: inset 0 0 0 1px rgba(188, 151, 255, 0.08);
}

.btn-secondary:hover {
  border-color: rgba(151, 132, 255, 0.55);
  background: var(--surface-alt-hover);
}

.hero-glow {
  position: absolute;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  filter: blur(110px);
  z-index: 1;
  opacity: 0.34;
}

.hero-glow-one {
  top: -140px;
  left: -115px;
  background: #9d58ff;
}

.hero-glow-two {
  right: -125px;
  bottom: 24px;
  background: #b168ff;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.projects-block + .projects-block {
  margin-top: 2.3rem;
}

.projects-subtitle {
  margin: 0 0 1rem;
  font-size: 1.24rem;
  letter-spacing: -0.01em;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.skills-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.4rem 1.35rem 1.28rem;
  backdrop-filter: blur(8px);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease,
    background 220ms ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(178, 141, 255, 0.54);
  box-shadow: var(--glow-soft);
}

.about-card {
  position: relative;
  overflow: hidden;
  padding: 1.8rem 1.7rem 1.65rem;
  border-color: rgba(183, 146, 255, 0.34);
  box-shadow: 0 0 0 1px rgba(178, 141, 255, 0.12), 0 14px 30px rgba(70, 38, 126, 0.2);
}

.about-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(198, 155, 255, 0.45), rgba(163, 108, 255, 0.08));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.about-card:hover {
  transform: translateY(-6px);
  border-color: rgba(198, 155, 255, 0.52);
  box-shadow: 0 0 0 1px rgba(198, 155, 255, 0.2), 0 18px 34px rgba(110, 61, 192, 0.24);
}

.about-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.about-points li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-soft);
  font-size: 1.03rem;
  line-height: 1.78;
}

.about-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(160, 116, 255, 0.13);
}

.project-label {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 0.45rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e8dcff;
  border-radius: 999px;
  border: 1px solid rgba(191, 158, 255, 0.45);
  background: rgba(151, 112, 255, 0.18);
}

.project-card h3,
.skill-card h3 {
  margin: 0 0 0.58rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.project-card p,
.skill-card p,
.contact-card p {
  color: var(--text-soft);
  margin-top: 0;
}

.project-card p {
  margin-bottom: 0;
  flex: 1 1 auto;
}

.project-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 1px rgba(198, 160, 255, 0.2), 0 18px 34px rgba(93, 53, 173, 0.2);
}

.tech-stack-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  align-content: flex-start;
  margin-top: 0.85rem;
  margin-bottom: 1rem;
}

.tech-badge {
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  color: #e8deff;
  border: 1px solid rgba(191, 158, 255, 0.32);
  background: rgba(151, 112, 255, 0.12);
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}

.filter-btn:hover {
  border-color: rgba(151, 122, 255, 0.5);
}

.filter-btn.active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px rgba(120, 93, 245, 0.28);
}

.project-card.is-hidden {
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
}

.project-card {
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease,
    opacity 180ms ease;
}

.project-card.filter-out {
  opacity: 0;
  transform: scale(0.985);
}

.project-card.filter-in {
  opacity: 1;
  transform: scale(1);
}

.project-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: auto;
}

.project-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.42rem 0.86rem;
  border: 1px solid transparent;
  font-size: 0.84rem;
  font-weight: 600;
  margin-top: 1rem;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease,
    background 170ms ease;
}

.project-btn:hover {
  transform: translateY(-2px);
}

.project-btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--accent), var(--accent-2), var(--accent-3));
  box-shadow: 0 8px 16px rgba(142, 93, 251, 0.34);
}

.project-btn-secondary {
  color: var(--text);
  border-color: rgba(191, 158, 255, 0.38);
  background: rgba(142, 93, 251, 0.12);
}

.project-btn-secondary:hover {
  background: rgba(142, 93, 251, 0.2);
}

.other-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.other-project-card {
  padding: 1.1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.other-project-card--scraper {
  padding: 1.25rem 1.2rem 1.15rem;
}

.other-project-card--ai {
  padding: 1.24rem 1.2rem 1.15rem;
  border-color: rgba(186, 148, 255, 0.36);
  box-shadow: 0 0 0 1px rgba(176, 137, 255, 0.12), 0 12px 26px rgba(84, 48, 152, 0.2);
}

.other-project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.other-project-label {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 0.42rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e0d4ff;
  border-radius: 999px;
  border: 1px solid rgba(191, 158, 255, 0.4);
  background: rgba(120, 86, 200, 0.22);
}

.other-project-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
}

.other-project-label--ai {
  background: rgba(132, 92, 221, 0.28);
  border-color: rgba(196, 163, 255, 0.5);
}

.other-project-desc {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.68;
}

.sample-extract {
  margin: 0;
  padding: 0.72rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(170, 138, 255, 0.22);
  background: rgba(34, 24, 58, 0.55);
}

.sample-extract-heading {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.sample-extract-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.sample-extract-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.sample-key {
  flex: 0 0 auto;
  min-width: 3.4rem;
  font-weight: 600;
  font-size: 0.78rem;
  color: #c9b8f0;
}

.sample-value-muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.other-project-csv-note {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.58;
  color: var(--muted);
}

.other-tech-badges {
  margin: 0;
  margin-top: 0.1rem;
}

.other-project-card h4 {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.tech-stack-mini {
  margin: 0 0 0.85rem;
  flex: 1 1 auto;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.contact-links a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text-soft);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.contact-links a:hover {
  border-color: rgba(151, 132, 255, 0.52);
  background: var(--surface-alt-hover);
  color: var(--text);
}

.site-footer {
  border-top: 1px solid rgba(170, 138, 255, 0.2);
}

.footer-inner {
  min-height: 72px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 180ms ease, transform 180ms ease;
}

.cursor-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(190, 155, 255, 0.55);
  background: rgba(164, 108, 255, 0.08);
}

body.cursor-active .cursor-dot,
body.cursor-active .cursor-ring {
  opacity: 1;
}

body.cursor-hover .cursor-ring {
  border-color: rgba(208, 173, 255, 0.75);
  background: rgba(170, 116, 255, 0.14);
}

@media (max-width: 980px) {
  .section {
    padding: clamp(4.1rem, 7vw, 6rem) 0;
  }

  .featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .other-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .projects-grid,
  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .projects-grid,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .other-projects-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 82vh;
    padding-top: clamp(4.3rem, 10vh, 5.6rem);
  }

  .hero h1 {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
  }

  .lead {
    line-height: 1.68;
  }

  .section-title {
    margin-bottom: 1.45rem;
  }

  .about-card {
    padding: 1.3rem 1.12rem 1.18rem;
  }

  .about-points {
    gap: 0.78rem;
  }

  .about-points li {
    font-size: 0.98rem;
    line-height: 1.7;
  }
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) {
  body,
  a,
  button,
  .card {
    cursor: none;
  }
}
