:root {
  --bg: #090909;
  --bg-soft: #101010;
  --card: #131313;
  --text: #f3f0e9;
  --muted: #96938b;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #a7ff5a;
  --accent-2: #8c6cff;
  --max: 1180px;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 999;
  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='.8'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    circle,
    rgba(140, 108, 255, 0.1) 0%,
    rgba(140, 108, 255, 0) 68%
  );
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease;
}

.site-header {
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), var(--max));
  height: 64px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.74);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
}
.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: invert(1);
}
.nav {
  display: flex;
  gap: 8px;
}
.nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  transition: 0.25s ease;
}
.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.section {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 64px;
  padding: 150px 0 110px;
  position: relative;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(167, 255, 90, 0.08);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 10px rgba(167, 255, 90, 0);
  }
}

h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  margin-bottom: 26px;
  max-width: 880px;
  font-size: clamp(3rem, 7.5vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 600;
}
.hero-subtitle {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
  line-height: 1.7;
}
.hero-subtitle strong {
  color: var(--text);
  font-weight: 500;
}
.hero-actions,
.contact-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid var(--line);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}
.button:hover {
  transform: translateY(-2px);
}
.button-primary {
  background: var(--text);
  color: #111;
  border-color: var(--text);
}
.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.button-ghost {
  background: rgba(255, 255, 255, 0.03);
}
.button-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.02)
  );
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}
.hero-card:hover {
  transform: rotate(0deg) translateY(-4px);
  transition: 0.35s ease;
}
.code-bar {
  height: 48px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}
.code-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2a2a2a;
}
.code-bar span:nth-child(1) {
  background: #ff6a5e;
}
.code-bar span:nth-child(2) {
  background: #ffbd4a;
}
.code-bar span:nth-child(3) {
  background: #61c454;
}
.code-bar p {
  margin: 0 0 0 8px;
  color: var(--muted);
  font-family: "Space Mono";
  font-size: 0.68rem;
}
.hero-card pre {
  margin: 0;
  padding: 28px;
  overflow: auto;
  font-family: "Space Mono";
  line-height: 1.9;
  font-size: clamp(0.72rem, 1.2vw, 0.88rem);
  color: #d7d4ce;
}
.token-key {
  color: #c9a9ff;
}
.token-string {
  color: #b8ee8f;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: "Space Mono";
  font-size: 0.65rem;
  letter-spacing: 0.16em;
}
.scroll-indicator i {
  width: 42px;
  height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.scroll-indicator i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateX(-100%);
  animation: sweep 2s infinite;
}
@keyframes sweep {
  60%,
  100% {
    transform: translateX(100%);
  }
}

.work-section,
.about-section {
  padding: 130px 0;
}
.section-heading {
  display: grid;
  grid-template-columns: 0.45fr 1.55fr;
  align-items: start;
  gap: 20px;
  margin-bottom: 54px;
}
.section-heading h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  font-weight: 500;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.project-card {
  min-height: 440px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s ease,
    border-color 0.35s ease;
}
.project-card::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  right: -120px;
  top: -140px;
  background: radial-gradient(
    circle,
    rgba(140, 108, 255, 0.18),
    transparent 66%
  );
  transition: transform 0.5s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.24);
}
.project-card:hover::before {
  transform: scale(1.4);
}
.project-featured {
  grid-row: span 2;
  min-height: 896px;
  background: linear-gradient(160deg, #171717 40%, #171423);
}
.project-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-family: "Space Mono";
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.project-card h3 {
  font-size: clamp(2.2rem, 4.5vw, 4.6rem);
  letter-spacing: -0.05em;
  margin-bottom: 18px;
  font-weight: 500;
}
.project-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
  max-width: 620px;
}
.tags {
  list-style: none;
  padding: 0;
  margin: 28px 54px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tags li {
  border: 1px solid var(--line);
  color: #bebbb5;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 0.72rem;
}
.project-arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: 1.7rem;
  color: var(--muted);
  transition:
    transform 0.3s ease,
    color 0.3s ease;
}
.project-card:hover .project-arrow {
  transform: translate(4px, -4px);
  color: var(--accent);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}
.about-copy {
  font-size: clamp(1.5rem, 3vw, 2.55rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
}
.skill-panels {
  border-top: 1px solid var(--line);
}
.skill-panel {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.skill-panel > span {
  font-family: "Space Mono";
  color: var(--muted);
  font-size: 0.7rem;
}
.skill-panel h3 {
  margin-bottom: 8px;
  font-size: 1rem;
  font-weight: 600;
}
.skill-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.principles-section {
  width: 100%;
  padding: 30px 0 90px;
  overflow: hidden;
}
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
  transform: rotate(-1deg) scale(1.02);
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 34px;
  align-items: center;
  animation: marquee 26s linear infinite;
  font-family: "Space Mono";
  color: #c9c6c0;
  font-size: 0.75rem;
  letter-spacing: 0.13em;
}
.marquee-track b {
  color: var(--accent-2);
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.contact-section {
  padding: 70px 0 120px;
}
.contact-card {
  min-height: 520px;
  border-radius: 34px;
  border: 1px solid var(--line);
  padding: clamp(32px, 6vw, 72px);
  background: linear-gradient(
    135deg,
    rgba(167, 255, 90, 0.08),
    rgba(140, 108, 255, 0.08) 60%,
    rgba(255, 255, 255, 0.02)
  );
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-card h2 {
  max-width: 850px;
  font-size: clamp(3rem, 6vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 500;
  margin-bottom: 22px;
}
.contact-card > p:not(.eyebrow):not(.contact-note) {
  color: var(--muted);
  max-width: 650px;
  font-size: 1.08rem;
  line-height: 1.7;
}
.contact-note {
  color: #77746d;
  font-size: 0.75rem;
  margin: 30px 0 0;
}
.contact-note code {
  font-family: "Space Mono";
}

.footer {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 22px 0 36px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.78rem;
}
.footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.75s ease,
    transform 0.75s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 {
  transition-delay: 0.1s;
}
.delay-2 {
  transition-delay: 0.2s;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 140px;
  }
  .hero-card {
    max-width: 640px;
    transform: none;
  }
  .section-heading {
    grid-template-columns: 1fr;
  }
  .project-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }
  .project-featured {
    grid-row: auto;
    min-height: 520px;
  }
  .project-card {
    min-height: 460px;
  }
}

@media (max-width: 600px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    height: 58px;
    padding-left: 17px;
  }
  .nav a {
    padding: 9px 10px;
    font-size: 0.78rem;
  }
  .section {
    width: min(calc(100% - 24px), var(--max));
  }
  h1 {
    font-size: clamp(3.2rem, 17vw, 5.2rem);
  }
  .hero {
    padding-bottom: 90px;
  }
  .scroll-indicator {
    display: none;
  }
  .work-section,
  .about-section {
    padding: 95px 0;
  }
  .project-card {
    padding: 22px;
    min-height: 430px;
  }
  .project-featured {
    min-height: 500px;
  }
  .contact-section {
    padding-bottom: 70px;
  }
  .contact-card {
    border-radius: 26px;
  }
  .footer {
    width: calc(100% - 24px);
    flex-direction: column;
  }
  .cursor-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
