/* ═══════════════════════════════════════════════════════════════
   DEVOPS PORTFOLIO — DESIGN SYSTEM
   Aesthetic: Terminal-Industrial with neon accents
   Fonts: JetBrains Mono (code) + Syne (headings) + Inter (body)
═══════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Dark theme (default) */
  --bg-primary:    #0a0c10;
  --bg-secondary:  #0f1117;
  --bg-card:       #131720;
  --bg-card-hover: #181e2a;
  --bg-input:      #0f1117;

  --text-primary:  #e8eaf0;
  --text-secondary:#8a92a6;
  --text-muted:    #4a5264;

  --accent:        #00d4ff;
  --accent-dim:    rgba(0, 212, 255, 0.12);
  --accent-glow:   rgba(0, 212, 255, 0.35);
  --green:         #00ff87;
  --green-dim:     rgba(0, 255, 135, 0.1);
  --amber:         #ffa500;
  --red:           #ff4757;

  --border:        rgba(255,255,255,0.07);
  --border-accent: rgba(0, 212, 255, 0.3);

  --nav-bg:        rgba(10, 12, 16, 0.92);
  --nav-height:    68px;

  --radius-sm:  6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

[data-theme="light"] {
  --bg-primary:    #f0f2f5;
  --bg-secondary:  #ffffff;
  --bg-card:       #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input:      #f4f6f9;

  --text-primary:  #0f1117;
  --text-secondary:#4a5264;
  --text-muted:    #8a92a6;

  --accent:        #0077ff;
  --accent-dim:    rgba(0, 119, 255, 0.08);
  --accent-glow:   rgba(0, 119, 255, 0.2);
  --green:         #00aa55;
  --green-dim:     rgba(0, 170, 85, 0.1);

  --border:        rgba(0,0,0,0.08);
  --border-accent: rgba(0, 119, 255, 0.25);
  --nav-bg:        rgba(240, 242, 245, 0.95);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
}

/* ── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }

/* ── PAGE LOADER ─────────────────────────────────────────────── */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-terminal {
  width: min(400px, 90vw);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}
.loader-line { color: var(--text-secondary); margin-bottom: 16px; }
.loader-line .prompt { color: var(--accent); margin-right: 8px; }
.loader-line .cmd { color: var(--text-primary); }
.loader-bar {
  height: 3px; background: var(--border);
  border-radius: 999px; overflow: hidden;
}
#loader-progress {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 999px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── BACKGROUND ──────────────────────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
}
[data-theme="light"] .bg-grid { opacity: 0.3; }

.bg-glow {
  position: fixed; top: -30vh; right: -20vw; z-index: 0; pointer-events: none;
  width: 80vw; height: 80vh;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 65%);
  opacity: 0.35;
}

/* ── NAVIGATION ──────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
}
#navbar.scrolled { border-color: var(--border-accent); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.nav-container {
  max-width: 1280px; margin: 0 auto;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; gap: 32px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 2px;
  flex-shrink: 0;
  transition: color var(--transition);
}
.nav-logo:hover { color: var(--accent); }
.logo-bracket { color: var(--accent); }
.logo-cursor { color: var(--accent); animation: blink 1.2s step-end infinite; }

.nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center;
}
.nav-link {
  font-family: var(--font-mono);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-dim); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

#theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition);
}
#theme-toggle:hover { color: var(--accent); border-color: var(--border-accent); }

.btn-resume {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600;
  padding: 7px 16px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.btn-resume:hover { background: var(--accent); color: var(--bg-primary); }

.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.hamburger span {
  width: 18px; height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  backdrop-filter: blur(20px);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu .nav-link { display: block; padding: 10px 14px; font-size: 0.9rem; }

/* ── FLASH MESSAGES ──────────────────────────────────────────── */
.flash-messages {
  position: fixed; top: calc(var(--nav-height) + 12px); right: 20px;
  z-index: 999; display: flex; flex-direction: column; gap: 8px;
  max-width: 380px;
}
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  box-shadow: var(--shadow-card);
  animation: slideIn 0.3s ease;
}
.flash--success { border-color: var(--green); }
.flash--success i { color: var(--green); }
.flash--error { border-color: var(--red); }
.flash--error i { color: var(--red); }
.flash-close { margin-left: auto; color: var(--text-muted); font-size: 1.1rem; transition: color var(--transition); }
.flash-close:hover { color: var(--text-primary); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
  padding: 12px 24px; border-radius: var(--radius-sm);
  transition: all var(--transition); cursor: pointer;
  white-space: nowrap; border: 1px solid transparent;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--accent); color: var(--bg-primary);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
  background: transparent; color: var(--accent);
  box-shadow: 0 0 30px var(--accent-glow);
}
.btn-outline {
  background: transparent; color: var(--accent);
  border-color: var(--border-accent);
}
.btn-outline:hover { background: var(--accent-dim); }
.btn-ghost {
  background: var(--bg-card); color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); }
.btn-full { width: 100%; }

/* ── SECTION LAYOUT ──────────────────────────────────────────── */
.section { position: relative; z-index: 1; padding: 120px 0; }
.section-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.section-header { margin-bottom: 64px; }
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem; font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: lowercase;
  display: block; margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-title .accent { color: var(--accent); }

/* ── HERO SECTION ────────────────────────────────────────────── */
.hero-section {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: calc(var(--nav-height) + 40px) 0 80px;
}
.hero-container {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center; width: 100%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--green); background: var(--green-dim);
  border: 1px solid rgba(0,255,135,0.2);
  padding: 6px 14px; border-radius: 999px;
  margin-bottom: 20px;
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.status-dot.pulse {
  animation: pulse-green 2s ease-in-out infinite;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.9rem; color: var(--text-muted);
  margin-bottom: 12px;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.hero-title-wrapper {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 1.1rem;
  color: var(--accent); margin-bottom: 24px;
  min-height: 2em;
}
.hero-title-prefix { color: var(--text-muted); }
.typed-cursor { animation: blink 1s step-end infinite; }

.hero-tagline {
  font-size: 1rem; line-height: 1.7;
  color: var(--text-secondary);
  max-width: 520px; margin-bottom: 36px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 48px; }

.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem; font-weight: 800;
  color: var(--accent); line-height: 1;
}
.stat-suffix { font-size: 1.4rem; color: var(--accent); font-weight: 700; }
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  display: block; margin-top: 4px;
}

/* ── TERMINAL CARD ───────────────────────────────────────────── */
.hero-visual { position: relative; }

.terminal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 40px var(--accent-glow);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}
.terminal-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.terminal-dots { display: flex; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #28c840; }
.terminal-title { font-size: 0.75rem; color: var(--text-muted); margin: 0 auto; }
.terminal-body { padding: 20px; min-height: 260px; }
.term-line { line-height: 1.8; }
.term-line .prompt { color: var(--accent); margin-right: 8px; }
.term-line .cmd { color: var(--text-primary); }
.term-line.output { padding-left: 20px; color: var(--text-secondary); }
.term-line .key { color: var(--accent); }
.term-line .val { color: var(--amber); }
.term-line .val-green { color: var(--green); }

.float-badge {
  position: absolute;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border-accent);
  color: var(--accent); padding: 8px 14px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-card);
  animation: float 4s ease-in-out infinite;
  white-space: nowrap;
}
.badge-1 { top: -20px; right: 20px; animation-delay: 0s; }
.badge-2 { bottom: 60px; right: -30px; animation-delay: 1.5s; }
.badge-3 { bottom: -20px; left: 20px; animation-delay: 0.8s; }

.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.15em;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}

/* ── ABOUT SECTION ───────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 80px; align-items: center;
}
.about-image-wrapper {
  position: relative; aspect-ratio: 1;
  max-width: 380px;
}
.about-avatar {
  width: 100%; border-radius: var(--radius-lg);
  border: 2px solid var(--border-accent);
  position: relative; z-index: 1;
  transition: transform var(--transition);
}
.about-avatar:hover { transform: translateY(-4px); }
.about-avatar-placeholder {
  width: 100%; aspect-ratio: 1;
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem; color: var(--accent);
}
.about-image-decoration {
  position: absolute; top: 20px; left: 20px; right: -20px; bottom: -20px;
  border: 2px solid var(--accent-dim); border-radius: var(--radius-lg);
  z-index: 0;
}
.about-badge-stack { position: absolute; bottom: -16px; right: -16px; z-index: 2; }
.about-badge {
  background: var(--accent); color: var(--bg-primary);
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  padding: 8px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
}

.about-text { margin-bottom: 32px; }
.about-text p { color: var(--text-secondary); line-height: 1.8; }

.about-highlights {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 36px;
}
.highlight-item {
  display: flex; gap: 14px;
  padding: 16px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color var(--transition);
}
.highlight-item:hover { border-color: var(--border-accent); }
.highlight-item > i {
  font-size: 1.2rem; color: var(--accent);
  margin-top: 2px; flex-shrink: 0;
}
.highlight-item h4 {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 4px;
}
.highlight-item p { font-size: 0.8rem; color: var(--text-muted); }

.about-cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── SKILLS SECTION ──────────────────────────────────────────── */
.skills-section { background: var(--bg-secondary); }

.skills-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px;
}
.skill-tab {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-secondary);
  background: var(--bg-card); transition: all var(--transition);
  display: flex; align-items: center; gap: 8px;
}
.skill-tab:hover { border-color: var(--border-accent); color: var(--accent); }
.skill-tab.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }

.skills-panel { display: none; }
.skills-panel.active { display: block; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.skill-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 18px 20px;
  transition: all var(--transition);
  animation: fadeUp 0.4s ease calc(var(--delay) * 0.06s) both;
}
.skill-card:hover { border-color: var(--border-accent); transform: translateY(-2px); }

.skill-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.skill-icon {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 1.1rem; flex-shrink: 0;
}
.skill-icon img { width: 24px; height: 24px; object-fit: contain; }
.skill-name {
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600;
  color: var(--text-primary); flex: 1;
}
.skill-level { font-size: 0.72rem; color: var(--text-muted); font-family: var(--font-mono); }

.skill-bar-wrapper { display: flex; align-items: center; gap: 10px; }
.skill-bar {
  flex: 1; height: 4px; background: var(--border);
  border-radius: 999px; overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 6px var(--accent-glow);
}
.skill-pct { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent); min-width: 36px; text-align: right; }

/* ── PROJECTS ────────────────────────────────────────────────── */
.project-filters {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 48px;
}
.filter-btn {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  padding: 7px 18px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-secondary);
  background: var(--bg-card); transition: all var(--transition); cursor: pointer;
}
.filter-btn:hover { border-color: var(--border-accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}
.projects-grid--compact { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

.project-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition-slow);
  animation: fadeUp 0.4s ease calc(var(--delay) * 0.1s) both;
}
.project-card:hover { border-color: var(--border-accent); transform: translateY(-6px); box-shadow: var(--shadow-card), 0 0 30px var(--accent-glow); }
.project-card.hidden { display: none; }

.project-thumbnail {
  position: relative; overflow: hidden; aspect-ratio: 16/9;
}
.project-thumbnail img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-thumbnail img { transform: scale(1.05); }
.project-thumb-placeholder {
  width: 100%; height: 100%; min-height: 180px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: var(--text-muted);
}
.project-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: var(--bg-primary);
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.project-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.project-card:hover .project-overlay { opacity: 1; }
.overlay-btn {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600;
  color: var(--accent); border: 1px solid var(--accent);
  padding: 8px 20px; border-radius: var(--radius-sm);
  background: var(--accent-dim);
  transition: all var(--transition);
}
.overlay-btn:hover { background: var(--accent); color: var(--bg-primary); }

.project-body { padding: 20px; }
.project-title {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px; line-height: 1.3;
}
.project-title a { transition: color var(--transition); }
.project-title a:hover { color: var(--accent); }
.project-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 14px; line-height: 1.6; }

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tech-tag {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--tag-color, var(--accent));
  color: var(--tag-color, var(--accent));
  background: color-mix(in srgb, var(--tag-color, var(--accent)) 10%, transparent);
}
.tech-tag--lg { font-size: 0.8rem; padding: 5px 14px; }

.project-links { display: flex; gap: 12px; flex-wrap: wrap; }
.project-link {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600;
  color: var(--text-muted); display: flex; align-items: center; gap: 5px;
  transition: color var(--transition);
}
.project-link:hover { color: var(--text-primary); }
.project-link--live { color: var(--green); }
.project-link--live:hover { color: var(--text-primary); }
.project-link--detail { color: var(--accent); }

.section-cta { text-align: center; margin-top: 48px; }

.empty-state { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.9rem; }
.empty-state-card {
  text-align: center; padding: 80px 40px;
  background: var(--bg-card); border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state-card i { font-size: 3rem; margin-bottom: 16px; }
.empty-state-card p { font-size: 0.9rem; }

/* ── CONTACT SECTION ─────────────────────────────────────────── */
.contact-section { background: var(--bg-secondary); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }

.contact-intro { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 36px; }
.contact-channels { display: flex; flex-direction: column; gap: 12px; }
.channel-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: all var(--transition);
}
.channel-card:hover { border-color: var(--border-accent); transform: translateX(4px); }
.channel-card--whatsapp:hover { border-color: #25d366; }
.channel-card--whatsapp .channel-icon { color: #25d366; background: rgba(37,211,102,0.1); }
.channel-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--accent-dim); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.channel-info { display: flex; flex-direction: column; flex: 1; }
.channel-label { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.channel-value { font-size: 0.9rem; color: var(--text-primary); font-weight: 500; }
.channel-arrow { color: var(--text-muted); font-size: 0.8rem; }

/* Contact Form */
.contact-form-col {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.05em;
}
.form-group .form-control {
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 11px 14px;
  color: var(--text-primary); font-family: var(--font-body); font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; width: 100%;
}
.form-group .form-control:focus { border-color: var(--border-accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-group textarea.form-control { resize: vertical; min-height: 120px; }
.field-error { font-size: 0.75rem; color: var(--red); font-family: var(--font-mono); }

.form-result {
  margin-top: 14px; padding: 0; overflow: hidden;
  transition: all var(--transition);
}
.form-result.success { color: var(--green); font-family: var(--font-mono); font-size: 0.85rem; padding: 12px 0; }
.form-result.error { color: var(--red); font-family: var(--font-mono); font-size: 0.85rem; padding: 12px 0; }

/* ── PROJECT DETAIL ──────────────────────────────────────────── */
.project-detail-section { padding: calc(var(--nav-height) + 60px) 0 120px; position: relative; z-index: 1; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
  margin-bottom: 40px;
}
.breadcrumb a { color: var(--accent); transition: opacity var(--transition); }
.breadcrumb a:hover { opacity: 0.8; }
.breadcrumb span[aria-hidden] { color: var(--text-muted); }

.project-detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 48px; align-items: start; }

.project-detail-header { margin-bottom: 32px; }
.project-status {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; border: 1px solid;
  display: inline-block; margin-bottom: 16px;
}
.status-completed { color: var(--green); border-color: var(--green); background: var(--green-dim); }
.status-active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.status-archived { color: var(--text-muted); border-color: var(--text-muted); }

.project-detail-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800; color: var(--text-primary);
  letter-spacing: -0.02em; line-height: 1.1;
  margin-bottom: 12px;
}
.project-detail-short { font-size: 1rem; color: var(--text-secondary); line-height: 1.7; }

.gallery-hero { width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 12px; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 80px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); border: 2px solid var(--border); cursor: pointer; transition: border-color var(--transition); }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--accent); }

.project-description { margin-top: 40px; }
.project-description h2 { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; margin-bottom: 16px; }
.rich-text { color: var(--text-secondary); line-height: 1.85; }
.rich-text p { margin-bottom: 16px; }

.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 22px;
  margin-bottom: 16px;
}
.sidebar-card h3 {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.sidebar-links { display: flex; flex-direction: column; gap: 10px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-secondary);
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--text-secondary);
  transition: all var(--transition);
}
.sidebar-link:hover { border-color: var(--border-accent); color: var(--accent); }
.sidebar-link--primary { background: var(--accent); color: var(--bg-primary); border-color: var(--accent); }
.sidebar-link--primary:hover { background: transparent; color: var(--accent); }

.tech-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 0.85rem; }
.meta-list dt { color: var(--text-muted); font-family: var(--font-mono); font-size: 0.75rem; }
.meta-list dd { color: var(--text-primary); }
.sidebar-cta { text-align: center; }
.sidebar-cta p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 14px; }

.related-projects { margin-top: 80px; }
.related-title { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin-bottom: 32px; }

/* ── PROJECTS PAGE ───────────────────────────────────────────── */
.projects-page-section { padding: calc(var(--nav-height) + 60px) 0 120px; position: relative; z-index: 1; }
.page-hero { margin-bottom: 56px; }
.page-title { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.page-subtitle { font-size: 1rem; color: var(--text-secondary); margin-top: 12px; }

/* ── FOOTER ──────────────────────────────────────────────────── */
#footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary); padding: 72px 0 32px;
}
.footer-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-logo { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.footer-tagline { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.9rem;
  transition: all var(--transition);
}
.footer-social a:hover { color: var(--accent); border-color: var(--border-accent); background: var(--accent-dim); }
.footer-links h4, .footer-contact h4 {
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.875rem; color: var(--text-secondary); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-contact a {
  font-size: 0.875rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
  transition: color var(--transition);
}
.footer-contact a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted);
}
.terminal-text { color: var(--accent); }
.footer-status { display: flex; align-items: center; gap: 8px; }
.footer-status .status-dot { background: var(--green); width: 7px; height: 7px; animation: pulse-green 2s infinite; }

/* ── SCROLL TO TOP ───────────────────────────────────────────── */
#scroll-top {
  position: fixed; bottom: 28px; right: 28px; z-index: 900;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border-accent);
  color: var(--accent); font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all var(--transition);
}
#scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-top:hover { background: var(--accent); color: var(--bg-primary); }

/* ── REVEAL ANIMATIONS ───────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.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; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── KEYFRAMES ───────────────────────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(-8px)} }
@keyframes pulse-green { 0%,100%{box-shadow:0 0 0 0 rgba(0,255,135,0.4)} 50%{box-shadow:0 0 0 6px rgba(0,255,135,0)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }
@keyframes spin { to{transform:rotate(360deg)} }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-container { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: -1; max-width: 520px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-image-wrapper { max-width: 280px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .project-detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .about-highlights { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-stats { gap: 24px; }
  .section { padding: 80px 0; }
  .float-badge { display: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .contact-form-col { padding: 24px; }
}

/* ── UTILITY ─────────────────────────────────────────────────── */
::selection { background: var(--accent-dim); color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0 }
