/* ============================================
   ONECANY SCI-FI DESIGN SYSTEM
   Cyberpunk 2077 / Neon Aesthetic
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a12;
  --bg-secondary: #0f0f1e;
  --bg-card: rgba(15, 10, 30, 0.85);
  --bg-card-hover: rgba(25, 15, 45, 0.95);

  --neon-cyan: #00f0ff;
  --neon-magenta: #ff2d95;
  --neon-purple: #b829f5;
  --neon-green: #39ff14;
  --neon-blue: #6c3bff;

  --text-primary: #e8e0f0;
  --text-secondary: #9088a8;
  --text-dim: #504868;

  --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.15);
  --glow-magenta: 0 0 12px rgba(255, 45, 149, 0.4), 0 0 40px rgba(255, 45, 149, 0.15);
  --glow-strong-cyan: 0 0 10px rgba(0, 240, 255, 0.6), 0 0 30px rgba(0, 240, 255, 0.35), 0 0 60px rgba(0, 240, 255, 0.15);

  --border-subtle: 1px solid rgba(0, 240, 255, 0.1);
  --border-glow: 1px solid rgba(0, 240, 255, 0.3);

  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
  --font-display: 'Orbitron', 'Rajdhani', sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: all 0.3s ease;
}
a:hover {
  color: #fff;
  text-shadow: var(--glow-cyan);
}

::selection {
  background: rgba(0, 240, 255, 0.3);
  color: #fff;
}

/* --- Scanline Overlay --- */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 240, 255, 0.008) 2px,
    rgba(0, 240, 255, 0.008) 4px
  );
}

/* --- Particle Canvas --- */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Grid Background --- */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* Ambient cyberpunk glow */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(184, 41, 245, 0.06) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

.grid-bg::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(255, 45, 149, 0.05) 0%, transparent 70%);
  z-index: 0;
  pointer-events: none;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
  transition: all 0.3s ease;
}

.nav.scrolled {
  padding: 0.6rem 2rem;
  background: rgba(10, 10, 15, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: var(--glow-cyan);
  cursor: pointer;
}

.nav-logo .dot {
  color: var(--neon-magenta);
  text-shadow: var(--glow-magenta);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 0.4rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

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

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--neon-cyan);
  transition: all 0.3s ease;
  box-shadow: var(--glow-cyan);
}

/* ============================================
   LAYOUT
   ============================================ */
.page-wrapper {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

section {
  padding: 8rem 0;
  position: relative;
}

/* ============================================
   HERO SECTION (index.html)
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--neon-cyan);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.3s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.5s forwards;
}

.hero-title .glitch {
  position: relative;
  display: inline-block;
  color: #fff;
}

.hero-title .glitch::before,
.hero-title .glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-title .glitch::before {
  color: var(--neon-cyan);
  z-index: -1;
  animation: glitch-1 3s infinite linear alternate-reverse;
}

.hero-title .glitch::after {
  color: var(--neon-magenta);
  z-index: -2;
  animation: glitch-2 2s infinite linear alternate-reverse;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 3rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.7s forwards;
}

.hero-desc em {
  color: var(--neon-cyan);
  font-style: normal;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.hero-cta {
  display: flex;
  gap: 2rem;
  justify-content: center;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 0.9s forwards;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--neon-cyan);
  color: var(--bg-primary);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  background: #fff;
  color: var(--bg-primary);
  box-shadow: var(--glow-strong-cyan);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
}

.btn-outline:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

/* Hero status bar */
.hero-status {
  margin-top: 5rem;
  display: flex;
  gap: 4rem;
  justify-content: center;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease 1.1s forwards;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.hero-stat-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.3rem;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-magenta);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
}

.section-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-magenta));
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.about-text .highlight {
  color: var(--neon-cyan);
  font-weight: 600;
}

.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.interest-tag {
  padding: 0.5rem 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 100px;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.interest-tag:hover {
  background: rgba(0, 240, 255, 0.15);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.interest-tag.magenta {
  color: var(--neon-magenta);
  border-color: rgba(255, 45, 149, 0.2);
  background: rgba(255, 45, 149, 0.05);
}

.interest-tag.magenta:hover {
  background: rgba(255, 45, 149, 0.15);
  box-shadow: var(--glow-magenta);
}

.interest-tag.purple {
  color: var(--neon-purple);
  border-color: rgba(184, 41, 245, 0.2);
  background: rgba(184, 41, 245, 0.05);
}

.interest-tag.purple:hover {
  background: rgba(184, 41, 245, 0.15);
  box-shadow: 0 0 10px rgba(184, 41, 245, 0.3);
}

/* Terminal Card */
.terminal-card {
  background: var(--bg-card);
  border: var(--border-glow);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.05);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1.2rem;
  background: rgba(0, 240, 255, 0.05);
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  margin-left: 0.8rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.terminal-body {
  padding: 2rem;
  line-height: 2.2;
}

.terminal-body .prompt {
  color: var(--neon-green);
}

.terminal-body .cmd {
  color: var(--neon-cyan);
}

.terminal-body .comment {
  color: var(--text-dim);
}

.terminal-body .output {
  color: var(--text-secondary);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--neon-cyan);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* Timeline */
.timeline {
  position: relative;
  margin-top: 3rem;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-magenta), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.5rem;
  width: 8px;
  height: 8px;
  background: var(--neon-cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-cyan);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-magenta);
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.3rem;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ============================================
   SKILLS PAGE
   ============================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.skill-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 240, 255, 0.05);
}

.skill-card:hover::before {
  opacity: 1;
}

.skill-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.skill-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: 1px;
}

.skill-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.3rem 0.7rem;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 100px;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

/* ============================================
   PROJECTS PAGE
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.project-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.03), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.project-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.project-card:hover::after {
  opacity: 1;
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.project-card-icon {
  font-size: 1.5rem;
}

.project-card-links {
  display: flex;
  gap: 0.8rem;
}

.project-card-links a {
  color: var(--text-dim);
  font-size: 0.8rem;
  transition: color 0.3s ease;
}

.project-card-links a:hover {
  color: var(--neon-cyan);
  text-shadow: none;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
}

.project-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.project-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Featured project */
.project-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 3rem;
  background: linear-gradient(135deg, var(--bg-card), rgba(0, 240, 255, 0.03));
}

.project-featured .project-card-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: rgba(0, 240, 255, 0.03);
  border: 1px solid rgba(0, 240, 255, 0.1);
  min-height: 200px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.8rem;
  background: var(--bg-card);
  border: var(--border-subtle);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}

.contact-item:hover {
  border-color: rgba(0, 240, 255, 0.3);
  background: var(--bg-card-hover);
  transform: translateX(5px);
}

.contact-item-icon {
  font-size: 1.3rem;
  width: 40px;
  text-align: center;
}

.contact-item-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.2rem;
}

.contact-item-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border: var(--border-glow);
  border-radius: var(--radius-lg);
  padding: 3rem;
}

.form-group {
  margin-bottom: 1.8rem;
}

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1.2rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  padding: 1rem;
  margin-top: 0.5rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 4rem 0;
  border-top: 1px solid rgba(0, 240, 255, 0.08);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 2rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-3px);
  text-shadow: none;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.footer-text .heart {
  color: var(--neon-magenta);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ============================================
   KEYFRAMES
   ============================================ */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes glitch-1 {
  0%, 95% { clip-path: inset(0 0 0 0); transform: translate(0); }
  96% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 1px); }
  97% { clip-path: inset(60% 0 10% 0); transform: translate(3px, -1px); }
  98% { clip-path: inset(40% 0 30% 0); transform: translate(-2px, 2px); }
  99% { clip-path: inset(10% 0 70% 0); transform: translate(2px, -2px); }
  100% { clip-path: inset(0 0 0 0); transform: translate(0); }
}

@keyframes glitch-2 {
  0%, 93% { clip-path: inset(0 0 0 0); transform: translate(0); }
  94% { clip-path: inset(30% 0 50% 0); transform: translate(3px, -1px); }
  95% { clip-path: inset(70% 0 5% 0); transform: translate(-3px, 2px); }
  96% { clip-path: inset(10% 0 80% 0); transform: translate(2px, -1px); }
  97% { clip-path: inset(50% 0 20% 0); transform: translate(-1px, 3px); }
  100% { clip-path: inset(0 0 0 0); transform: translate(0); }
}

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


/* Page hero (sub-pages) */
.page-hero {
  min-height: auto;
  padding-top: 10rem;
  padding-bottom: 3rem;
}

/* Page content section */
.page-content {
  padding-top: 0;
  padding-bottom: 4rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 900px) {
  .container {
    padding: 0 1.5rem;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .project-featured {
    grid-template-columns: 1fr;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 0 1.2rem;
  }

  section {
    padding: 5rem 0;
  }

  /* Nav */
  .nav {
    padding: 0.8rem 1.2rem;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    background: rgba(6, 6, 12, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2rem;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 1px solid rgba(0, 240, 255, 0.1);
    z-index: 999;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
    letter-spacing: 3px;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  /* Hero */
  .hero {
    padding-top: 5rem;
    min-height: auto;
    padding-bottom: 2rem;
  }

  .hero-subtitle {
    font-size: 0.7rem;
    letter-spacing: 4px;
    margin-bottom: 1.2rem;
  }

  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
    margin-bottom: 1.5rem;
  }

  .hero-desc {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .hero-cta .btn {
    justify-content: center;
    width: 100%;
  }

  .hero-status {
    flex-direction: row;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
  }

  .hero-stat-value {
    font-size: 1.4rem;
  }

  .hero-stat-label {
    font-size: 0.6rem;
  }

  /* Section headers */
  .section-header {
    margin-bottom: 3rem;
  }

  .section-title {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  /* Terminal card */
  .terminal-card {
    font-size: 0.75rem;
  }

  .terminal-body {
    padding: 1.2rem;
    line-height: 2;
    overflow-x: auto;
  }

  .terminal-header {
    padding: 0.6rem 1rem;
  }

  /* Skills grid */
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .skill-card {
    padding: 1.8rem;
  }

  /* Projects grid */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .project-card {
    padding: 1.8rem;
  }

  .project-featured {
    padding: 2rem;
    gap: 1.5rem;
  }

  /* Interest tags */
  .interest-tags {
    gap: 0.6rem;
  }

  .interest-tag {
    font-size: 0.7rem;
    padding: 0.4rem 0.9rem;
  }

  /* Timeline */
  .timeline {
    padding-left: 1.5rem;
  }

  .timeline-item {
    padding-left: 1.2rem;
    margin-bottom: 2rem;
  }

  .timeline-item::before {
    left: -1.85rem;
  }

  /* Contact */
  .contact-grid {
    gap: 2rem;
  }

  .contact-item {
    padding: 1rem 1.2rem;
    gap: 1rem;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .form-group {
    margin-bottom: 1.2rem;
  }

  /* Stats */
  .stats-row {
    gap: 0.8rem;
  }

  .stats-row img {
    max-width: 100%;
    height: auto;
  }

  /* Footer */
  .footer {
    padding: 3rem 0;
  }

  .footer-social {
    gap: 1.5rem;
  }

  .footer-text {
    font-size: 0.7rem;
  }

  /* Page title overrides for sub-pages */
  .page-hero {
    padding-top: 6rem;
    padding-bottom: 2rem;
  }

  .page-content {
    padding-bottom: 2rem;
  }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
  }

  /* About page */
  .about-text p {
    font-size: 0.95rem;
  }
}

/* Tiny phones */
@media (max-width: 380px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-status {
    gap: 1rem;
  }

  .hero-stat-value {
    font-size: 1.2rem;
  }

  .nav-links {
    width: 85%;
  }

  .terminal-card {
    font-size: 0.7rem;
  }

  .terminal-body {
    padding: 1rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-cyan { color: var(--neon-cyan); }
.text-magenta { color: var(--neon-magenta); }
.text-green { color: var(--neon-green); }
.text-dim { color: var(--text-dim); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.font-mono { font-family: var(--font-mono); }
.font-display { font-family: var(--font-display); }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* GitHub Readme Stats */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

.stats-row img {
  border-radius: var(--radius);
}

/* Page transition */
.page-wrapper {
  animation: pageIn 0.5s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    filter: blur(5px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.5);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print */
@media print {
  body::before, body::after, .grid-bg, #particles-canvas, .nav, .footer-social {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
