:root {
  --bg: #07070A;
  --surface: #0D0D14;
  --accent: #FF5500;
  --accent2: #FF9A3C;
  --text: #EDEDF0;
  --muted: #55556B;
  --border: rgba(255,85,0,0.1);
  --mx: 50%;
  --my: 50%;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  overflow-x: hidden;
  cursor: none;
}

/* ---- GRAIN OVERLAY ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: screen;
}

/* ---- MOUSE GLOW ---- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(700px circle at var(--mx) var(--my), rgba(255,85,0,0.055), transparent 70%);
  transition: background 0.1s;
}

/* ---- CURSOR ---- */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--accent), 0 0 30px rgba(255,85,0,0.4);
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,85,0,0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
}

/* ---- NAV ---- */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 60px;
  border-bottom: 1px solid var(--border);
  background: rgba(7,7,10,0.75);
  backdrop-filter: blur(20px);
}

.nav-logo {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(255,85,0,0.5);
  cursor: none;
  user-select: none;
  transition: text-shadow 0.2s;
}
.nav-logo:hover {
  text-shadow: 0 0 20px rgba(255,85,0,0.9), 0 0 60px rgba(255,154,60,0.4);
}

.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
  font-family: 'Space Mono', monospace;
}
.nav-links a:hover { color: var(--accent); }

/* ---- SECTIONS ---- */
section { position: relative; z-index: 1; }

/* ---- HERO ---- */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 60px;
  padding-top: 100px;
}

.hero-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-name {
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -3px;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-name span {
  display: block;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 55%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.6;
  margin-bottom: 50px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}
.hero-sub strong { color: var(--text); }

.hero-cta {
  display: flex;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

/* ---- BUTTONS ---- */
.btn {
  padding: 14px 32px;
  border-radius: 4px;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: none;
  text-decoration: none;
  transition: box-shadow 0.3s, transform 0.3s cubic-bezier(0.25,0.46,0.45,0.94);
  display: inline-block;
  will-change: transform;
}
.btn-primary {
  background: var(--accent);
  color: #07070A;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(255,85,0,0.35), 0 0 60px rgba(255,85,0,0.1);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(255,85,0,0.65), 0 0 80px rgba(255,85,0,0.25);
}
.btn-outline {
  border: 1px solid var(--border);
  color: var(--muted);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- ABOUT ---- */
#about {
  padding: 120px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  border-top: 1px solid var(--border);
}

.section-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.about-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.about-text { color: var(--muted); line-height: 1.8; font-size: 1rem; }
.about-text p + p { margin-top: 16px; }
.about-text strong { color: var(--text); }

/* ---- STATS ---- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--border);
}
.stat-card {
  background: var(--surface);
  padding: 40px 30px;
  transition: background 0.3s;
}
.stat-card:hover { background: #111118; }
.stat-num {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255,85,0,0.4);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---- SKILLS ---- */
#skills {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
}
.skills-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
}
.skills-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 800;
}
.skills-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
}
.skill-group {
  background: var(--surface);
  padding: 40px;
}
.skill-group-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--accent2);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--muted);
  transition: all 0.3s;
}
.skill-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-shadow: 0 0 8px rgba(255,85,0,0.5);
}

/* ---- PROJECTS ---- */
#projects {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
}
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
  margin-top: 60px;
}
.project-card {
  background: var(--surface);
  padding: 50px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}
.project-card--full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border: 1px dashed rgba(255,85,0,0.08);
  background: transparent;
}
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 0;
  background: var(--accent);
  transition: height 0.4s ease;
}
.project-card:not(.project-card--full):hover::before { height: 100%; }
.project-card:not(.project-card--full):hover { background: #0e0e17; }
.project-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 3px;
  margin-bottom: 20px;
}
.project-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 14px;
  transition: color 0.3s;
}
.project-card:hover .project-title { color: var(--accent); }
.project-desc {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 30px;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tag {
  padding: 4px 12px;
  background: rgba(255,85,0,0.05);
  border: 1px solid rgba(255,85,0,0.12);
  border-radius: 2px;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 1px;
}

/* ---- CONTACT ---- */
#contact {
  padding: 120px 60px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.contact-title {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -2px;
  margin-bottom: 40px;
}
.contact-title span {
  display: block;
  -webkit-text-stroke: 1px var(--muted);
  color: transparent;
  transition: color 0.3s, -webkit-text-stroke 0.3s, text-shadow 0.3s;
}
.contact-title span:hover {
  color: var(--accent);
  -webkit-text-stroke: 0px;
  text-shadow: 0 0 60px rgba(255,85,0,0.35);
}
.contact-email {
  font-family: 'Space Mono', monospace;
  font-size: 1rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 3px;
  transition: color 0.3s;
  display: inline-block;
  margin-bottom: 60px;
}
.contact-email:hover { color: var(--accent); }

/* ---- FOOTER ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 30px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}
footer span {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 2px;
}

/* ---- LED DIVIDER ---- */
.led-line {
  width: 60px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent), 0 0 30px rgba(255,85,0,0.4);
  margin-bottom: 40px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--accent), 0 0 30px rgba(255,85,0,0.4); }
  50% { opacity: 0.4; box-shadow: 0 0 4px var(--accent); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- LIGHTER FLASH ---- */
.lighter-flash {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, #FF9A3C 0%, #FF5500 30%, transparent 70%);
  opacity: 0;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

@media (max-width: 768px) {
  nav { padding: 20px 24px; }
  .nav-links { display: none; }
  #hero, #about, #skills, #projects, #contact { padding-left: 24px; padding-right: 24px; }
  #about { grid-template-columns: 1fr; gap: 40px; }
  .skills-groups, .projects-grid { grid-template-columns: 1fr; }
  .skills-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .project-card--full { grid-column: auto; }
}