:root {
  --bg: #0d0f0f;
  --surface: #151817;
  --surface-2: #1d211f;
  --border: #303834;
  --text: #f2f0e8;
  --muted: #9a968a;
  --accent: #dfff4f;
  --accent-2: #68e8cf;
  --accent-3: #ff6b5f;
  --radius: 6px;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --gap: clamp(1.2rem, 5vw, 4rem);
  --max: 1240px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background:
    linear-gradient(180deg, rgba(104, 232, 207, .05), transparent 35rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.65;
  overflow-x: hidden;
}

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

::selection {
  background: var(--accent);
  color: #000;
}

.container {
  width: min(var(--max), 100% - var(--gap) * 2);
  margin-inline: auto;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding: 1.4rem 0;
  transition: background .35s, padding .35s, border-color .35s;
}

.nav.scrolled {
  background: rgba(13, 15, 15, .86);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  padding: .85rem 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav__logo,
.footer__logo {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: .08em;
  line-height: 1;
}

.nav__links,
.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav__links a,
.footer__links a,
.section__link {
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: color .25s;
}

.nav__links a:hover,
.footer__links a:hover,
.section__link:hover,
.btn-ghost:hover {
  color: var(--text);
}

.nav__cta,
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 2.75rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: #090a08;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.1;
  padding: .85rem 1.5rem;
  text-transform: uppercase;
  transition: transform .25s, box-shadow .25s, background .25s;
}

.nav__cta {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  min-height: auto;
  padding: .55rem 1.2rem;
}

.nav__cta:hover,
.btn-primary:hover {
  background: var(--accent);
  color: #090a08;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(223, 255, 79, .18);
}

.btn-ghost {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .25s, transform .25s;
}

.btn-ghost::after,
.section__link::after {
  content: ' ->';
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: .25rem;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform .3s, opacity .3s;
}

.nav__hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg);
}

.nav__mobile.open {
  display: flex;
}

.nav__mobile a {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 5.5rem);
  letter-spacing: .05em;
}

.hero {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100svh;
  overflow: hidden;
  padding-top: 7rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(242, 240, 232, .18) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
  opacity: .55;
}

.hero__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem;
  position: relative;
  z-index: 1;
}

.hero__eyebrow,
.section__number {
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .75rem;
  letter-spacing: .22em;
  margin-bottom: .75rem;
  text-transform: uppercase;
}

.hero__eyebrow::before,
.section__number::before {
  content: '';
  width: 2rem;
  height: 1px;
  background: currentColor;
}

.hero__title,
.section__title,
.cta-section__title {
  font-family: var(--font-display);
  letter-spacing: .02em;
  line-height: .94;
}

.hero__title {
  font-size: clamp(4.3rem, 14vw, 13rem);
  margin-bottom: 2.25rem;
  max-width: 11ch;
}

.hero__title .char,
.cta-section__title .char {
  display: inline-block;
}

.hero__title em,
.cta-section__title em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1px var(--accent-2);
}

.hero__desc {
  color: var(--muted);
  font-weight: 300;
  max-width: 48ch;
  margin-bottom: 2.5rem;
}

.hero__actions,
.cv-panel__actions,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .2em;
  padding-bottom: 2rem;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.hero__scroll-line {
  width: 2rem;
  height: 1px;
  background: var(--muted);
}

.hero__counter {
  position: absolute;
  right: -.2ch;
  top: 50%;
  transform: translateY(-50%);
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(7rem, 20vw, 22rem);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  writing-mode: vertical-rl;
  -webkit-text-stroke: 1px var(--border);
}

.marquee-wrap {
  background: var(--surface);
  border-block: 1px solid var(--border);
  overflow: hidden;
  padding: .95rem 0;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  white-space: nowrap;
}

.marquee-item {
  color: var(--muted);
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 2rem);
  letter-spacing: .1em;
}

.marquee-item span {
  color: var(--accent);
  margin-left: 3rem;
}

.section {
  padding-block: clamp(4.5rem, 10vw, 8rem);
}

.section__header,
.profile__grid,
.cv-panel {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--gap);
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section__title {
  font-size: clamp(2.8rem, 7vw, 6rem);
}

.profile,
.projects-section,
.cv-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.profile__copy {
  color: var(--muted);
  font-weight: 300;
  max-width: 58ch;
}

.profile__copy p + p {
  margin-top: 1.2rem;
}

.profile__stats {
  margin-top: clamp(2rem, 5vw, 4rem);
}

.stats-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.stats-list > div,
.skill-card,
.timeline__item,
.cv-panel {
  background: rgba(255, 255, 255, .025);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stats-list > div {
  padding: 1.4rem;
}

.stat__number {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 1;
}

.stat__label {
  color: var(--muted);
  font-size: .72rem;
  letter-spacing: .13em;
  line-height: 1.35;
  margin-top: .5rem;
  text-transform: uppercase;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.skill-card {
  min-height: 18rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .25s, transform .25s, background .25s;
}

.skill-card:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-4px);
}

.skill-card__num,
.timeline__item span {
  color: var(--accent-2);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.skill-card h3,
.timeline__item h3,
.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  letter-spacing: .04em;
  line-height: 1;
}

.skill-card p,
.timeline__item p,
.project-card__summary,
.cv-panel__content p,
.cta-section__sub {
  color: var(--muted);
  font-weight: 300;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.2rem;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  display: block;
  overflow: hidden;
}

.project-card:nth-child(1) {
  grid-column: span 6;
}

.project-card:nth-child(2),
.project-card:nth-child(3) {
  grid-column: span 3;
}

.project-card__img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.project-card__img::before,
.project-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
}

.project-card__img::before {
  background:
    linear-gradient(120deg, rgba(223, 255, 79, .2), transparent 45%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, transparent 1px 42px);
}

.project-card__img::after {
  background: radial-gradient(circle at 72% 30%, rgba(255, 255, 255, .36), transparent 10rem);
  mix-blend-mode: screen;
}

.project-card__img--ai {
  background: linear-gradient(135deg, #0e2622, #182a44 55%, #271d36);
}

.project-card__img--web {
  background: linear-gradient(135deg, #2b2610, #1f3b32 60%, #111a16);
}

.project-card__img--api {
  background: linear-gradient(135deg, #2e1517, #253248 60%, #101517);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 1.3rem;
  background: rgba(0, 0, 0, .42);
  opacity: 0;
  transition: opacity .3s;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__overlay-label {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: .08em;
}

.project-card__info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem;
}

.project-card__summary {
  font-size: .9rem;
  line-height: 1.55;
  margin-top: .45rem;
}

.project-card__tag {
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  flex-shrink: 0;
  font-size: .65rem;
  letter-spacing: .12em;
  padding: .3rem .65rem;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.timeline__item {
  padding: 1.5rem;
}

.timeline__item h3 {
  margin: 1.5rem 0 .75rem;
}

.cv-panel {
  align-items: center;
  margin-bottom: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.cv-panel::after {
  content: 'PDF';
  position: absolute;
  bottom: -.2em;
  right: -.05em;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(7rem, 18vw, 16rem);
  line-height: .8;
  opacity: .65;
  -webkit-text-stroke: 1px var(--border);
}

.cv-panel__content {
  position: relative;
  z-index: 1;
}

.cv-panel__content p {
  margin-bottom: 1.5rem;
  max-width: 52ch;
}

.cta-section {
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-section__title {
  font-size: clamp(3.3rem, 10vw, 9rem);
  margin-bottom: 2rem;
}

.cta-section__sub {
  margin: 0 auto 2rem;
  max-width: 48ch;
}

.contact-links {
  justify-content: center;
}

.cta-section__email {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer__copy {
  color: var(--muted);
  font-size: .75rem;
}

.reveal {
  opacity: 0;
}

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

.custom-cursor.is-hovering {
  width: 38px;
  height: 38px;
  background: rgba(223, 255, 79, .34);
}

@media (max-width: 980px) {
  .stats-list,
  .skills-grid,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card:nth-child(n) {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .section__header,
  .profile__grid,
  .cv-panel {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .stats-list,
  .skills-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .skill-card {
    min-height: 13rem;
  }

  .project-card:nth-child(n) {
    grid-column: span 12;
  }

  .project-card__info {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 2rem, var(--max));
  }

  .hero__title {
    font-size: clamp(3.7rem, 18vw, 5.3rem);
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }

  .footer__inner,
  .footer__links {
    align-items: flex-start;
    flex-direction: column;
  }
}
