/* ==========================================================================
   HAIDER MOHSIN — SOFTWARE ENGINEER & CYBERSECURITY RESEARCHER PORTFOLIO
   Sharp Colors, Hard Geometry, Zero Gradients (Industrial IDE & Lab Aesthetic)
   ========================================================================== */

/* ── GOOGLE FONTS ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&family=Space+Grotesk:wght@600;700;800&display=swap');

/* ── COLOR & DESIGN TOKENS (SOLID FLAT COLORS) ──────────────────────────── */
:root {
  /* Dark Charcoal Foundation */
  --bg-deep:        #080A0D;
  --bg-surface:     #0D1117;
  --bg-surface-2:   #11161C;
  --bg-card:        #11161C;
  --bg-card-hover:  #161C24;
  --bg-terminal:    #050608;

  /* Hard Borders & Technical Lines */
  --border-subtle:  #27303A;
  --border-bright:  #3A4756;
  --border-cyan:    #00E5FF;
  --border-green:   #00E676;
  --border-blue:    #2979FF;

  /* Typography */
  --text-main:      #F5F7FA;
  --text-sub:       #9CA3AF;
  --text-muted:     #6B7280;

  /* Solid Accent Colors (Flat Signals — No Blending) */
  --accent-cyan:    #00E5FF;
  --accent-blue:    #2979FF;
  --accent-green:   #00E676;
  --accent-amber:   #FFB300;
  --accent-red:     #FF3D00;

  /* Fonts */
  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Geometry & Radii (Sharp 0–4px) */
  --max-w:        1200px;
  --nav-height:   64px;
  --radius-none:  0px;
  --radius-sm:    2px;
  --radius-md:    4px;
  --radius-lg:    6px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

::selection {
  background: var(--accent-cyan);
  color: #000000;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

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

/* Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent-cyan);
  width: 0%;
  z-index: 1000;
  transition: width 100ms ease-out;
}

/* ── TECHNICAL BLUEPRINT GRID BACKGROUND ─────────────────────────────────── */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(39, 48, 58, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 48, 58, 0.25) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── TYPOGRAPHY & TECHNICAL HEADERS ──────────────────────────────────────── */
.heading-xl {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
}

.heading-lg {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
}

.heading-md {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
}

.heading-sm {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

/* Monospace Editorial Section Tags */
.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.text-cyan { color: var(--accent-cyan); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-amber { color: var(--accent-amber); }

/* Technical Divider */
.tech-divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0 32px;
  position: relative;
}

.tech-divider::after {
  content: '■';
  position: absolute;
  left: 0;
  top: -8px;
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

/* ── NAVBAR (SHARP HARD-EDGED TOOLBAR) ───────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-glass {
  width: 100%;
  max-width: var(--max-w);
  height: var(--nav-height);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
}

.nav-logo-badge {
  width: 28px;
  height: 28px;
  background: var(--accent-cyan);
  color: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  position: relative;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a.active {
  color: var(--accent-cyan);
  font-weight: 700;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-cyan);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 0;
  transition: all 200ms ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
  background-color: var(--accent-cyan);
}

.nav-toggle.open span:nth-child(2) {
  transform: translateY(-3.5px) rotate(-45deg);
  background-color: var(--accent-cyan);
}

/* ── BUTTONS & RECTANGULAR BADGES ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 150ms ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-cyan);
  color: #000000;
}

.btn-primary:hover {
  background: #33eaff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-2);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-sub);
}

.btn-ghost:hover {
  color: var(--accent-cyan);
}

/* Rectangular Badges [ TAG ] */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-status {
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid var(--accent-green);
  color: var(--accent-green);
}

.badge-tech {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
}

.badge-tech:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.badge-lang {
  background: rgba(41, 121, 255, 0.1);
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
}

/* ── HERO SECTION ────────────────────────────────────────────────────────── */
.hero-section {
  padding: 130px 0 80px;
  position: relative;
}

.hero-grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero-subhead {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-title {
  margin-bottom: 14px;
  color: var(--text-main);
}

.hero-roles {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.hero-roles span {
  color: var(--accent-cyan);
}

.hero-desc {
  font-size: 1.02rem;
  color: var(--text-sub);
  line-height: 1.8;
  max-width: 520px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── CHARCOAL / CYAN TERMINAL ────────────────────────────────────────────── */
.terminal-window {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
}

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

.terminal-controls {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
}
.terminal-dot.close { background: var(--accent-red); }
.terminal-dot.min   { background: var(--accent-amber); }
.terminal-dot.max   { background: var(--accent-green); }

.terminal-tabs {
  display: flex;
  gap: 2px;
}

.terminal-tab {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms ease;
}

.terminal-tab:hover {
  color: var(--text-main);
}

.terminal-tab.active {
  color: var(--accent-cyan);
  background: var(--bg-surface-2);
  border-color: var(--border-subtle);
}

.terminal-body {
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  min-height: 260px;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.85;
}

.terminal-line {
  margin-bottom: 4px;
}

.t-prompt { color: var(--accent-cyan); font-weight: bold; }
.t-cmd    { color: #F5F7FA; font-weight: 500; }
.t-info   { color: var(--accent-blue); }
.t-warn   { color: var(--accent-amber); }
.t-success{ color: var(--accent-green); }
.t-dim    { color: var(--text-muted); }

.t-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  background-color: var(--accent-cyan);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-end infinite;
}

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

/* ── SECTION LAYOUTS ─────────────────────────────────────────────────────── */
.section {
  padding: 80px 0;
  position: relative;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 40px;
}

.section-description {
  color: var(--text-sub);
  font-size: 1rem;
  margin-top: 8px;
}

/* ── ABOUT SECTION ───────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: start;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 28px;
}

.profile-avatar-wrap {
  width: 70px;
  height: 70px;
  background: var(--accent-cyan);
  color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.profile-status {
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.profile-status-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-green);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.about-text-content p {
  color: var(--text-sub);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.about-highlight-box {
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.about-highlight-box h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.about-highlight-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── SKILLS SECTION (SPECIFICATION SHEET LAYOUT) ─────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.skill-cat-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
}

.skill-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ── PROJECTS SECTION (NUMBERS & HARD GEOMETRY) ─────────────────────────── */
.projects-header-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}

.project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-sub);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 150ms ease;
}

.filter-btn:hover {
  color: var(--text-main);
  border-color: var(--border-bright);
}

.filter-btn.active {
  color: #000000;
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  font-weight: 700;
}

/* Search input */
.project-search-wrap {
  position: relative;
  min-width: 220px;
}

.project-search-input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  outline: none;
}

.project-search-input:focus {
  border-color: var(--accent-cyan);
}

.project-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Featured Projects Layout */
.featured-projects-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.project-card-featured {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  transition: border-color 150ms ease, transform 150ms ease;
  cursor: pointer;
}

.project-card-featured:hover {
  border-color: var(--border-bright);
  border-left-color: var(--accent-cyan);
  transform: translateY(-2px);
}

.project-info {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.project-num-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 2px;
  color: var(--text-main);
}

.project-subtitle {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin-bottom: 14px;
}

.project-description {
  color: var(--text-sub);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 18px;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-preview-window {
  background: var(--bg-terminal);
  border-left: 1px solid var(--border-subtle);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-code-snippet {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-sub);
  line-height: 1.8;
  background: #000000;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
}

/* Secondary projects grid */
.projects-grid-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.project-card-sub {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 150ms ease;
  cursor: pointer;
}

.project-card-sub:hover {
  border-color: var(--border-cyan);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

/* ── PROJECT DETAIL MODAL / DRAWER ────────────────────────────────────────── */
.project-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 9, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease;
}

.project-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.project-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-sm);
  max-width: 660px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-modal-close:hover {
  color: var(--text-main);
}

/* ── CYBERSECURITY SECTION (LAB CONSOLE) ─────────────────────────────────── */
.security-lab-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent-green);
  border-radius: var(--radius-sm);
  padding: 32px;
}

.security-lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.security-metric-item {
  margin-bottom: 16px;
}

.security-metric-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.security-metric-bar {
  height: 4px;
  background: var(--bg-deep);
  border-radius: 0;
  overflow: hidden;
}

.security-metric-fill {
  height: 100%;
  background: var(--accent-green);
}

.security-ops-panel {
  background: var(--bg-terminal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.8;
}

/* ── OPEN SOURCE SHOWCASE ────────────────────────────────────────────────── */
.open-source-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.open-source-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 150ms ease;
}

.open-source-card:hover {
  border-color: var(--border-cyan);
}

/* ── LEARNING / READING BOOKSHELF ────────────────────────────────────────── */
.bookshelf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.book-card-3d {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.book-card-3d:hover {
  border-color: var(--border-bright);
  border-left-color: var(--accent-cyan);
}

.book-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.book-section-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  margin: 12px 0 4px;
  text-transform: uppercase;
}

.book-text {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.65;
}

/* ── CONTACT SECTION ─────────────────────────────────────────────────────── */
.contact-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 36px;
}

.contact-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.contact-info-side p {
  color: var(--text-sub);
  font-size: 0.98rem;
  line-height: 1.8;
  margin-bottom: 24px;
}

.contact-direct-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-direct-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-main);
  transition: all 150ms ease;
}

.contact-direct-item:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-sub);
  text-transform: uppercase;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.86rem;
  outline: none;
}

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

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
}

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

.footer-links {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-sub);
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* ── REVEAL ANIMATIONS ───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
}

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

/* ── MEDIA QUERIES ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-grid-layout,
  .about-grid,
  .security-lab-grid,
  .contact-layout-grid,
  .project-card-featured {
    grid-template-columns: 1fr;
  }
  
  .projects-grid-secondary,
  .bookshelf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .project-preview-window {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 280px;
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    justify-content: center;
    padding: 24px;
    transition: right 250ms ease;
    border-left: 1px solid var(--border-subtle);
  }

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

  .nav-toggle {
    display: flex;
  }

  .skills-grid,
  .projects-grid-secondary,
  .bookshelf-grid,
  .open-source-grid,
  .about-highlights-grid {
    grid-template-columns: 1fr;
  }

  .hero-section {
    padding: 110px 0 40px;
  }

  .section {
    padding: 50px 0;
  }
}

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