:root {
  /* Colors - Cyberpunk Midnight Theme */
  --bg-deep: #030508;
  --bg-card: #0a0e14;
  --bg-surface: #111823;
  --accent-primary: #00ffaa;
  --accent-primary-dim: rgba(0, 255, 170, 0.1);
  --accent-primary-glow: rgba(0, 255, 170, 0.3);
  --accent-secondary: #38bdf8;
  --accent-secondary-dim: rgba(56, 189, 248, 0.1);
  
  --text-main: #e2e8f0;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  
  --border-light: rgba(255, 255, 255, 0.05);
  --border-accent: rgba(0, 255, 170, 0.2);
  
  --glass: rgba(10, 14, 20, 0.7);
  --glass-blur: blur(12px);
  
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Syne', sans-serif;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-deep);
}

html, body, a, button, input, textarea, [role="button"] {
  cursor: none !important;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 15px; /* Reduced from 16px */
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

/* ══════════════════ LOADER ══════════════════ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transition: opacity 0.8s ease, visibility 0.8s;
}

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

.loader-logo {
  font-family: var(--font-sans);
  font-size: 3rem;
  color: var(--text-main);
}

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

.loader-bar-wrap {
  width: 240px;
  height: 2px;
  background: var(--border-light);
  position: relative;
  overflow: hidden;
  border-radius: 1px;
}

.loader-bar {
  position: absolute;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  animation: loaderSlide 1.5s infinite;
}

@keyframes loaderSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ══════════════════ CURSOR ══════════════════ */
#cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

#cursor-outline {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent-primary-glow);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
}

/* ══════════════════ BACKGROUND ══════════════════ */
.background-elements {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

.radial-gradient {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-deep) 80%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.orb-1 { width: 600px; height: 600px; background: var(--accent-primary); top: -200px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--accent-secondary); bottom: -100px; left: -100px; }

/* ══════════════════ NAV ══════════════════ */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 4rem;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

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

.nav-links {
  display: flex;
  gap: 3rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-primary);
  transition: var(--transition);
}

.nav-links a:hover::after { width: 100%; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-primary);
  animation: pulse 2s infinite;
}

/* ══════════════════ ANIMATIONS ══════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* ══════════════════ HERO ══════════════════ */
.hero {
  min-height: 100vh;
  padding: 10rem 4rem 6rem; /* Increased padding */
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 6rem;
  max-width: 1600px; /* Increased from 1400px */
  margin: 0 auto;
}

.hero-content {
  max-width: 600px;
}

.badge {
  display: inline-flex;
  padding: 0.5rem 1rem;
  background: var(--accent-primary-dim);
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  font-size: 0.7rem;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem); /* Reduced scale */
  line-height: 0.95;
  margin-bottom: 1.25rem;
}

.text-outline {
  color: transparent;
  -webkit-text-stroke: 1px var(--text-muted);
}

.hero .role {
  font-size: 1.25rem; /* Reduced from 1.5rem */
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.typed { color: var(--accent-primary); position: relative; }
.typed::after { content: '|'; animation: blink 1s infinite; }

@keyframes blink { 50% { opacity: 0; } }

.hero p {
  color: var(--text-muted);
  font-size: 0.95rem; /* Reduced from 1.1rem */
  line-height: 1.7;
  margin-bottom: 2.5rem;
  border-left: 2px solid var(--border-accent);
  padding-left: 1.25rem;
  max-width: 550px;
}

.hero-btns {
  display: flex;
  gap: 1.5rem;
}

.btn {
  padding: 1rem 2.5rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-deep);
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent-primary);
  box-shadow: 0 0 30px var(--accent-primary-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.photo-container {
  width: 100%;
  max-width: 500px; /* Increased from 400px */
  aspect-ratio: 1/1.2;
  position: relative;
  z-index: 1;
}

.photo-frame {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

.photo-frame::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--border-light);
  z-index: -1;
  border-radius: var(--radius-md);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 1rem;
}

.photo-placeholder svg { width: 80px; height: 80px; opacity: 0.2; }

.floating-card {
  position: absolute;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-light);
  padding: 1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  bottom: 40px;
  left: -20px;
  z-index: 2;
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ══════════════════ SECTIONS ══════════════════ */
section {
  padding: 12rem 4rem; /* Increased padding from 8rem */
  max-width: 1600px; /* Increased from 1400px */
  margin: 0 auto;
}

.section-header {
  margin-bottom: 5rem;
}

.section-num {
  font-size: 0.75rem;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 0.5rem;
}

.section-header h2 {
  font-size: 3rem; /* Reduced from 3.5rem */
  line-height: 1;
}

/* ══════════════════ ABOUT ══════════════════ */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 6rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
  line-height: 1.9;
}

.terminal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.terminal-header {
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.terminal-dots { display: flex; gap: 6px; }
.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot-red { background: #ff5f56; }
.tdot-yellow { background: #ffbd2e; }
.tdot-green { background: #27c93f; }

.terminal-title { font-size: 0.7rem; color: var(--text-muted); }

.terminal-body {
  padding: 1.5rem;
  font-size: 0.85rem;
}

.code-line { margin-bottom: 0.5rem; }
.code-key { color: var(--accent-secondary); }
.code-val { color: #facc15; }
.code-bool { color: var(--accent-primary); }

/* ══════════════════ PROJECTS ══════════════════ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-primary);
  background: var(--bg-surface);
}

.project-id { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.project-links {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  gap: 1rem;
}

.project-links a { color: var(--text-dim); transition: var(--transition); }
.project-links a:hover { color: var(--accent-primary); }

.project-card h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.project-card:hover h3 { color: var(--accent-primary); }

.project-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stack-tag {
  font-size: 0.65rem;
  padding: 0.3rem 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: 4px;
}

/* ══════════════════ SKILLS ══════════════════ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.skill-category h3 {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.skill-item { margin-bottom: 2rem; }

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.skill-bar {
  height: 4px;
  background: var(--bg-surface);
  border-radius: 2px;
  position: relative;
}

.skill-progress {
  position: absolute;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 2px;
  width: 0; /* Animated */
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ══════════════════ CONTACT ══════════════════ */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
}

.contact-info h3 { font-size: 3rem; margin-bottom: 1.5rem; }
.contact-info p { color: var(--text-muted); margin-bottom: 3rem; max-width: 450px; }

.social-links {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-dim);
  transition: var(--transition);
  font-size: 0.9rem;
}

.social-item:hover { color: var(--accent-primary); transform: translateX(10px); }

.contact-form {
  background: var(--bg-card);
  padding: 3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: 0.7rem; color: var(--accent-primary); margin-bottom: 0.5rem; text-transform: uppercase; }

.form-group input, .form-group textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  padding: 1rem;
  color: var(--text-main);
  font-family: inherit;
  border-radius: 4px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus { border-color: var(--accent-primary); }

/* ══════════════════ FOOTER ══════════════════ */
footer {
  padding: 4rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ══════════════════ RESPONSIVE ══════════════════ */
@media (max-width: 1024px) {
  header { padding: 1.5rem 2rem; }
  .hero { grid-template-columns: 1fr; padding-top: 10rem; text-align: center; }
  .hero-content { margin: 0 auto; }
  .hero-btns { justify-content: center; }
  .hero-visual { display: none; }
  .about-grid, .contact-container, .skills-grid { grid-template-columns: 1fr; gap: 4rem; }
  .section-header h2 { font-size: 2.5rem; }
  section { padding: 4rem 2rem; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .projects-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 1rem; text-align: center; }
}
