:root {
  --primary: #ff0040;
  --accent: #00ff88;
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --panel: rgba(255, 255, 255, 0.06);
  --text: #f5f7fa;
  --muted: #a9b0bd;
  --border: rgba(255, 255, 255, 0.12);
  --shadow-red: 0 0 15px rgba(255, 0, 64, 0.45), 0 0 35px rgba(255, 0, 64, 0.15);
  --shadow-green: 0 0 14px rgba(0, 255, 136, 0.35);
}

body.light-mode {
  --bg: #eef2f7;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, 0.7);
  --text: #10131a;
  --muted: #54606f;
  --border: rgba(0, 0, 0, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto Mono", monospace;
  background: radial-gradient(circle at top, rgba(255, 0, 64, 0.1), transparent 30%), var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

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

img {
  width: 100%;
  display: block;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.section {
  padding: 90px 0;
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--accent);
  letter-spacing: 0.35em;
  font-size: 0.78rem;
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: 0.12em;
}

.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

body.light-mode .header {
  background: rgba(255, 255, 255, 0.7);
}

.navbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: "Orbitron", sans-serif;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.2em;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.menu-toggle {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  font-size: 1rem;
  box-shadow: var(--shadow-red);
}

.menu-toggle {
  width: 46px;
  height: 46px;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
}

.menu-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text);
  transition: 0.3s;
}

.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  padding-top: 48px;
  padding-bottom: 64px;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-subtitle {
  min-height: 76px;
  color: var(--primary);
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 18px;
}

.hero-desc {
  color: var(--muted);
  line-height: 1.9;
  max-width: 680px;
}

.cursor {
  color: var(--accent);
  animation: blink 0.8s infinite;
}

.hero-buttons {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: "Orbitron", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.82rem;
  transition: 0.3s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-red);
}

.btn-outline {
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  box-shadow: var(--shadow-green);
}

.btn:hover {
  transform: translateY(-3px);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.socials a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  transition: 0.3s;
}

.socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-green);
}

.hero-card,
.card,
.skill-card {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  border-radius: 24px;
}

.hero-card {
  padding: 24px;
  box-shadow: var(--shadow-red);
}

.profile-box {
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 0, 64, 0.25);
  background: linear-gradient(135deg, rgba(255, 0, 64, 0.12), rgba(0, 255, 136, 0.08));
  margin-bottom: 20px;
}

.profile-box img {
  border-radius: 18px;
  height: 340px;
  object-fit: cover;
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.stat-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  margin-top: 12px;
}

.stat-card span {
  display: block;
  color: var(--accent);
  font-size: 0.72rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  padding: 28px;
}

.card h3 {
  font-family: "Orbitron", sans-serif;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card p {
  color: var(--muted);
  line-height: 1.9;
}

.timeline-item {
  padding-left: 18px;
  border-left: 2px solid var(--primary);
  margin-bottom: 18px;
}

.timeline-item h4 {
  margin-bottom: 6px;
  color: var(--text);
}

.timeline-item span {
  color: var(--accent);
  font-size: 0.85rem;
}

.skills-categories {
  display: grid;
  gap: 28px;
}

.skills-category {
  padding: 28px;
}

.skills-category-head {
  margin-bottom: 22px;
}

.skills-mini-title {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

.category-grid,
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-card {
  padding: 22px;
}

.skill-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.skill-top span:first-child {
  color: var(--text);
}

.skill-top span:last-child {
  color: var(--text);
}

.progress {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  box-shadow: var(--shadow-red);
  transition: width 1.4s ease;
}

.project-card {
  transition: 0.35s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-red);
}

.tags {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--accent);
  font-size: 0.75rem;
}

.cv-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contact-item {
  margin-bottom: 18px;
}

.contact-item span {
  color: var(--accent);
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.contact-socials {
  display: flex;
  gap: 14px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.contact-socials a {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.2rem;
  transition: 0.3s ease;
  box-shadow: var(--shadow-red);
}

.contact-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-green);
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 64, 0.15);
}

.footer {
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
}

.footer-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.matrix-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.2;
  pointer-events: none;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(0,255,136,0.03), transparent);
  animation: scan 8s linear infinite;
  opacity: 0.6;
}

@keyframes scan {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 900px) {
  .hero,
  .about-grid,
  .contact-grid,
  .category-grid,
  .projects-grid,
  .cv-card {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 18px 0;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    left: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.96);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 18px 1rem 24px;
    display: none;
  }

  body.light-mode .nav-links {
    background: rgba(255, 255, 255, 0.96);
  }

  .nav-links.open {
    display: flex;
  }
}
