/* ============================================================
   Bruce Cipriano — Portfolio Design System
   Tema: Cyber/Matrix profesional
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Custom Properties --- */
:root {
  /* Colors */
  --color-bg: #07080d;
  --color-surface: rgba(10, 15, 25, 0.82);
  --color-surface-hover: rgba(15, 22, 38, 0.92);
  --color-primary: #00ffcc;
  --color-secondary: #00e5ff;
  --color-matrix: #00ff41;
  --color-accent: #7b61ff;
  --color-text: #e0e6ed;
  --color-text-muted: #7e8a9a;
  --color-text-heading: #f0f4f8;
  --color-border: rgba(0, 255, 204, 0.12);
  --color-border-hover: rgba(0, 255, 204, 0.35);
  --color-danger: #ff4d6a;
  --color-warning: #fbbf24;

  /* Shadows */
  --shadow-glow: 0 0 20px rgba(0, 255, 204, 0.12);
  --shadow-glow-strong: 0 0 30px rgba(0, 255, 204, 0.22);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 0 16px rgba(0, 255, 204, 0.25);

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Container */
  --container-max: 1200px;
  --container-padding: 1.25rem;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

ul, ol {
  list-style: none;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 204, 0.2);
  border-radius: var(--radius-full);
}

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

/* --- Selection --- */
::selection {
  background: rgba(0, 255, 204, 0.25);
  color: var(--color-text-heading);
}

/* --- Skip to content (accessibility) --- */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-md);
  background: var(--color-primary);
  color: var(--color-bg);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* --- Kage-inspired WebGL Background Layers --- */
#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -2;
  background: #05070a;
}

#vignette {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(125% 95% at 50% 42%, transparent 40%, rgba(2, 4, 6, 0.55) 100%);
}

#grain {
  position: fixed;
  inset: -1px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 180px 180px;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Focus Visible (accessibility) --- */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--space-md) 0;
  transition: background var(--transition-base), box-shadow var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(7, 8, 13, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.nav-logo span {
  color: var(--color-text-muted);
  font-weight: 400;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
}

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

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

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

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  z-index: 1001;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

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

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

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

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--container-padding);
  position: relative;
}

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

.hero-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  background: rgba(0, 255, 204, 0.05);
  animation: pulse-badge 3s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.15); }
  50% { box-shadow: 0 0 16px 4px rgba(0, 255, 204, 0.1); }
}

.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--color-text-heading);
  line-height: 1.15;
  margin-bottom: var(--space-sm);
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-role {
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  color: var(--color-text-heading);
  font-weight: 500;
  margin-bottom: var(--space-sm);
  font-family: var(--font-mono);
}

.hero-tagline {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  background: var(--color-secondary);
  color: var(--color-bg);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border-hover);
}

.btn-secondary:hover {
  background: rgba(0, 255, 204, 0.08);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

.btn-icon {
  font-size: 1.05em;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--space-3xl) 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--color-text-heading);
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  margin: var(--space-sm) auto 0;
  border-radius: var(--radius-full);
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: var(--space-md) auto 0;
}

/* --- Glassmorphism panels --- */
.glass-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
}

.about-info {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  justify-content: center;
}

.about-info-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(0, 255, 204, 0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.about-info-item .icon {
  font-size: 1.1rem;
}

/* ============================================================
   SKILLS SECTION
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.skill-category {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.skill-category:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.skill-category-title {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.skill-category-title .icon {
  font-size: 1.2rem;
}

.skill-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: rgba(0, 255, 204, 0.08);
  color: var(--color-primary);
  border: 1px solid rgba(0, 255, 204, 0.15);
  transition: all var(--transition-fast);
}

.badge:hover {
  background: rgba(0, 255, 204, 0.15);
  border-color: var(--color-primary);
}

/* Badge color variations */
.badge-blue {
  background: rgba(0, 100, 255, 0.1);
  color: #60a5fa;
  border-color: rgba(0, 100, 255, 0.2);
}

.badge-purple {
  background: rgba(123, 97, 255, 0.1);
  color: #a78bfa;
  border-color: rgba(123, 97, 255, 0.2);
}

.badge-orange {
  background: rgba(255, 152, 0, 0.1);
  color: #fb923c;
  border-color: rgba(255, 152, 0, 0.2);
}

.badge-green {
  background: rgba(0, 200, 83, 0.1);
  color: #4ade80;
  border-color: rgba(0, 200, 83, 0.2);
}

.badge-red {
  background: rgba(255, 77, 106, 0.1);
  color: #f87171;
  border-color: rgba(255, 77, 106, 0.2);
}

.badge-teal {
  background: rgba(0, 229, 255, 0.1);
  color: #22d3ee;
  border-color: rgba(0, 229, 255, 0.2);
}

/* ============================================================
   PROJECT CARDS
   ============================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-lg);
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(-6px);
}

.project-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.project-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-heading);
  flex: 1;
  min-width: 150px;
}

.project-year {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(0, 255, 204, 0.1);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 255, 204, 0.2);
}

.project-type {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-accent);
  background: rgba(123, 97, 255, 0.1);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(123, 97, 255, 0.2);
}

/* "En proceso" type badge — amber/warning color */
.project-type.type-in-progress {
  color: var(--color-warning);
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.25);
}

.project-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--space-md);
}

.project-stack .badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
}

/* Details/Summary for project contributions */
.project-details {
  margin-bottom: var(--space-md);
}

.project-details summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-secondary);
  cursor: pointer;
  padding: var(--space-sm) 0;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.project-details summary:hover {
  color: var(--color-primary);
}

.project-details summary::marker {
  color: var(--color-primary);
}

.project-details[open] summary {
  margin-bottom: var(--space-sm);
}

.project-details ul {
  padding-left: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.project-details li {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  position: relative;
  padding-left: var(--space-md);
}

.project-details li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* ============================================================
   FEATURED PROJECTS (larger cards)
   ============================================================ */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-xl);
}

.featured-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
}

.featured-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow-strong);
  transform: translateY(-8px);
}

.featured-card .project-header h3 {
  font-size: 1.25rem;
}

.featured-card .project-desc {
  font-size: 0.95rem;
}

/* ============================================================
   PROFESSIONAL SKILLS SECTION
   ============================================================ */
.soft-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  max-width: 900px;
  margin: 0 auto;
}

.soft-skill-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.soft-skill-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.soft-skill-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.soft-skill-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-heading);
}

/* ============================================================
   CERTIFICATIONS
   ============================================================ */
.certs-gallery {
  max-width: 1050px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}

.cert-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

.cert-card:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.cert-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: calc(var(--radius-md) - 2px);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.cert-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.cert-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: opacity var(--transition-base);
}

.cert-thumb-icon {
  font-size: 1.6rem;
}

.cert-thumb-text {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.cert-meta {
  flex: 1;
  min-height: 3.25rem;
}

.cert-title {
  font-weight: 600;
  color: var(--color-text-heading);
  font-size: 0.92rem;
  line-height: 1.35;
}

.cert-subtitle {
  margin-top: var(--space-xs);
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.cert-card.cert-rendered .cert-canvas {
  opacity: 1;
}

.cert-card.cert-rendered .cert-image {
  opacity: 1;
}

.cert-card.cert-rendered .cert-thumb-fallback {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   EDUCATION
   ============================================================ */
.education-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.education-card h3 {
  font-size: 1.2rem;
  color: var(--color-text-heading);
  margin-bottom: var(--space-xs);
}

.education-degree {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.education-location {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xs);
}

.education-period {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   LANGUAGES & AVAILABILITY
   ============================================================ */
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: center;
  max-width: 700px;
  margin: 0 auto;
}

.info-card {
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.info-card h3,
.info-card h4 {
  font-size: 1rem;
  color: var(--color-text-heading);
  margin-bottom: var(--space-sm);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  text-decoration: none;
  color: var(--color-text);
  min-width: 240px;
}

.contact-item:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
  color: var(--color-text-heading);
}

.contact-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.contact-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-value {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text-heading);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-md);
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.footer-copy {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
  z-index: 10000;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--color-primary), 0 0 20px rgba(0, 255, 204, 0.3);
}

/* ============================================================
   FALLING LEAVES (Kage-inspired)
   ============================================================ */
.falling-leaves-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.falling-leaf {
  position: absolute;
  top: -30px;
  display: inline-block;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 4px rgba(0, 255, 204, 0.4));
  will-change: transform, opacity;
}

/* ============================================================
   CURSOR TRAIL (Kage-inspired pointer trail)
   ============================================================ */
.cursor-trail-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  overflow: hidden;
}

.cursor-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
  transform: translate(-50%, -50%);
}

/* ============================================================
   AMBIENT FIREFLIES (Kage-inspired particles)
   ============================================================ */
.fireflies-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.firefly {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.3;
  will-change: transform, opacity;
}

/* ============================================================
   GLOW PULSE EFFECTS (Kage bloom-inspired)
   ============================================================ */
.glow-pulse {
  animation: glowPulseAnim 4s ease-in-out infinite;
}

@keyframes glowPulseAnim {
  0%, 100% {
    text-shadow: 0 0 0px transparent;
  }
  50% {
    text-shadow: 0 0 12px rgba(0, 255, 204, 0.2), 0 0 24px rgba(0, 255, 204, 0.1);
  }
}

.glow-pulse-accent {
  animation: glowPulseAccent 3s ease-in-out infinite;
}

@keyframes glowPulseAccent {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 204, 0.15);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(0, 255, 204, 0.12), 0 0 40px 8px rgba(123, 97, 255, 0.06);
    filter: brightness(1.1);
  }
}

/* --- Section title underline animation --- */
.section-title::after {
  transform: scaleX(var(--underline-scale, 1));
  transform-origin: left;
}

/* ============================================================
   ENHANCED CARD HOVER GLOW
   ============================================================ */
.featured-card::after,
.project-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,255,204,0.08), transparent, rgba(123,97,255,0.08));
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: -1;
}

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

/* --- Smooth card gradient border on hover --- */
.featured-card {
  position: relative;
  overflow: hidden;
}

.project-card {
  position: relative;
  overflow: hidden;
}

/* ============================================================
   RESPONSIVE — Tablet (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .projects-grid,
  .featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

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

  .soft-skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

/* ============================================================
   RESPONSIVE — Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  .section {
    padding: var(--space-2xl) 0;
  }

  /* Navbar mobile */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: rgba(7, 8, 13, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-2xl);
    transition: right var(--transition-base);
    border-left: 1px solid var(--color-border);
  }

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

  .nav-links a {
    font-size: 1.1rem;
  }

  /* Hero mobile */
  .hero {
    min-height: 90vh;
    padding: var(--space-2xl) var(--container-padding);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

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

  /* Projects mobile */
  .projects-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  /* Skills mobile */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* Soft Skills mobile */
  .soft-skills-grid {
    grid-template-columns: 1fr;
  }

  /* Contact mobile */
  .contact-grid {
    flex-direction: column;
    align-items: center;
  }

  .contact-item {
    width: 100%;
    max-width: 350px;
  }

  /* Info row */
  .info-row {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================================
   RESPONSIVE — Small mobile (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
  .project-header {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .project-header h3 {
    min-width: auto;
  }

  .about-info {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Mobile menu overlay --- */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.nav-overlay.active {
  display: block;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary { color: var(--color-primary); }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-md { margin-bottom: var(--space-md); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
