/*
 * Main styles for Shiv Kumar Arora's DevOps portfolio website.
 * This stylesheet defines a dark, emerald‑accented theme with glassy
 * panels, subtle animations and responsive layouts. Colours and
 * typography are centralised via CSS custom properties at the root.
 */

/* Reset and root variables */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --primary: #10b981; /* emerald */
  --primary-light: #34d399;
  --primary-dark: #065f46;
  --secondary: #0f172a; /* dark base for panels */
  --background: #020617; /* deepest background */
  --accent: #22d3ee; /* cyan accent */
  --text: #f1f5f9; /* off white */
  --muted: #94a3b8; /* blue grey */
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.1);
}

/* Alternate theme variables when body has class theme-alt */
body.theme-alt {
  --primary: #8b5cf6; /* violet */
  --primary-light: #a78bfa;
  --primary-dark: #5b21b6;
  --accent: #f472b6; /* pink accent */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
}

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

/* Utility class for containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--primary-light);
}

/* Active link styling (e.g., Labs page) */
.nav-links li a.active {
  color: var(--primary-light);
  border-bottom: 2px solid var(--primary-light);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding-top: 6rem; /* account for fixed nav */
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #052e16, #062d41, #041e42);
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

.hero-text {
  flex: 1;
  max-width: 600px;
}

.name {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
}

.subtitle {
  font-size: 1.5rem;
  color: var(--primary);
  margin-top: 0.5rem;
}

.tagline {
  font-size: 1.2rem;
  margin-top: 1rem;
  font-family: "Courier New", Courier, monospace;
  color: var(--muted);
  min-height: 2rem;
}

.cursor {
  color: var(--primary);
  animation: blink 1s step-start infinite;
}

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

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
  background: var(--primary);
  color: #031b34;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #031b34;
}

.hero-image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-container {
  position: relative;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Orbiting icons around the hero image */
.icon-orbit {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/*
 * Orbiting icons around the hero image are visually subtle by default. Because
 * SVG icons are black by default, they blended into the dark hero backdrop.
 * To ensure the icons remain visible without overpowering the hero portrait
 * we tint them white and reduce their opacity. We also add a soft drop
 * shadow to give them a gentle glow.
 */
.orbit-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  /* Invert and brighten the dark SVG icons so they stand out on the dark
     gradient. Then cast a soft emerald glow to tie in with the brand
     palette. Lower the opacity to keep them subtle. */
  filter: invert(100%) brightness(2) drop-shadow(0 0 6px rgba(16, 185, 129, 0.7));
  opacity: 0.55;
}

/* Position each orbit icon at a different quadrant */
.icon-orbit img:nth-child(1) {
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.icon-orbit img:nth-child(2) {
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.icon-orbit img:nth-child(3) {
  left: -15px;
  top: 50%;
  transform: translateY(-50%);
}

.icon-orbit img:nth-child(4) {
  right: -15px;
  top: 50%;
  transform: translateY(-50%);
}

.icon-orbit img:nth-child(5) {
  top: 10%;
  right: 10%;
}

/* About Section */
/* About Section */
.about-section {
  padding: 6rem 0;
  /* Override secondary to use a deeper blue tone for console */
  background: #0a192f;
}

/* About Section enhancements */
.about-title {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Shared styling for code console blocks inside About */
.terminal-console {
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: var(--primary-light);
  /* Use Fira Code for a modern terminal feel, fallback to monospace */
  font-family: "Fira Code", "Courier New", Courier, monospace;
  font-size: 0.95rem;
  margin: 1rem 0;
  white-space: pre-wrap;
  line-height: 1.4;
  border: 1px solid var(--card-border);
}

.about-intro h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.about-intro p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* DevOps DNA grid */
.dna-core {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.dna-core h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.dna-grid {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.8rem;
  color: var(--text);
  font-size: 0.95rem;
}

.dna-grid li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  padding: 0.6rem 0.8rem;
  /* Pill shape for the DNA tags */
  border-radius: 9999px;
  transition: background 0.3s, transform 0.3s;
  cursor: default;
}

.dna-grid li:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.dna-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
  text-align: center;
}

/* Live monitoring panel inherits terminal-console styles */
.monitoring-panel {}

.final-deploy {}

/* About links reuse the existing button style but fit smaller in the about section */
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--primary);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  transition: background-color 0.3s, color 0.3s;
  font-size: 0.9rem;
}

.about-link:hover {
  background: var(--primary);
  color: #031b34;
}

.mission-quote {
  font-style: italic;
  color: var(--primary-light);
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem;
}

.target-roles {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
  text-align: center;
}

/* Certifications list within about section */
.certifications {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* Layout container for the about content */
.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cert-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text);
  transition: background 0.3s;
}

.cert-chip:hover {
  background: var(--card-border);
}

.cert-icon {
  width: 18px;
  height: 18px;
}

/* Animation states for about section blocks */
.about-block.hidden {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.about-block.show {
  opacity: 1;
  transform: translateY(0);
}

/* General icon sizing for about links */
.link-icon {
  width: 20px;
  height: 20px;
}

/* Skills Section */
.skills-section {
  padding: 6rem 0;
  background: var(--background);
}

.skills-section h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

.skills-columns {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.terminal-panel {
  flex: 1 1 320px;
  background: #0d192e;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.terminal-header {
  background: #1e293b;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.red {
  background: #f87171;
}

.yellow {
  background: #facc15;
}

.green {
  background: #4ade80;
}

.terminal-body {
  padding: 1rem;
  font-family: "Courier New", monospace;
  color: var(--primary-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.terminal-line {
  white-space: nowrap;
  margin-bottom: 0.4rem;
}

.icon-grid {
  flex: 1 1 320px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1.5rem;
  justify-items: center;
  align-items: center;
  background: #0d192e;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.icon-item img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s;
}

.icon-item:hover img {
  transform: scale(1.15);
}

/* Projects Section */
.projects-section {
  padding: 6rem 0;
  background: var(--secondary);
}

.projects-section h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
  text-align: center;
}

.project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, background-color 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.05);
}

.project-card h3 {
  font-size: 1.2rem;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}

.project-summary {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  min-height: 110px;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  font-weight: 500;
}

.btn-outline:hover {
  background: var(--primary);
  color: #031b34;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

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

.modal {
  background: var(--secondary);
  padding: 2rem;
  border-radius: 12px;
  max-width: 600px;
  color: var(--text);
  position: relative;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  max-height: 80vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--primary);
}

.modal h3 {
  margin-bottom: 1rem;
  color: var(--primary-light);
}

.modal p {
  font-size: 0.95rem;
  color: var(--muted);
}


/* Experience (Timeline) Section */
.experience-section {
  padding: 6rem 0;
  background: var(--background);
}

.experience-section h2 {
  font-size: 2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 2rem;
}

.timeline {
  position: relative;
  margin-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--card-border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2.5rem;
}

.timeline-marker {
  position: absolute;
  left: -8px;
  top: 0.4rem;
  width: 16px;
  height: 16px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--background);
}

.timeline-content {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.timeline-content h3 {
  font-size: 1.2rem;
  color: var(--primary-light);
  margin-bottom: 0.25rem;
}

.timeline-period {
  font-size: 0.85rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.75rem;
}

.timeline-content ul {
  list-style: disc inside;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  padding-left: 0.5rem;
}

.timeline-content li {
  margin-bottom: 0.5rem;
}

/* Animation states for timeline items */
.timeline-item.hidden {
  opacity: 0;
  transform: translateY(30px);
}

.timeline-item.show {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s ease-out;
}

/* Contact Section */
.contact-section {
  padding: 6rem 0;
  background: var(--secondary);
}

.contact-section h2 {
  font-size: 2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 2rem;
}

/* Interactive console section */
.console-section {
  padding: 6rem 0;
  background: var(--background);
}

.console-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.console-playground {
  background: #0d253f;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  font-family: "Fira Code", "Courier New", Courier, monospace;
  color: var(--primary-light);
  display: flex;
  flex-direction: column;
  height: 300px;
}

.console-output {
  flex: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.console-input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--primary);
  font-family: "Fira Code", "Courier New", Courier, monospace;
  font-size: 1rem;
  padding: 0.4rem 0;
}

.console-input::placeholder {
  color: var(--muted);
}

.contact-content {
  max-width: 700px;
  margin: 0 auto;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.btn[type="submit"] {
  align-self: flex-start;
}

.form-status {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--primary-light);
}

.social-links {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-links a img,
/* Style social icons in the contact section. Without a filter, the black
   SVGs from Simple Icons disappear against our dark footer. We invert
   them and apply a hue-rotation to tint them emerald. The unicode
   envelope icon simply inherits the colour. */
.social-links .email-icon,
.social-links a img {
  width: 28px;
  height: 28px;
  /* Tint black SVG icons to emerald using CSS filters */
  filter: invert(55%) sepia(23%) saturate(906%) hue-rotate(103deg) brightness(92%) contrast(92%);
  color: var(--primary);
  transition: transform 0.3s;
}

.social-links a:hover img,
.social-links a:hover .email-icon {
  transform: scale(1.2);
}

/* Footer */
.footer {
  background: var(--secondary);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .heart {
  color: var(--primary);
}

/* Labs CTA section on index page */
.labs-cta-section {
  padding: 6rem 0;
  background: var(--secondary);
  border-top: 1px solid var(--card-border);
  text-align: center;
}
.labs-cta-content h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.labs-cta-content p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.labs-cta-content .btn {
  font-size: 1rem;
}

/* Labs page hero */
.labs-hero-section {
  padding: 4rem 0;
  background: var(--background);
  text-align: center;
}
.labs-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}
.labs-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 700px;
  margin: 0 auto;
}
.console-hint {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Kubernetes simulation section */
.k8s-section {
  padding: 6rem 0;
  background: var(--secondary);
  border-top: 1px solid var(--card-border);
  text-align: center;
}
.k8s-section h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.k8s-section p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.pod-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 0.5rem;
}
.pod {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: #031b34;
}
.pod.running {
  background: var(--primary);
}
.pod.terminated {
  background: #4b5563;
  color: #cbd5e1;
}
.cluster-status {
  font-size: 0.9rem;
  color: var(--muted);
}
.kill-button {
  align-self: center;
}

/* Topology diagram section */
.topology-section {
  padding: 6rem 0;
  background: var(--background);
  border-top: 1px solid var(--card-border);
  text-align: center;
}
.topology-section h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.topology-description {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.topology-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 400px;
  margin: 0 auto;
  margin-bottom: 1rem;
}
.topology-node {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  cursor: default;
  transition: box-shadow 0.3s, transform 0.3s;
}
.topology-node img {
  width: 32px;
  height: 32px;
  margin-bottom: 0.2rem;
  filter: invert(55%) sepia(23%) saturate(906%) hue-rotate(103deg) brightness(92%) contrast(92%);
}
.topology-node span {
  font-size: 0.75rem;
  color: var(--primary-light);
}
.topology-node:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Position nodes */
.topology-node.central {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.topology-node.top {
  top: 5%;
  left: 50%;
  transform: translate(-50%, 0);
}
.topology-node.bottom {
  bottom: 5%;
  left: 50%;
  transform: translate(-50%, 0);
}
.topology-node.left {
  top: 50%;
  left: 5%;
  transform: translate(0, -50%);
}
.topology-node.right {
  top: 50%;
  right: 5%;
  transform: translate(0, -50%);
}

/* Lines connecting nodes */
.line-horizontal {
  position: absolute;
  top: 50%;
  left: 5%;
  width: 90%;
  height: 2px;
  background: var(--card-border);
  transform: translateY(-1px);
}
.line-vertical {
  position: absolute;
  top: 5%;
  left: 50%;
  width: 2px;
  height: 90%;
  background: var(--card-border);
  transform: translateX(-1px);
}

.topology-info {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Theme toggle button */
.theme-toggle {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.3rem 0.6rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  margin-left: 1rem;
}
.theme-toggle:hover {
  background: var(--primary);
  color: #031b34;
}

/* Metrics section */
.metrics-section {
  padding: 6rem 0;
  background: var(--secondary);
  border-top: 1px solid var(--card-border);
}
.metrics-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  text-align: center;
}
.metric {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 2rem 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.metric:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}
.metric-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.5rem;
}
.metric-label {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Pipeline visualizer section */
.pipeline-section {
  padding: 6rem 0;
  background: var(--background);
  border-top: 1px solid var(--card-border);
}
.pipeline-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
}
.pipeline-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
}
.pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--primary-light);
  font-size: 0.8rem;
  min-width: 70px;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  cursor: default;
}
.pipeline-step img {
  width: 32px;
  height: 32px;
  margin-bottom: 0.3rem;
  filter: invert(55%) sepia(23%) saturate(906%) hue-rotate(103deg) brightness(92%) contrast(92%);
}
.pipeline-arrow {
  font-size: 1.5rem;
  color: var(--muted);
  transition: color 0.3s;
}
.pipeline-step.active {
  background: var(--primary);
  color: #031b34;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
.pipeline-step.active img {
  filter: invert(15%) sepia(97%) saturate(3231%) hue-rotate(97deg) brightness(95%) contrast(93%);
}
.pipeline-hint {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Logs section */
.logs-section {
  padding: 6rem 0;
  background: var(--secondary);
  border-top: 1px solid var(--card-border);
}
.logs-section h2 {
  text-align: center;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.log-panel {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 1rem;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.log-output {
  background: #0d253f;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  padding: 1rem;
  height: 200px;
  overflow-y: auto;
  font-family: "Fira Code", "Courier New", Courier, monospace;
  font-size: 0.85rem;
  color: var(--primary-light);
  line-height: 1.4;
}
.log-line {
  white-space: pre-wrap;
}
.log-line.info {
  color: var(--accent);
}
.log-line.success {
  color: var(--primary-light);
}
.log-line.warn {
  color: #fbbf24; /* yellow */
}
.log-line.error {
  color: #f87171; /* red */
}
.log-toggle {
  align-self: flex-end;
}

/* Media Queries */
@media (max-width: 768px) {
  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .hero-image-wrapper {
    margin-top: 2rem;
  }
  .skills-columns {
    flex-direction: column;
  }
  .timeline {
    margin-left: 0;
  }
  .timeline::before {
    left: 8px;
  }
  .timeline-item {
    padding-left: 2rem;
  }
  .nav-links {
    gap: 1rem;
    font-size: 0.9rem;
  }
  .name {
    font-size: 2.5rem;
  }
  .hero-image-container {
    width: 220px;
    height: 220px;
  }
}

@media (max-width: 600px) {
  /* Stack pipeline steps vertically on small screens */
  .pipeline-flow {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .pipeline-arrow {
    transform: rotate(90deg);
    font-size: 1.2rem;
  }
  .pipeline-step {
    min-width: auto;
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .nav-links {
    display: none; /* hide navigation on very small screens; could be replaced with burger in future */
  }
  .brand {
    font-size: 1.25rem;
  }
  .btn {
    padding: 0.6rem 1.2rem;
  }
  .project-summary {
    min-height: auto;
  }
  .skills-section h2,
  .projects-section h2,
  .experience-section h2,
  .contact-section h2 {
    font-size: 1.6rem;
  }
}