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

:root {
  --bg: #0a0a08;
  --surface: #111110;
  --border: #2a2a26;
  --text: #e8e6df;
  --muted: #6b6960;
  --accent: #c8f060;
  --accent2: #f06040;
  --card-bg: #141412;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  cursor: none;
  overflow-x: hidden;
}

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

/* ── CURSOR ── */
.cursor {
  position: fixed;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease;
  transform: translate(-50%, -50%);
}
.cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transition:
    transform 0.35s ease,
    width 0.2s,
    height 0.2s,
    opacity 0.2s;
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9000;
  opacity: 0.4;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 8, 0.85);
  backdrop-filter: blur(12px);
  animation: navSlideDown 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes navSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-logo span {
  color: var(--accent);
}
.nav-logo:hover {
  color: var(--accent);
}

/* Desktop links */
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-links a:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: none;
  background: none;
  border: none;
  padding: 4px;
  z-index: 201;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition:
    transform 0.35s ease,
    opacity 0.25s ease,
    background 0.2s;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
  background: var(--accent);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
  background: var(--accent);
}

/* Mobile fullscreen menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 8, 0.97);
  backdrop-filter: blur(20px);
  z-index: 199;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.nav-mobile.open {
  opacity: 1;
  pointer-events: all;
}
.nav-mobile a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 12vw, 5rem);
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  opacity: 0;
  transform: translateY(20px);
  transition:
    color 0.2s,
    transform 0.4s ease,
    opacity 0.4s ease;
}
.nav-mobile.open a {
  opacity: 1;
  transform: translateY(0);
}
.nav-mobile.open a:nth-child(1) {
  transition-delay: 0.1s;
}
.nav-mobile.open a:nth-child(2) {
  transition-delay: 0.18s;
}
.nav-mobile.open a:nth-child(3) {
  transition-delay: 0.26s;
}
.nav-mobile.open a:nth-child(4) {
  transition-delay: 0.34s;
}
.nav-mobile a:hover {
  color: var(--accent);
  transform: translateX(8px) !important;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}
/* Animated grid bg */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(
    ellipse 70% 70% at 70% 50%,
    black 20%,
    transparent 75%
  );
  animation: gridPan 25s linear infinite;
  pointer-events: none;
}
@keyframes gridPan {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 60px 60px;
  }
}

.hero-left {
  padding-right: 3rem;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
  animation: fadeIn 0.6s 0.5s ease forwards;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 0;
  height: 1px;
  background: var(--accent);
  animation: lineGrow 0.8s 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes lineGrow {
  to {
    width: 2rem;
  }
}

.hero-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 10vw, 9rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.hero-name em {
  font-family: 'DM Serif Display', serif;
  font-style: italic;
  color: var(--accent);
}
/* Word-by-word reveal */
.hero-name .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  line-height: 1.05;
}
.hero-name .word span {
  display: inline-block;
  transform: translateY(110%);
  animation: wordReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-name .word:nth-child(1) span {
  animation-delay: 0.2s;
}
.hero-name .word:nth-child(2) span {
  animation-delay: 0.4s;
}
.hero-name .word:nth-child(3) span {
  animation-delay: 0.6s;
}
@keyframes wordReveal {
  to {
    transform: translateY(0);
  }
}

.hero-sub {
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 380px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeIn 0.7s 1s ease forwards;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--accent);
  color: var(--bg);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.9rem 1.8rem;
  font-weight: 500;
  opacity: 0;
  animation: fadeIn 0.7s 1.2s ease forwards;
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  transform: translateX(-110%) skewX(-15deg);
  transition: transform 0.5s ease;
}
.hero-cta:hover::before {
  transform: translateX(110%) skewX(-15deg);
}
.hero-cta:hover {
  background: #d4ff70;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(200, 240, 96, 0.25);
}
.hero-cta svg {
  transition: transform 0.2s;
}
.hero-cta:hover svg {
  transform: translateX(4px);
}

.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  animation: slideInRight 0.9s 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat-cell {
  background: var(--surface);
  padding: 1.8rem;
  transition:
    background 0.3s,
    transform 0.3s;
  position: relative;
  overflow: hidden;
}
.stat-cell::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-cell:hover {
  background: var(--card-bg);
  transform: translateY(-2px);
}
.stat-cell:hover::after {
  width: 100%;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: var(--text);
  line-height: 1;
  transition: color 0.2s;
}
.stat-cell:hover .stat-num {
  color: var(--accent);
}
.stat-num span {
  color: var(--accent);
}
.stat-label {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s 1.6s ease forwards;
}
.scroll-indicator::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollBar 2s 1.6s ease infinite;
}
@keyframes scrollBar {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 1;
  }
  49% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }
  50% {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 1;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0;
  }
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

/* ── SECTION COMMONS ── */
section {
  padding: 6rem 3rem;
}
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.section-num {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: 0.04em;
  color: var(--text);
}
.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}
.section-header.visible .section-line {
  transform: scaleX(1);
}

/* ── SCROLL ANIMATION CLASSES ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-left {
  opacity: 0;
  transform: translateX(-32px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-right {
  opacity: 0;
  transform: translateX(32px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible,
.fade-left.visible,
.fade-right.visible {
  opacity: 1;
  transform: none;
}

/* ── ABOUT ── */
#about {
  background: var(--surface);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(auto, 360px) 1.4fr;
  gap: 5rem;
  align-items: start;
}
.about-portrait {
  aspect-ratio: 3/4;
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s ease;
}
.about-portrait:hover img {
  transform: scale(1.04);
}
.about-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  transform: translate(10px, 10px);
  pointer-events: none;
  transition: transform 0.4s ease;
}
.about-portrait:hover::after {
  transform: translate(5px, 5px);
}

.about-bio {
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}
.about-bio strong {
  color: var(--text);
  font-weight: 500;
}

/* ── PROJECTS ── */
#projects {
  background: var(--bg);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
}
.project-card {
  background: var(--card-bg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition:
    background 0.3s,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: default;
}
.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
/* Top border sweep on hover */
.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover::after {
  width: 100%;
}
.project-card:hover::before {
  opacity: 0.04;
}
.project-card:hover {
  background: #18181530;
  transform: translateY(-5px);
}

.project-num {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.15em;
}
.project-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--text);
  line-height: 1.2;
  transition: color 0.2s;
}
.project-card:hover .project-title {
  color: var(--accent);
}
.project-desc {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.7;
  flex: 1;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.project-tag {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.2rem 0.55rem;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.project-card:hover .project-tag {
  border-color: rgba(200, 240, 96, 0.3);
  color: rgba(200, 240, 96, 0.7);
}
.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}
.project-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.status-dot.planned {
  background: var(--muted);
}
.status-dot.wip {
  background: var(--accent2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.project-link {
  color: var(--accent);
  font-size: 0.7rem;
  text-decoration: none;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition:
    gap 0.2s,
    letter-spacing 0.2s;
  position: relative;
  z-index: 10;
}
.project-link:hover {
  gap: 0.7rem;
  letter-spacing: 0.16em;
}

/* ── SKILLS ── */
#skills {
  background: var(--surface);
}
.skills-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.skill-group-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 1.2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-group-title span {
  color: var(--accent);
}
.skill-item {
  display: flex;
  align-items: center;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid rgba(42, 42, 38, 0.5);
  font-size: 0.78rem;
  transition:
    background 0.2s,
    padding-left 0.25s ease,
    color 0.2s;
  border-radius: 2px;
  gap: 0.5rem;
}
.skill-item::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0);
  transition:
    opacity 0.2s,
    transform 0.2s;
}
.skill-item:hover {
  background: rgba(200, 240, 96, 0.05);
  padding-left: 0.8rem;
  color: var(--text);
}
.skill-item:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* ── CONTACT ── */
#contact {
  background: var(--bg);
}
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.contact-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
}
.contact-headline em {
  color: var(--accent);
  font-style: italic;
  font-family: 'DM Serif Display', serif;
}
.contact-sub {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--border);
  transition:
    color 0.2s,
    border-color 0.2s,
    padding-left 0.3s,
    background 0.2s;
  position: relative;
  overflow: hidden;
}
.contact-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}
.contact-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  padding-left: 1.6rem;
  background: rgba(200, 240, 96, 0.03);
}
.contact-link:hover::before {
  transform: scaleY(1);
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover {
  color: var(--accent);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav {
    padding: 1.2rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-mobile {
    display: flex;
  }
  .scroll-indicator {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 7rem 1.5rem 4rem;
  }
  .hero-left {
    padding-right: 0;
    margin-bottom: 3rem;
  }
  .hero::after {
    mask-image: none;
    opacity: 0.12;
  }

  section {
    padding: 4rem 1.5rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .skills-cols {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  footer {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  body {
    cursor: auto;
  }
  .cursor,
  .cursor-ring {
    display: none;
  }
}
@media (max-width: 560px) {
  .skills-cols {
    grid-template-columns: 1fr;
  }
  .hero-name {
    font-size: clamp(3.5rem, 16vw, 6rem);
  }
  nav {
    padding: 1rem 1.2rem;
  }
}
