:root {
  --bg: #0a0a0f;
  --surface: #111118;
  --border: #1e1e2e;
  --accent: #d45500;
  --accent2: #7c3aed;
  --accent3: #f59e0b;
  --accent4: #00ff9d;
  --accent5: #00ccff;
  --text: #e2e8f0;
  --muted: #64748b;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Syne', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  overflow-x: hidden;
  cursor: none;
}

/* ── Custom Cursor ── */
.cursor {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s ease, opacity 0.15s ease;
  mix-blend-mode: difference;
}

.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  transition: transform 0.35s ease, width 0.2s, height 0.2s;
  opacity: 0.5;
}

body:has(a:hover) .cursor-ring,
body:has(button:hover) .cursor-ring {
  width: 56px;
  height: 56px;
  opacity: 0.8;
}

/* ── 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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 2px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 4rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo{
  width: 50px;
}

.nav-logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
}

.nav-logo span {
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}

.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%;
}

.nav-cta {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.6rem 1.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}

.nav-cta:hover {
  background: var(--accent5);
  color: var(--bg);
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 4rem;
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
  gap: 4rem;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 157, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 157, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridShift 20s linear infinite;
}

@keyframes gridShift {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 60px 60px;
  }
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 255, 157, 0.06) 0%, transparent 70%);
  top: 50%;
  left: 30%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.2s forwards;
}

.hero-tag::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-name {
  font-family: var(--sans);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.3rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.3s forwards;
}

.hero-name .line2 {
  color: transparent;
  -webkit-text-stroke: 1px rgba(226, 232, 240, 0.3);
}

.hero-title {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.4s forwards;
}

.hero-title .highlight {
  color: var(--accent3);
}

.hero-desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 420px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.6s ease 0.6s forwards;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.9rem 2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.btn-primary:hover::after {
  transform: translateX(0);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-ghost .arrow {
  transition: transform 0.2s;
}

.btn-ghost:hover .arrow {
  transform: translateX(4px);
}

/* ── Hero Terminal ── */
.hero-terminal {
  position: relative;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.terminal-window {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 255, 157, 0.05);
}

.terminal-bar {
  background: #1a1a27;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.t-dot.red {
  background: #ff5f57;
}

.t-dot.yellow {
  background: #febc2e;
}

.t-dot.green {
  background: #28c840;
}

.terminal-title {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.78rem;
  line-height: 2;
}

.t-line {
  display: block;
}

.t-prompt {
  color: var(--accent);
}

.t-cmd {
  color: var(--text);
}

.t-comment {
  color: var(--muted);
}

.t-string {
  color: #f59e0b;
}

.t-key {
  color: #7c3aed;
}

.t-val {
  color: #06b6d4;
}

.t-output {
  color: var(--muted);
  padding-left: 1rem;
}

.t-blank {
  display: block;
  height: 0.8rem;
}

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent);
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ── STATS ── */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 0;
  width: 1px;
  height: 60%;
  background: var(--border);
}

.stat-item:last-child::after {
  display: none;
}

.stat-num {
  font-family: var(--sans);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── SECTIONS COMMON ── */
section {
  padding: 6rem 4rem;
}

.section-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.section-tag::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: var(--sans);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 480px;
  margin-bottom: 3rem;
}

/* ── SKILLS ── */
#skills {
  background: var(--surface);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.skill-card:hover {
  border-color: rgba(0, 255, 157, 0.2);
  transform: translateY(-3px);
}

.skill-card:hover::before {
  transform: scaleX(1);
}

.skill-icon {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.skill-name {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  font-size: 0.65rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--muted);
  letter-spacing: 0.05em;
  transition: border-color 0.2s, color 0.2s;
}

.skill-card:hover .tag {
  border-color: rgba(0, 255, 157, 0.3);
  color: var(--text);
}

/* ── PROJECTS ── */
#projects {}

.projects-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  transition: border-color 0.3s;
}

.project-card:hover {
  border-color: rgba(0, 255, 157, 0.25);
}

.project-card.featured {
  grid-row: span 2;
}

.project-img {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, #0d0d1a 0%, #1a0d2e 50%, #0d1a1a 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card.featured .project-img {
  height: 300px;
}

.project-img-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(0, 255, 157, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.08) 0%, transparent 50%);
}

.project-code-preview {
  font-size: 0.65rem;
  color: rgba(0, 255, 157, 0.4);
  line-height: 1.8;
  text-align: left;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.project-body {
  padding: 1.5rem;
}

.project-num {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.project-name {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.project-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-tech {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.project-links {
  display: flex;
  gap: 0.8rem;
}

.project-link {
  font-size: 0.7rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.project-link:hover {
  color: var(--accent);
}

/* ── EXPERIENCE ── */
#experience {
  background: var(--surface);
}

.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent), var(--accent2), transparent);
}

.timeline-item {
  position: relative;
  padding: 0 0 3rem 2rem;
}

.timeline-dot {
  position: absolute;
  left: -2.4rem;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.timeline-date {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.timeline-role {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.timeline-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 600px;
}

/* ── CONTACT ── */
#contact {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0, 255, 157, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.contact-content {
  position: relative;
  z-index: 1;
}

.contact-email {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
  display: inline-block;
  margin: 2rem 0;
  position: relative;
}

.contact-email::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.contact-email:hover::after {
  transform: scaleX(1);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 2rem;
  list-style: none;
}

.social-links a {
  font-size: 0.72rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding: 0.5rem 0;
  position: relative;
}

.social-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.social-links a:hover {
  color: var(--accent);
}

.social-links a:hover::after {
  width: 100%;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.footer-copy span {
  color: var(--accent);
}

.footer-right {
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav {
    padding: 1.2rem 2rem;
  }

  .nav-links {
    display: none;
  }

  #hero {
    grid-template-columns: 1fr;
    padding: 6rem 2rem 3rem;
  }

  .hero-terminal {
    display: none;
  }

  section {
    padding: 4rem 2rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 2rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-row: auto;
  }

  footer {
    padding: 1.5rem 2rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}