/* ================================================================
   CYBERSECURITY PORTFOLIO — style.css
   Author:   Your Name
   Version:  1.0
   Theme:    Dark terminal / cyberpunk professional

   TABLE OF CONTENTS:
   01. CSS Variables & Resets
   02. Global / Base Styles
   03. Loader
   04. Navbar
   05. Hero Section
   06. About Section
   07. Skills Section
   08. Projects Section
   09. Writeups / Blog Section
   10. Certifications Section
   11. Achievements Section
   12. Contact Section
   13. Footer
   14. Back-to-top Button
   15. Utility Classes
   16. Scroll Reveal Animations
   17. Responsive / Mobile
================================================================ */

/* ----------------------------------------------------------------
   01. CSS VARIABLES & RESETS
---------------------------------------------------------------- */
:root {
  /* Core palette */
  --bg-primary:    #070b0f;
  --bg-secondary:  #0c1219;
  --bg-card:       #0f1822;
  --bg-card-hover: #131f2e;

  /* Accent colors */
  --accent-blue:   #00c8ff;
  --accent-green:  #00ff9d;
  --accent-dim:    #0a8fb5;
  --accent-glow:   rgba(0, 200, 255, 0.15);

  /* Text */
  --text-primary:   #e4f0fb;
  --text-secondary: #7a9bb8;
  --text-muted:     #3d5568;
  --text-code:      #00ff9d;

  /* Borders */
  --border:         #1a2e42;
  --border-bright:  #0a4a6e;

  /* Status colors */
  --status-green:  #00ff9d;
  --status-yellow: #ffd700;
  --status-red:    #ff4444;
  --status-orange: #ff8c00;

  /* Typography */
  --font-mono:    'Share Tech Mono', 'Courier New', monospace;
  --font-heading: 'Rajdhani', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing & sizing */
  --nav-h:   70px;
  --radius:  6px;
  --radius-lg: 12px;

  /* Transitions */
  --transition: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

/* Remove default list styles */
ul { list-style: none; }

/* Default link styles */
a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Focus ring for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----------------------------------------------------------------
   02. GLOBAL / BASE STYLES
---------------------------------------------------------------- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 110px 0 80px;
  position: relative;
}

/* Section header */
.section-header {
  margin-bottom: 60px;
  position: relative;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-blue);
  letter-spacing: 3px;
  margin-bottom: 8px;
  opacity: 0.8;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}

.title-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), transparent);
  margin-top: 14px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 600px;
  margin-bottom: 40px;
  margin-top: -30px;
}

/* Accent text */
.accent-text { color: var(--accent-blue); }

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

#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  width: 300px;
}

.loader-logo {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent-blue);
  letter-spacing: 6px;
  margin-bottom: 28px;
  animation: flicker 1.5s infinite;
}

.loader-bar {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 16px;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  animation: load-progress 2s ease forwards;
}

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

@keyframes load-progress {
  0%   { width: 0%; }
  60%  { width: 70%; }
  100% { width: 100%; }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

/* ----------------------------------------------------------------
   04. NAVBAR
---------------------------------------------------------------- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--transition), border-bottom var(--transition);
}

#navbar.scrolled {
  background: rgba(7, 11, 15, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

/* Logo */
.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  letter-spacing: 2px;
  transition: color var(--transition);
}
.nav-logo:hover { color: var(--accent-blue); }
.logo-bracket { color: var(--accent-blue); }
.logo-text     { color: var(--text-primary); }

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 1px;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent-blue);
  background: var(--accent-glow);
}

/* CTA button in nav */
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-blue);
  border: 1px solid var(--accent-blue);
  padding: 6px 16px;
  border-radius: var(--radius);
  letter-spacing: 1px;
  transition: background var(--transition), color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-cta:hover {
  background: var(--accent-blue);
  color: var(--bg-primary);
}
.cta-arrow { font-size: 0.9rem; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.ham-line {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open .ham-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open .ham-line:nth-child(2) { opacity: 0; }
.hamburger.open .ham-line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  background: rgba(7, 11, 15, 0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 20px 5%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.mobile-menu.open {
  max-height: 600px;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-link {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: var(--radius);
  letter-spacing: 1px;
  display: block;
  transition: color var(--transition), background var(--transition);
}
.mobile-link:hover   { color: var(--accent-blue); background: var(--accent-glow); }
.mobile-resume       { color: var(--accent-green); margin-top: 8px; }

/* ----------------------------------------------------------------
   05. HERO SECTION
---------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 5%;
  overflow: hidden;
}

/* Canvas background */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Scanlines overlay */
.scanlines {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.04) 2px,
    rgba(0, 0, 0, 0.04) 4px
  );
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding-top: var(--nav-h);
}

/* Terminal prompt line */
.hero-prompt {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.prompt-prefix { color: var(--accent-green); }
.prompt-cmd    { color: var(--accent-blue); }

/* Name */
.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.name-line {
  display: block;
  color: var(--text-primary);
}

.name-line.accent {
  color: var(--accent-blue);
  text-shadow: 0 0 30px rgba(0, 200, 255, 0.4);
}

/* Typed title */
.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--accent-green);
  letter-spacing: 2px;
  margin-bottom: 24px;
  min-height: 1.6em;
}

.cursor-blink {
  display: inline-block;
  font-family: var(--font-mono);
  color: var(--accent-green);
  animation: blink 1s step-end infinite;
}

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

/* Tagline */
.hero-tagline {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 24px;
  line-height: 1.8;
}

/* Status Badges */
.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.badge-green {
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.3);
  color: var(--accent-green);
}

.badge-blue {
  background: var(--accent-glow);
  border: 1px solid rgba(0, 200, 255, 0.3);
  color: var(--accent-blue);
}

/* CTA Buttons */
.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 13px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-blue);
  color: var(--bg-primary);
  border-color: var(--accent-blue);
  font-weight: 600;
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent-blue);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-green);
  border-color: var(--accent-green);
}
.btn-secondary:hover {
  background: rgba(0, 255, 157, 0.1);
  box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
}

.btn-icon { font-size: 1rem; }

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-blue);
  line-height: 1;
}

.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
}

.stat-divider {
  color: var(--border);
  font-size: 1.5rem;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  right: 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  writing-mode: vertical-rl;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent-blue), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50%       { opacity: 0.4; transform: scaleY(0.6); }
}

/* ----------------------------------------------------------------
   06. ABOUT SECTION
---------------------------------------------------------------- */
.about-section {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: start;
}

/* Terminal card */
.about-terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.terminal-header {
  background: #111d28;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.t-red    { background: #ff5f57; }
.t-yellow { background: #ffbd2e; }
.t-green  { background: #28c840; }

.t-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
  letter-spacing: 1px;
}

.terminal-body {
  padding: 24px;
}

.terminal-body pre {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
}

.terminal-body code { font-family: inherit; }
.t-key  { color: var(--accent-blue); }
.t-val  { color: var(--accent-green); }
.t-cmd  { color: var(--accent-blue); }
.t-comment { color: var(--text-muted); }

/* Bio text */
.bio-text {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.97rem;
  line-height: 1.85;
}

.bio-text strong { font-weight: 500; }

/* Interest tags */
.interest-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  transition: border-color var(--transition), color var(--transition);
}
.tag:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* ----------------------------------------------------------------
   07. SKILLS SECTION
---------------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.skill-category:hover {
  border-color: var(--border-bright);
  box-shadow: 0 0 20px rgba(0, 200, 255, 0.05);
}

.skill-cat-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-icon { font-size: 1.1rem; }

/* Skill bars */
.skill-bars { display: flex; flex-direction: column; gap: 18px; }

.skill-item {}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}

.skill-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.skill-pct {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-blue);
}

.skill-bar {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0%;                /* animated by JS */
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-blue));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Tool badge tags */
.tool-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tool-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 6px 14px;
  background: rgba(0, 200, 255, 0.05);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--accent-blue);
  letter-spacing: 0.5px;
  transition: background var(--transition), transform var(--transition);
}
.tool-badge:hover {
  background: rgba(0, 200, 255, 0.12);
  transform: translateY(-2px);
}

/* ----------------------------------------------------------------
   08. PROJECTS SECTION
---------------------------------------------------------------- */
.projects-section {
  background: var(--bg-primary);
}

/* Filter buttons */
.project-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 7px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 1px;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

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

/* Project card */
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

/* Glowing top border on hover */
.project-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-green));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-slow);
}
.project-card:hover::before { transform: scaleX(1); }

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-bright);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  background: var(--bg-card-hover);
}

/* Card header row */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.card-category {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent-blue);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.card-status {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.status-complete {
  background: rgba(0, 255, 157, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.status-wip {
  background: rgba(255, 215, 0, 0.08);
  color: var(--status-yellow);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Card title */
.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
}

/* Card description */
.card-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.75;
  flex: 1;
}

/* Tool tags on cards */
.card-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tool-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 10px;
  background: rgba(0, 200, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Card action buttons */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.card-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 7px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  cursor: pointer;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-github {
  background: transparent;
  border-color: var(--border-bright);
  color: var(--text-secondary);
}
.btn-github:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: var(--accent-glow);
}

.btn-report {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}
.btn-report:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(0, 255, 157, 0.06);
}

/* Hidden cards (filter) */
.project-card.hidden {
  display: none;
}

/* ----------------------------------------------------------------
   09. WRITEUPS / BLOG SECTION
---------------------------------------------------------------- */
.writeups-section {
  background: var(--bg-secondary);
}

.writeups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.writeup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition), border-color var(--transition);
  position: relative;
}

.writeup-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent-blue), var(--accent-green));
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  opacity: 0;
  transition: opacity var(--transition);
}
.writeup-card:hover::after   { opacity: 1; }
.writeup-card:hover {
  transform: translateX(6px);
  border-color: var(--border-bright);
}

.writeup-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.writeup-date {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.writeup-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 3px 10px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 200, 255, 0.2);
  border-radius: 10px;
  color: var(--accent-blue);
  letter-spacing: 1px;
}

.writeup-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
  line-height: 1.4;
}

.writeup-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.75;
  flex: 1;
}

.writeup-link {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-blue);
  letter-spacing: 1px;
  margin-top: 8px;
  transition: letter-spacing var(--transition);
}
.writeup-link:hover { letter-spacing: 2px; }

/* ----------------------------------------------------------------
   10. CERTIFICATIONS SECTION
---------------------------------------------------------------- */
.certs-section {
  background: var(--bg-primary);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.cert-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-bright);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.cert-icon {
  font-size: 2rem;
  line-height: 1;
}

.cert-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.cert-issuer {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-top: 3px;
}

.cert-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 1px;
  margin-top: 6px;
}

.cert-status.earned {
  background: rgba(0, 255, 157, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 157, 0.2);
}
.cert-status.in-progress {
  background: rgba(255, 215, 0, 0.08);
  color: var(--status-yellow);
  border: 1px solid rgba(255, 215, 0, 0.2);
}
.cert-status.planned {
  background: rgba(61, 85, 104, 0.3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.cert-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cert-bar {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.cert-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-blue));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.cert-pct {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  min-width: 32px;
  text-align: right;
}

/* ----------------------------------------------------------------
   11. ACHIEVEMENTS SECTION
---------------------------------------------------------------- */
.achievements-section {
  background: var(--bg-secondary);
}

.achievements-timeline {
  position: relative;
  padding-left: 32px;
}

/* Vertical line */
.achievements-timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-blue), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -29px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-blue);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.5);
  border: 2px solid var(--bg-secondary);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition), transform var(--transition);
}
.timeline-item:hover .timeline-content {
  border-color: var(--border-bright);
  transform: translateX(6px);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.timeline-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 12px;
  border-radius: 10px;
  letter-spacing: 1px;
}

.type-ctf {
  background: rgba(0, 200, 255, 0.08);
  color: var(--accent-blue);
  border: 1px solid rgba(0, 200, 255, 0.2);
}
.type-academic {
  background: rgba(0, 255, 157, 0.08);
  color: var(--accent-green);
  border: 1px solid rgba(0, 255, 157, 0.2);
}
.type-award {
  background: rgba(255, 215, 0, 0.08);
  color: var(--status-yellow);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ----------------------------------------------------------------
   12. CONTACT SECTION
---------------------------------------------------------------- */
.contact-section {
  background: var(--bg-primary);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contact-sub {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Contact link rows */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: all var(--transition);
  text-decoration: none;
}
.contact-link:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
  transform: translateX(6px);
}

.contact-link-icon {
  font-size: 1.2rem;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  flex-shrink: 0;
}

.contact-link-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-platform {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.link-handle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.link-arrow {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color var(--transition), transform var(--transition);
}
.contact-link:hover .link-arrow {
  color: var(--accent-blue);
  transform: translateX(4px);
}

/* Resume DL button in contact */
.resume-dl-btn {
  margin-top: 20px;
  width: 100%;
  justify-content: center;
  font-size: 0.82rem;
}

/* ----------------------------------------------------------------
   13. FOOTER
---------------------------------------------------------------- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 28px 5%;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

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

.footer-bracket { color: var(--accent-blue); }

.footer-copy a {
  color: var(--accent-blue);
  text-decoration: none;
}
.footer-copy a:hover { text-decoration: underline; }

.footer-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 1px;
}

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

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.6; transform: scale(0.85); }
}

/* ----------------------------------------------------------------
   14. BACK-TO-TOP BUTTON
---------------------------------------------------------------- */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  color: var(--accent-blue);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition), transform var(--transition), background var(--transition);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  background: var(--accent-glow);
}

/* ----------------------------------------------------------------
   15. UTILITY CLASSES
---------------------------------------------------------------- */
.hidden   { display: none !important; }
.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;
}

/* ----------------------------------------------------------------
   16. SCROLL REVEAL ANIMATIONS
   Elements start invisible; JS adds .in-view class when visible
---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Delay helpers — add data-delay="1..6" to the element */
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------------------------------------
   17. RESPONSIVE / MOBILE
---------------------------------------------------------------- */
@media (max-width: 1024px) {
  .skills-grid    { grid-template-columns: 1fr; }
  .about-grid     { grid-template-columns: 1fr; gap: 40px; }
  .contact-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-terminal { position: static; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }

  /* Nav */
  .nav-links    { display: none; }
  .hamburger    { display: flex; }
  .mobile-menu  { display: block; }

  /* Hero */
  .hero-content { padding-top: calc(var(--nav-h) + 16px); }
  .hero-name    { font-size: clamp(2.4rem, 12vw, 4rem); }
  .hero-stats   { gap: 16px; }
  .stat-num     { font-size: 1.5rem; }

  /* Sections */
  .section { padding: 80px 0 60px; }

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

  /* Certs */
  .certs-grid { grid-template-columns: 1fr 1fr; }

  /* Timeline */
  .achievements-timeline { padding-left: 24px; }

  /* Scroll indicator */
  .scroll-indicator { display: none; }
}

@media (max-width: 480px) {
  .hero-buttons  { flex-direction: column; }
  .btn           { width: 100%; justify-content: center; }
  .certs-grid    { grid-template-columns: 1fr; }
  .hero-badges   { flex-direction: column; }
  .filter-btn    { font-size: 0.65rem; padding: 5px 12px; }
  .project-filters { gap: 6px; }
}
