/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --bg-primary: #0a0f1c;
  --bg-secondary: #111a2e;
  --bg-elevated: #16223b;
  --bg-terminal: #070b14;
  --border-color: #22304e;
  --border-soft: #1a2742;

  --text-primary: #ecf1fa;
  --text-secondary: #8c9ab8;
  --text-muted: #5a6886;

  --accent-color: #2dd4bf; /* Cyan accent */
  --accent-glow: rgba(45, 212, 191, 0.15);
  --accent-strong: #5eead4;

  /* Status Colors */
  --status-pass: #10b981; /* Emerald green */
  --status-fail: #ef4444; /* Red */
  --status-warn: #f59e0b; /* Amber */

  /* Fonts */
  --font-headings:
    "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  --font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:
    "JetBrains Mono", source-code-pro, Menlo, Monaco, Consolas, "Courier New",
    monospace;

  /* Layout Dimensions */
  --nav-width: 200px;
  --status-bar-height: 42px;
  --mobile-nav-height: 54px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
}

body {
  margin: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  color: var(--text-primary);
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}

a:hover {
  color: var(--accent-strong);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

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

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

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

/* ==========================================================================
   TOP STATUS BAR (IDE DASHBOARD)
   ========================================================================== */
.status-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--status-bar-height);
  background-color: var(--bg-terminal);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  z-index: 1000;
  overflow-x: auto;
  white-space: nowrap;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.status-dot.red {
  background-color: var(--status-fail);
  box-shadow: 0 0 8px var(--status-fail);
}

.status-dot.green {
  background-color: var(--status-pass);
  box-shadow: 0 0 10px var(--status-pass);
}

.file-info {
  color: var(--text-primary);
}

.separator {
  color: var(--border-color);
  user-select: none;
}

.test-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.test-stat.pass {
  color: var(--status-pass);
}

.test-stat.fail {
  color: var(--status-fail);
}

.time-elapsed {
  margin-left: auto;
  color: var(--text-muted);
}

/* ==========================================================================
   SIDEBAR NAVIGATION RAIL — DESKTOP
   ========================================================================== */
.nav-rail {
  position: fixed;
  top: var(--status-bar-height);
  left: 0;
  bottom: 0;
  width: var(--nav-width);
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border-soft);
  padding: 24px 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-rail .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px 20px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 20px;
}

.logo-initials {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent-color);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 24px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.nav-item.active {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-left-color: var(--accent-color);
}

.nav-marker {
  font-size: 14px;
  font-weight: bold;
  margin-right: 12px;
  width: 16px;
  display: inline-block;
  transition: color 0.3s ease;
}

.nav-item .nav-marker {
  color: var(--status-fail);
}

.nav-item.checked .nav-marker {
  color: var(--status-pass);
}

.nav-num {
  color: var(--text-muted);
  font-size: 11px;
  margin-right: 6px;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
main {
  margin-left: var(--nav-width);
  padding-top: var(--status-bar-height);
  min-height: 100vh;
  overflow-x: hidden;
}

.section {
  padding: 80px 48px;
  border-bottom: 1px solid var(--border-soft);
}

.section:last-of-type {
  border-bottom: none;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-color);
  letter-spacing: 2px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::after {
  content: "";
  display: block;
  height: 1px;
  background-color: var(--border-soft);
  flex-grow: 1;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.5px;
}

/* Button styles */
.btn {
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  border: 1px solid var(--accent-color);
}

.btn-primary:hover {
  background-color: var(--accent-strong);
  border-color: var(--accent-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 212, 191, 0.2);
}

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

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

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ==========================================================================
   PAGE 1 – LANDING / HERO
   ========================================================================== */
.hero-section {
  min-height: calc(100vh - var(--status-bar-height));
  display: flex;
  align-items: center;
  padding: 60px 48px;
  border-bottom: 1px solid var(--border-soft);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.kicker-cmd {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.hero-text-content h1 {
  font-size: clamp(38px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 16px;
}

.designations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-color);
  margin-bottom: 24px;
}

.designations .tag {
  background-color: var(--accent-glow);
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.designations .bullet {
  color: var(--border-color);
  user-select: none;
}

.intro-paragraph {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  text-align: justify;
  max-width: 600px;
}

.cta-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.social-icon-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  transform: translateY(-2px);
}

/* Terminal component styling */
.terminal-container {
  background-color: var(--bg-terminal);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  height: 380px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.5),
    0 0 1px var(--accent-color);
}

.terminal-header {
  background-color: #0d1220;
  border-bottom: 1px solid var(--border-soft);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.terminal-header .dot.red {
  background-color: #ff5f56;
}
.terminal-header .dot.yellow {
  background-color: #ffbd2e;
}
.terminal-header .dot.green {
  background-color: #27c93f;
}

.terminal-header .title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.terminal-body {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.terminal-line {
  line-height: 1.4;
  opacity: 0;
  transform: translateY(4px);
  animation: fade-in-line 0.3s forwards ease;
}

@keyframes fade-in-line {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.terminal-line .prompt {
  color: var(--accent-color);
}

.terminal-line .cmd {
  color: var(--text-primary);
}

.terminal-line .pass-tick {
  color: var(--status-pass);
  font-weight: bold;
}

.terminal-line .duration {
  float: right;
  color: var(--text-muted);
}

.terminal-line.summary-box {
  background-color: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 4px;
  padding: 8px 12px;
  color: var(--status-pass);
  margin-top: 10px;
}

.terminal-line.summary-box .duration {
  color: var(--text-secondary);
}

.terminal-line .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background-color: var(--accent-color);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

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

.terminal-replay-btn {
  background-color: transparent;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.terminal-replay-btn:hover {
  color: var(--accent-color);
  background-color: var(--bg-secondary);
}

/* ==========================================================================
   PAGE 2 – ABOUT ME
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

.about-profile-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.avatar-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  aspect-ratio: 1;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-border-overlay {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent-color);
  opacity: 0.15;
  border-radius: 12px;
  pointer-events: none;
}

.view-work-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 16px;
}

.view-work-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.view-work-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
  transition: all 0.2s ease;
}

.pill-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background-color: var(--accent-glow);
}

.about-details-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.bio-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  text-align: justify;
}

.mission-vision-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mv-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  position: relative;
  transition: border-color 0.2s ease;
}

.mv-card:hover {
  border-color: rgba(45, 212, 191, 0.3);
}

.mv-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.mv-header .icon {
  font-size: 20px;
}

.mv-header h3 {
  font-family: var(--font-headings);
  font-size: 14px;
  color: var(--accent-color);
  letter-spacing: 1.5px;
}

.mv-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   PAGE 3 – WORK EXPERIENCE
   ========================================================================== */
.timeline-container {
  position: relative;
  padding-left: 20px;
  margin-bottom: 48px;
}

.timeline-container::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 3px;
  width: 2px;
  background-color: var(--border-color);
}

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

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 8px;
  left: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 2px solid var(--accent-color);
  z-index: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

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

.role-title-group h3 {
  font-size: 18px;
  font-weight: 600;
}

.role-title-group .company {
  font-size: 14px;
  color: var(--accent-color);
  font-weight: 500;
}

.timeline-header .meta-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.timeline-header .meta-info .duration {
  color: var(--text-primary);
}

/* Badge styling */
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
  width: fit-content;
}

.badge-permanent {
  background-color: rgba(45, 212, 191, 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(45, 212, 191, 0.2);
}

.badge-contract {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--status-warn);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-intern {
  background-color: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.timeline-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
}

.role-summary {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  border-left: 2px solid var(--border-color);
  padding-left: 12px;
}

.responsibilities,
.achievements-bullets {
  margin-bottom: 16px;
}

.responsibilities:last-child,
.achievements-bullets:last-child {
  margin-bottom: 0;
}

.responsibilities h4,
.achievements-bullets h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.timeline-content ul {
  list-style: none;
}

.timeline-content li {
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.timeline-content li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 16px;
  top: -1px;
}

.timeline-content li.success-bullet::before {
  content: "✓";
  color: var(--status-pass);
  font-size: 12px;
  top: 2px;
}

/* Additional experience card layout */
.section-sub-title {
  font-size: 20px;
  margin-bottom: 24px;
}

.additional-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.additional-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.additional-card h4 {
  font-size: 16px;
  font-weight: 600;
}

.additional-card .company {
  color: var(--accent-color);
  font-size: 13.5px;
}

.badge-academic {
  background-color: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.badge-professional {
  background-color: rgba(40, 52, 64, 0.1);
  color: #4ab7af;
  border: 1px solid rgba(40, 52, 64, 0.2);
}

.badge-freelance {
  background-color: rgba(236, 72, 153, 0.1);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

.badge-teaching {
  background-color: rgba(125, 207, 38, 0.1);
  color: #bb856b;
  border: 1px solid rgba(125, 207, 38, 0.2);
}

.additional-card .meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.additional-card .card-details ul {
  list-style: none;
}

.additional-card .card-details li {
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  padding-left: 14px;
  margin-bottom: 6px;
}

.additional-card .card-details li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

/* ==========================================================================
   PAGE 4 – EDUCATION
   ========================================================================== */
.education-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.education-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  position: relative;
}

.education-card.highlight {
  border-color: rgba(45, 212, 191, 0.4);
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.05);
}

.education-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: var(--accent-glow);
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(45, 212, 191, 0.3);
}

.education-icon {
  font-size: 32px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.education-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.education-details h3 {
  font-size: 18px;
  padding-right: 80px; /* Leave space for badge */
}

.education-details .institution {
  color: var(--accent-color);
  font-size: 15px;
  font-weight: 500;
}

.education-details .meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.education-details .meta-info .gpa {
  color: var(--text-primary);
}

.coursework h4,
.capstone h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.coursework {
  margin-bottom: 12px;
}

.course-tag {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 6px;
  margin-bottom: 6px;
}

.capstone p {
  font-size: 14px;
  color: var(--text-secondary);
}

.repo-link {
  color: var(--accent-color);
  font-family: var(--font-mono);
  font-size: 12px;
  margin-left: 4px;
}

/* ==========================================================================
   PAGE 5 – PROJECTS
   ========================================================================== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.project-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.project-header {
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.project-item:hover {
  border-color: rgba(45, 212, 191, 0.3);
}

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

.project-title-group h3 {
  font-size: 18px;
  font-weight: 600;
}

.project-type {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.project-action .expand-icon {
  font-size: 24px;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  display: inline-block;
}

/* Expansion transition */
.project-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
  padding: 0 24px;
}

.project-item.active .project-content {
  max-height: 2000px;
  padding: 0 24px 28px;
  transition: max-height 0.4s cubic-bezier(1, 0, 1, 0);
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
}

.project-item.active .expand-icon {
  transform: rotate(45deg);
  color: var(--accent-color);
}

.project-content .description {
  font-size: 14.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.6;
  text-align: justify;
}

.project-content .outcomes h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-content .outcomes ul {
  list-style: none;
  margin-bottom: 20px;
}

.project-content .outcomes li {
  font-size: 13.5px;
  color: var(--text-secondary);
  position: relative;
  padding-left: 16px;
  margin-bottom: 6px;
}

.project-content .outcomes li::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.tech-stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tech-tag {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
}

.project-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  padding: 8px 16px;
  border-radius: 4px;
  color: var(--text-primary);
  width: fit-content;
}

.project-github-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

/* Gherkin code styling */
.gherkin-preview {
  background-color: var(--bg-terminal);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
}

.gherkin-preview .code-header {
  background-color: #0d1220;
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}

.gherkin-preview pre {
  padding: 14px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #a9b2c3;
}

.gherkin-preview code .k {
  color: #e5c07b;
  font-weight: bold;
} /* Keyword */
.gherkin-preview code .kv {
  color: #61afef;
} /* Given/When/Then */

/* ==========================================================================
   PAGE 6 – SKILLS
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.skills-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
}

.skills-card h3 {
  font-size: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 10px;
  color: var(--accent-color);
}

.skill-bar-item {
  margin-bottom: 16px;
}

.skill-bar-item:last-child {
  margin-bottom: 0;
}

.skill-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12.5px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.skill-label span:last-child {
  color: var(--text-muted);
}

.skill-track {
  height: 6px;
  background-color: var(--bg-primary);
  border-radius: 3px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-strong));
  border-radius: 3px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.1, 0.8, 0.2, 1);
}

/* ==========================================================================
   PAGE 7 – CERTIFICATIONS
   ========================================================================== */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.cert-card-interactive {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.cert-card-interactive:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cert-thumbnail-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  object-position: top;
  border-bottom: 1px solid var(--border-soft);
}

.cert-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 160px;
  background-color: rgba(10, 15, 28, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.cert-card-interactive:hover .cert-hover-overlay {
  opacity: 1;
}

.cert-hover-overlay span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
  padding: 6px 14px;
  border-radius: 4px;
  background-color: var(--accent-glow);
}

.cert-info-footer {
  padding: 16px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-info-footer h4 {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cert-info-footer .issuer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* Placeholder card for broken/missing images */
.cert-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, #111a2e 0%, #1a2846 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  text-align: center;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
}

.cert-placeholder svg {
  margin-bottom: 8px;
  color: var(--accent-color);
}

.cert-placeholder span {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.3;
}

/* ==========================================================================
   PAGE 8 – ACHIEVEMENTS
   ========================================================================== */
.achievements-subheading {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 700px;
}

/* Stats counter styling */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.stat-counter {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}

.stat-counter .num {
  font-family: var(--font-headings);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-color);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-counter .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

.achievement-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ach-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ach-header .year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.achievement-card h3 {
  font-size: 16px;
  font-weight: 600;
}

.achievement-card .institution {
  color: var(--accent-color);
  font-size: 13px;
  font-weight: 500;
}

.achievement-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ach-media {
  margin-top: auto;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  height: 120px;
}

.ach-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Metric Display card */
.metric-achievement {
  justify-content: space-between;
}

.metric-display {
  margin-top: auto;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 16px;
  text-align: center;
}

.metric-val {
  font-family: var(--font-headings);
  font-size: 32px;
  font-weight: 700;
  color: var(--status-pass);
  line-height: 1;
}

.metric-lbl {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Achievement Placeholder */
.ach-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  text-align: center;
  padding: 10px;
}

.ach-placeholder svg {
  color: var(--accent-color);
}

.ach-placeholder span {
  font-family: var(--font-mono);
  font-size: 10px;
}

/* ==========================================================================
   PAGE 9 – CONTACT
   ========================================================================== */
.contact-subheading {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 600px;
}

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

.contact-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-card-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 100px;
}

.contact-card-item.card-full-width {
  grid-column: span 2;
}

.contact-card-item .label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.contact-card-item .value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.contact-card-item .value.link {
  color: var(--accent-color);
}

.contact-card-item .value.link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.resume-download-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.resume-filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Contact Form styling */
.contact-form-wrapper {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 32px;
}

.form-title {
  font-size: 20px;
  margin-bottom: 24px;
}

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

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-color);
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.form-group textarea {
  resize: vertical;
}

.email-cta-wrapper {
  margin-top: 24px;
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.email-cta-text {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  padding: 32px 48px;
  text-align: center;
  border-top: 1px solid var(--border-soft);
}

footer p {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE CERTIFICATE MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 15, 28, 0.9);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 32px;
  color: var(--text-muted);
  line-height: 1;
  z-index: 2010;
}

.modal-close-btn:hover {
  color: var(--status-fail);
}

.modal-body-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  height: 100%;
  max-height: calc(90vh - 2px);
}

.modal-media-pane {
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-right: 1px solid var(--border-soft);
  min-height: 300px;
}

.modal-media-pane img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-media-pane .cert-placeholder {
  width: 100%;
  height: 100%;
  border-bottom: none;
}

.modal-details-pane {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.modal-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-color);
  letter-spacing: 1px;
}

.modal-details-pane h3 {
  font-size: 20px;
  line-height: 1.3;
}

.modal-meta-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modal-meta-field .label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.modal-meta-field .value {
  font-size: 14px;
  color: var(--text-primary);
}

.modal-actions-row {
  margin-top: auto;
  padding-top: 20px;
}

.modal-actions-row .btn {
  width: 100%;
}

/* ==========================================================================
   MEDIA QUERIES — TABLET (≤ 960px)
   ========================================================================== */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .terminal-container {
    max-width: 480px;
    height: 340px;
    margin: 0 auto;
    width: 100%;
  }

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

  .modal-body-content {
    grid-template-columns: 1fr;
  }

  .modal-media-pane {
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    height: 250px;
  }

  .modal-details-pane {
    padding: 24px;
  }
}

/* ==========================================================================
   MEDIA QUERIES — MOBILE NAV (≤ 880px)
   The sidebar becomes a horizontal top bar BELOW the status bar.
   main content shifts down to account for both fixed bars.
   ========================================================================== */
@media (max-width: 1100px) {
  /* Nav becomes a horizontal scroll rail pinned below the status bar */
  .nav-rail {
    top: var(--status-bar-height);
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--mobile-nav-height);
    padding: 0 8px;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox — hide scrollbar but keep scroll */
  }

  .nav-rail::-webkit-scrollbar {
    display: none; /* Chrome/Safari — hide scrollbar but keep scroll */
  }

  /* Hide brand logo in horizontal mode — no room */
  .nav-rail .brand {
    display: none;
  }

  /* Nav links row */
  .nav-links {
    flex-direction: row;
    align-items: center;
    gap: 0;
    height: 100%;
    padding: 0;
  }

  /* Individual nav buttons */
  .nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--mobile-nav-height);
    width: auto;
    padding: 0 14px;
    border-left: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    font-size: 11px;
  }

  .nav-item.active {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-left: none;
    border-bottom-color: var(--accent-color);
  }

  /* Push main content below BOTH fixed bars */
  main {
    margin-left: 0;
    padding-top: calc(var(--status-bar-height) + var(--mobile-nav-height));
  }

  /* Section padding */
  .section {
    padding: 56px 20px;
  }

  /* Hero section */
  .hero-section {
    padding: 40px 20px;
    min-height: calc(
      100vh - var(--status-bar-height) - var(--mobile-nav-height)
    );
  }

  /* About grid collapses to single column */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .about-profile-wrapper {
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
  }

  /* Mission/vision stacks */
  .mission-vision-grid {
    grid-template-columns: 1fr;
  }

  /* Footer */
  footer {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   MEDIA QUERIES — SMALL MOBILE (≤ 600px)
   ========================================================================== */
@media (max-width: 600px) {
  .hero-text-content h1 {
    font-size: 30px;
  }

  .section-title {
    font-size: 26px;
  }

  .cta-actions {
    flex-direction: column;
    gap: 12px;
  }

  .cta-actions .btn {
    width: 100%;
  }

  /* Nav markers too wide on tiny screens — hide number prefix */
  .nav-num {
    display: none;
  }

  .nav-item {
    padding: 0 10px;
    font-size: 10px;
  }

  /* Experience timeline */
  .additional-cards-grid {
    grid-template-columns: 1fr;
  }

  /* Education card */
  .education-card {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .education-details h3 {
    padding-right: 60px;
    font-size: 16px;
  }

  /* Projects */
  .project-header {
    padding: 16px;
  }

  .project-title-group h3 {
    font-size: 15px;
  }

  /* Achievements stats */
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat-counter .num {
    font-size: 28px;
  }

  /* Contact */
  .contact-cards-grid {
    grid-template-columns: 1fr;
  }

  .contact-card-item.card-full-width {
    grid-column: span 1;
  }

  .resume-download-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .resume-download-wrapper .btn {
    width: 100%;
  }

  .contact-form .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrapper {
    padding: 20px;
  }

  .email-cta-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    text-align: center;
  }

  /* Timeline on small screens */
  .timeline-header {
    flex-direction: column;
    gap: 8px;
  }

  .timeline-header .meta-info {
    align-items: flex-start;
    text-align: left;
  }

  .timeline-content {
    padding: 16px;
  }
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

@media (max-width: 1300px) and (min-width: 1101px) {
  .section {
    padding: 80px 24px;
  }

  .hero-section {
    padding: 60px 24px;
  }

  .section-inner {
    max-width: 100%;
  }

  .hero-grid {
    max-width: 100%;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .modal-container {
    max-height: 95vh;
  }

  .modal-body-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
    max-height: 95vh;
  }

  .modal-media-pane {
    height: 180px;
    min-height: unset;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
  }

  .modal-details-pane {
    padding: 20px;
    overflow-y: visible;
  }

  .modal-actions-row {
    margin-top: 16px;
    padding-top: 16px;
  }
}
