
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

:root {
  --background: #080808;
  --foreground: #f3f3ed;
  --muted: #858581;
  --accent: #c8ff3d;
  --line: rgba(243, 243, 237, 0.15);
}

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

html {
  scroll-behavior: auto;
  background: var(--background);
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
  cursor: none;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

#loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--background);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#loader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader-number {
  font-family: "DM Mono", monospace;
  font-size: 5rem;
  color: var(--accent);
}

.loader-line {
  width: 180px;
  height: 1px;
  background: var(--line);
  overflow: hidden;
}

.loader-line::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent);
  transform: translateX(-100%);
  animation: loading 1.5s ease forwards;
}

#loader p {
  font-family: "DM Mono", monospace;
  color: var(--muted);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
}

@keyframes loading {
  to {
    transform: translateX(0);
  }
}

#space {
  position: fixed;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
}

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

.cursor,
.cursor-outline {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  border-radius: 50%;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}

.cursor {
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.cursor-outline {
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent);
  transition:
    width 0.3s ease,
    height 0.3s ease,
    background 0.3s ease;
}

.cursor-outline.large {
  width: 75px;
  height: 75px;
  background: rgba(200, 255, 61, 0.06);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 5vw;
  mix-blend-mode: difference;
}

.logo {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.logo span {
  color: var(--accent);
}

.navbar nav {
  display: flex;
  gap: 35px;
}

.navbar nav a,
.nav-contact {
  font-family: "DM Mono", monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--foreground);
  transition: color 0.3s ease;
}

.navbar nav a:hover,
.nav-contact:hover {
  color: var(--accent);
}

.nav-contact {
  border-bottom: 1px solid var(--foreground);
  padding-bottom: 5px;
}

#scroll-space {
  position: relative;
  height: 500vh;
}

.scroll-anchor {
  height: 100vh;
  pointer-events: none;
}

#world {
  position: fixed;
  inset: 0;
  z-index: 10;
  perspective: 1800px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  pointer-events: none;
}

#stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.scene-panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 150px 8vw 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-style: preserve-3d;
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
  backface-visibility: hidden;
  pointer-events: none;
}

.scene-panel.active {
  pointer-events: auto;
}

.panel-number {
  position: absolute;
  top: 145px;
  left: 5vw;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
}

.panel-footer {
  position: absolute;
  left: 5vw;
  right: 5vw;
  bottom: 30px;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.eyebrow {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.16em;
  margin-bottom: 30px;
}

.hero-content {
  max-width: 1000px;
  transform: translateZ(80px);
}

h1,
h2 {
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

h1 {
  font-size: clamp(4rem, 10vw, 10rem);
  max-width: 1100px;
}

h1 span,
h2 span {
  display: block;
  color: var(--accent);
  font-style: italic;
}

.hero-description {
  max-width: 420px;
  margin-top: 45px;
  margin-left: 8px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 35px;
  margin-top: 40px;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 35px;
  padding: 17px 23px;
  color: var(--background);
  background: var(--accent);
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  transition: transform 0.3s ease;
}

.button:hover {
  transform: scale(1.05);
}

.text-link {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--muted);
  padding-bottom: 8px;
}

.hero-side {
  position: absolute;
  right: 9vw;
  bottom: 25%;
  text-align: right;
}

.hero-side p {
  font-family: "DM Mono", monospace;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.8;
  letter-spacing: 0.1em;
}

.orbit {
  width: 180px;
  height: 180px;
  border: 1px solid rgba(200, 255, 61, 0.4);
  border-radius: 50%;
  margin-bottom: 30px;
  animation: orbit 15s linear infinite;
  position: relative;
}

.orbit::before,
.orbit::after {
  content: "";
  position: absolute;
  inset: 25px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.orbit::after {
  inset: 60px;
  background: var(--accent);
  box-shadow: 0 0 50px rgba(200, 255, 61, 0.4);
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

.section-content {
  width: 100%;
  max-width: 1250px;
  margin: auto;
}

h2 {
  font-size: clamp(3.2rem, 7vw, 8rem);
  max-width: 950px;
  margin-bottom: 60px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.7fr;
  gap: 100px;
  max-width: 950px;
}

.large-text {
  font-size: clamp(1.4rem, 2.5vw, 2.3rem);
  line-height: 1.25;
  letter-spacing: -0.04em;
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 25px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  min-height: 280px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.7);
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    transform 0.3s ease;
}

.project-card:hover {
  border-color: var(--accent);
  background: rgba(200, 255, 61, 0.04);
}

.project-top,
.project-bottom {
  display: flex;
  justify-content: space-between;
  font-family: "DM Mono", monospace;
  font-size: 0.6rem;
  color: var(--muted);
}

.project-card h3 {
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  margin: 25px 0 15px;
}

.project-card p {
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--muted);
}

.project-bottom {
  color: var(--accent);
  margin-top: 25px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.skill-group {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.skill-group span {
  font-family: "DM Mono", monospace;
  color: var(--accent);
  font-size: 0.65rem;
}

.skill-group h3 {
  font-size: 1.5rem;
  margin: 25px 0;
  font-weight: 500;
}

.skill-group p {
  color: var(--muted);
  margin: 13px 0;
  font-family: "DM Mono", monospace;
  font-size: 0.75rem;
}

.contact-content {
  max-width: 1100px;
  margin: auto;
}

.contact-description {
  color: var(--muted);
  max-width: 400px;
  line-height: 1.7;
  margin: 30px 0;
}

.contact-email {
  display: inline-block;
  font-size: clamp(1.1rem, 3vw, 2.8rem);
  letter-spacing: -0.05em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 10px;
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 30px;
  margin-top: 50px;
}

.social-links a {
  font-family: "DM Mono", monospace;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.flight-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(
      ellipse at center,
      transparent 20%,
      rgba(200, 255, 61, 0.04) 65%,
      rgba(0, 0, 0, 0.8) 100%
    );
  mix-blend-mode: screen;
}

.flight-overlay::before,
.flight-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 10%,
    rgba(200, 255, 61, 0.12) 10.1%,
    transparent 10.2%
  );
  transform: scaleX(0.5);
  opacity: 0;
}

.flight-overlay::after {
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 8%,
    rgba(255, 255, 255, 0.1) 8.1%,
    transparent 8.2%
  );
}

@media (max-width: 900px) {
  .navbar {
    padding: 24px;
  }

  .navbar nav {
    display: none;
  }

  .nav-contact {
    font-size: 0.6rem;
  }

  .scene-panel {
    padding: 120px 8vw 70px;
  }

  .panel-number {
    top: 115px;
    left: 8vw;
  }

  .hero-side {
    display: none;
  }

  .hero-description {
    margin-top: 30px;
  }

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

  .projects,
  .skills-grid {
    grid-template-columns: 1fr;
    max-height: 55vh;
    overflow-y: auto;
  }

  .project-card {
    min-height: 180px;
  }

  .project-card h3 {
    margin: 15px 0;
  }

  h2 {
    margin-bottom: 30px;
  }

  .panel-footer {
    left: 8vw;
    right: 8vw;
    font-size: 0.5rem;
  }

  .panel-footer span:last-child {
    display: none;
  }

  .contact-email {
    font-size: 1.25rem;
  }
}

@media (hover: none), (pointer: coarse) {
  body {
    cursor: auto;
  }

  .cursor,
  .cursor-outline {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
