/* ============================================================
   NIKHIL PAGOTE — PORTFOLIO
   Dark Techy Theme · Pure CSS · No Frameworks
   ============================================================ */

/* ---- CUSTOM PROPERTIES ---- */
:root {
  --bg:          #ffffff;
  --bg-card:     #f9fafb;
  --bg-card-alt: #f3f4f6;
  --accent:      #e53e3e;
  --accent-dim:  rgba(229, 62, 62, 0.12);
  --accent-glow: rgba(229, 62, 62, 0.35);
  --purple:      #7c3aed;
  --purple-dim:  rgba(124, 58, 237, 0.15);
  --text:        #111827;
  --text-muted:  #4b5563;
  --text-faint:  #9ca3af;
  --border:      rgba(229, 62, 62, 0.15);
  --border-solid:#e5e7eb;
  --nav-h:       68px;
  --radius:      12px;
  --radius-sm:   6px;
  --shadow:      0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(229, 62, 62, 0.18);
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --transition:  0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul {
  list-style: none;
}

img, svg {
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ---- LAYOUT HELPERS ---- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 96px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

/* ---- FADE-IN SCROLL ANIMATION ---- */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  animation: fadeInUp 0.8s ease both;
}

.fade-in-delay {
  animation-delay: 0.25s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(229, 62, 62, 0.3);
}

.btn-primary:hover, .btn-primary:focus-visible {
  background: #b91c1c;
  box-shadow: 0 0 32px rgba(229, 62, 62, 0.55);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.btn-outline:hover, .btn-outline:focus-visible {
  background: var(--accent-dim);
  box-shadow: 0 0 20px rgba(229, 62, 62, 0.2);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

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

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

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

.nav-logo:hover {
  color: var(--accent);
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border-radius: var(--radius-sm);
  z-index: 1100;
}

.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

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

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: calc(var(--nav-h) + 32px) 24px 64px;
  overflow: hidden;
}

/* Subtle background grid */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(229, 62, 62, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 62, 62, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Radial gradient glow top-left */
.hero::after {
  content: '';
  position: absolute;
  top: -10%;
  left: -5%;
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at top left, rgba(229, 62, 62, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero-container {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.hero-name {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 18px;
}

/* Typing effect row */
.hero-typing-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: var(--accent);
  min-height: 2em;
  margin-bottom: 20px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  width: fit-content;
}

.typing-cursor-prefix {
  color: var(--text-muted);
  user-select: none;
}

.typing-text {
  color: var(--accent);
}

.typing-cursor {
  color: var(--accent);
  animation: blink 1s step-end infinite;
  line-height: 1;
}

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

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 36px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-socials {
  display: flex;
  gap: 14px;
  align-items: center;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  transition: all var(--transition);
}

.social-link:hover, .social-link:focus-visible {
  color: var(--accent);
  border-color: var(--border);
  background: var(--accent-dim);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(229, 62, 62, 0.2);
}

/* ---- TERMINAL ---- */
.terminal {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow-glow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.terminal-bar {
  background: #161b22;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

.terminal-title {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-left: 6px;
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-height: 1.55em;
  line-height: 1.55;
}

.t-blank {
  min-height: 0.7em;
}

.t-prompt {
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 500;
}

.t-cmd {
  color: #e6edf3;
}

.t-output {
  color: var(--text-muted);
  padding-left: 18px;
}

.t-arrow {
  color: var(--purple);
  margin-right: 4px;
}

.t-check {
  color: #28c840;
  margin-right: 4px;
}

.t-cursor-blink {
  color: var(--accent);
  animation: blink 1s step-end infinite;
}

/* ---- SCROLL INDICATOR ---- */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  animation: bounce 2s ease infinite;
  transition: color var(--transition);
  z-index: 1;
}

.scroll-indicator:hover {
  color: var(--accent);
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---- ABOUT ---- */
.about {
  background: var(--bg);
}

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 18px;
  font-size: 0.975rem;
  line-height: 1.8;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.04) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  border-color: rgba(229, 62, 62, 0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-family: var(--font-body);
}

.stat-plus {
  font-size: 1.4rem;
  vertical-align: super;
  color: var(--purple);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.35;
}

/* ---- SKILLS ---- */
.skills {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card-alt) 100%);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.skill-card:hover::after {
  transform: scaleX(1);
}

.skill-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--accent);
}

.skill-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(229, 62, 62, 0.07);
  border: 1px solid rgba(229, 62, 62, 0.22);
  color: var(--accent);
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all var(--transition);
}

.badge:hover {
  background: rgba(229, 62, 62, 0.15);
  border-color: var(--accent);
}

/* ---- EXPERIENCE ---- */
.experience {
  background: var(--bg);
}

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

/* Vertical line */
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--purple) 100%);
  border-radius: 2px;
  opacity: 0.4;
}

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

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

.timeline-dot {
  position: absolute;
  left: -42px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
  transition: all var(--transition);
  z-index: 1;
}

.timeline-item:hover .timeline-dot {
  background: var(--purple);
  box-shadow: 0 0 0 2px var(--purple), 0 0 12px rgba(124, 58, 237, 0.5);
  transform: scale(1.3);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  transition: all var(--transition);
}

.timeline-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow);
  transform: translateX(4px);
}

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

.tl-company {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tl-role {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

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

.tl-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}

.tl-location {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.tl-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tl-bullets li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.65;
}

.tl-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--purple);
  font-size: 0.75rem;
  top: 3px;
}

/* ---- CERTIFICATIONS ---- */
.certifications {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-card-alt) 100%);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all var(--transition);
}

.cert-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.cert-card.cert-featured {
  border-color: rgba(229, 62, 62, 0.35);
  box-shadow: 0 0 20px rgba(229, 62, 62, 0.1);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(229, 62, 62, 0.04) 100%);
}

.cert-card.cert-featured:hover {
  box-shadow: 0 0 32px rgba(229, 62, 62, 0.22);
}

.cert-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cert-badge-cka    { background: rgba(229, 62, 62, 0.12); color: var(--accent); border: 1px solid rgba(229, 62, 62, 0.3); }
.cert-badge-aws    { background: rgba(255, 153, 0, 0.12); color: #ff9900; border: 1px solid rgba(255, 153, 0, 0.3); }
.cert-badge-itil   { background: rgba(124, 58, 237, 0.12); color: #a78bfa; border: 1px solid rgba(124, 58, 237, 0.3); }
.cert-badge-jenkins{ background: rgba(244, 93, 34, 0.12); color: #f47542; border: 1px solid rgba(244, 93, 34, 0.3); }
.cert-badge-docker { background: rgba(0, 150, 237, 0.12); color: #0096ed; border: 1px solid rgba(0, 150, 237, 0.3); }
.cert-badge-agile  { background: rgba(16, 185, 129, 0.12); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.cert-badge-devops { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.cert-badge-python { background: rgba(52, 152, 219, 0.12); color: #3498db; border: 1px solid rgba(52, 152, 219, 0.3); }

.cert-info {
  flex: 1;
  min-width: 0;
}

.cert-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 100px;
  display: inline-block;
  margin-bottom: 6px;
}

.cert-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 4px;
}

.cert-issuer {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* ---- CONTACT ---- */
.contact {
  background: var(--bg);
}

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

.contact-intro {
  color: var(--text-muted);
  font-size: 0.975rem;
  line-height: 1.75;
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  color: var(--accent);
  flex-shrink: 0;
}

.contact-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.contact-link:hover {
  color: var(--accent);
}

.contact-detail > span:not(.contact-icon) {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Contact form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 32px 28px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-of-type {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
}

.form-input::placeholder {
  color: var(--text-faint);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ---- FOOTER ---- */
.footer {
  background: var(--bg-card-alt);
  border-top: 1px solid var(--border-solid);
  padding: 28px 0;
}

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

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.footer-text {
  font-size: 0.83rem;
  color: var(--text-faint);
  text-align: center;
}

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

.footer-link {
  color: var(--text-faint);
  transition: color var(--transition);
  display: flex;
  align-items: center;
}

.footer-link:hover {
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet — 960px */
@media (max-width: 960px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-tagline {
    max-width: 100%;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-socials {
    justify-content: center;
  }

  .hero-typing-wrapper {
    margin: 0 auto 20px;
  }

  .hero-right {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .timeline-header {
    flex-direction: column;
    gap: 10px;
  }

  .tl-meta {
    align-items: flex-start;
  }
}

/* Mobile — 700px */
@media (max-width: 700px) {
  :root {
    --nav-h: 60px;
  }

  .section {
    padding: 72px 0;
  }

  /* Hamburger */
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
    pointer-events: none;
    z-index: 999;
  }

  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 0.95rem;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--nav-h) + 24px);
  }

  .hero-name {
    font-size: 2.2rem;
  }

  .hero-typing-wrapper {
    font-size: 0.82rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* About stats */
  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  /* Skills */
  .skills-grid {
    grid-template-columns: 1fr;
  }

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

  .timeline::before {
    left: 0;
  }

  .timeline-dot {
    left: -30px;
  }

  .timeline-card {
    padding: 20px 18px;
  }

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

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* Very small screens — 380px */
@media (max-width: 380px) {
  .hero-name {
    font-size: 1.9rem;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .stat-card {
    padding: 20px 12px;
  }
}

/* ---- FOCUS VISIBLE (accessibility) ---- */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- SELECTION COLOR ---- */
::selection {
  background: rgba(229, 62, 62, 0.25);
  color: #fff;
}


/* ============================================================
   CI/CD PIPELINE SECTION
   ============================================================ */
.pipeline {
  background: linear-gradient(180deg, var(--bg-card-alt) 0%, var(--bg) 100%);
}

.pipeline-track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  margin-top: 16px;
}

/* Connecting line behind stages */
.pipeline-track::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 60px;
  right: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0.25;
  transform: translateY(-50%);
  z-index: 0;
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.stage-node {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 2px solid var(--border-solid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.4s ease;
  position: relative;
}

.stage-node.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  box-shadow: 0 0 20px rgba(229, 62, 62, 0.25);
}

.stage-node.done {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
}

.stage-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
}

.stage-status {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-success {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-running {
  background: rgba(229, 62, 62, 0.12);
  color: var(--accent);
  border: 1px solid rgba(229, 62, 62, 0.3);
  animation: blink 1s step-end infinite;
}

/* Animated packet flowing through pipeline */
.pipeline-packet {
  position: absolute;
  top: 50%;
  left: 60px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(229, 62, 62, 0.8);
  transform: translateY(-50%);
  z-index: 2;
  animation: flow-packet 4s ease-in-out infinite;
}

@keyframes flow-packet {
  0%   { left: 60px;  opacity: 0; }
  5%   { opacity: 1; }
  95%  { opacity: 1; }
  100% { left: calc(100% - 60px); opacity: 0; }
}

.pipeline-wrapper {
  position: relative;
  overflow: hidden;
}

.pipeline-stats {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pipeline-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 16px 28px;
  text-align: center;
  transition: all var(--transition);
}

.pipeline-stat:hover {
  border-color: var(--border);
  transform: translateY(-3px);
}

.pipeline-stat-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.pipeline-stat-label {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
  display: block;
}

@media (max-width: 700px) {
  .pipeline-track {
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    padding-left: 40px;
  }

  .pipeline-track::before {
    top: 32px;
    bottom: 32px;
    left: 31px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .pipeline-packet {
    display: none;
  }

  .pipeline-stage {
    flex-direction: row;
    gap: 16px;
  }
}

/* ============================================================
   INTERACTIVE TERMINAL WIDGET (floating)
   ============================================================ */
.term-widget-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(229, 62, 62, 0.45);
  z-index: 2000;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.term-widget-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 28px rgba(229, 62, 62, 0.6);
}

.term-widget-btn.open {
  background: var(--bg-card);
  color: var(--accent);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.term-widget {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 480px;
  max-width: calc(100vw - 40px);
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 30px rgba(229, 62, 62, 0.12);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  z-index: 1999;
  display: flex;
  flex-direction: column;
  max-height: 420px;
  transform: scale(0.92) translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease;
  transform-origin: bottom right;
}

.term-widget.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.term-widget-bar {
  background: #161b22;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius) var(--radius) 0 0;
  flex-shrink: 0;
}

.term-widget-dots {
  display: flex;
  gap: 6px;
}

.term-widget-title {
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-left: 4px;
  flex: 1;
  letter-spacing: 0.04em;
}

.term-widget-close {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 2px;
  line-height: 1;
  transition: color var(--transition);
}

.term-widget-close:hover {
  color: var(--text);
}

.term-widget-output {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-solid) transparent;
}

.term-widget-output::-webkit-scrollbar {
  width: 4px;
}
.term-widget-output::-webkit-scrollbar-thumb {
  background: var(--border-solid);
  border-radius: 2px;
}

.tw-line {
  display: flex;
  gap: 8px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.tw-prompt { color: var(--accent); flex-shrink: 0; }
.tw-cmd    { color: #e6edf3; }
.tw-out    { color: var(--text-muted); padding-left: 18px; display: block; }
.tw-out.success { color: #22c55e; }
.tw-out.error   { color: #f87171; }
.tw-out.accent  { color: var(--accent); }
.tw-out.dim     { color: var(--text-faint); }
.tw-blank { min-height: 0.6em; }

.term-widget-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.tw-input-prompt {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 0.82rem;
}

.tw-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #e6edf3;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  caret-color: var(--accent);
}

.tw-input::placeholder {
  color: var(--text-faint);
}

/* ============================================================
   LIGHT THEME OVERRIDES
   ============================================================ */

/* Scrollbar - visible on white bg */
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #d1d5db; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Nav - dark text on white */
.nav-link { color: #374151; }
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-dim); }
.hamburger .ham-line { background: #111827; }
.navbar.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }

/* Hero grid lines - subtle red on white */
.hero::before {
  background-image:
    linear-gradient(rgba(229, 62, 62, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(229, 62, 62, 0.05) 1px, transparent 1px);
}
.hero::after {
  background: radial-gradient(ellipse at top left, rgba(229, 62, 62, 0.07) 0%, transparent 65%);
}

/* Skill cards - white bg, subtle shadow */
.skill-card { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.skill-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.10); }

/* Timeline card */
.timeline-card { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.timeline-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.10); }

/* Cert cards */
.cert-card { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.cert-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.10); }

/* Contact form */
.contact-form { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.form-input { border-color: #e5e7eb; background: #ffffff; }
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229,62,62,0.10); }

/* Social links */
.social-link { background: #f3f4f6; border-color: #e5e7eb; color: #6b7280; }
.social-link:hover { color: var(--accent); border-color: var(--border); background: var(--accent-dim); box-shadow: 0 4px 14px rgba(229,62,62,0.15); }

/* Footer - keep dark for contrast */
.footer {
  background: #111827;
  border-top: 1px solid #1f2937;
}
.footer-text { color: #6b7280; }
.footer-logo { color: #f3f4f6; }
.footer-link { color: #6b7280; }
.footer-link:hover { color: var(--accent); }
.footer .logo-bracket { color: var(--accent); }

/* Pipeline stats */
.pipeline-stat { box-shadow: 0 2px 12px rgba(0,0,0,0.05); }

/* Stat card gradient on white */
.stat-card::before {
  background: linear-gradient(135deg, rgba(229, 62, 62, 0.06) 0%, transparent 60%);
}

/* Badge on white - stronger contrast */
.badge {
  background: rgba(229, 62, 62, 0.06);
  border-color: rgba(229, 62, 62, 0.20);
}
.badge:hover {
  background: rgba(229, 62, 62, 0.12);
}

/* Cert featured on white */
.cert-card.cert-featured {
  border-color: rgba(229, 62, 62, 0.30);
  box-shadow: 0 0 20px rgba(229, 62, 62, 0.08), 0 2px 12px rgba(0,0,0,0.05);
  background: linear-gradient(135deg, #ffffff 0%, rgba(229, 62, 62, 0.04) 100%);
}

/* Section label on white */
.section-label {
  background: rgba(229, 62, 62, 0.07);
  border-color: rgba(229, 62, 62, 0.20);
}

/* ============================================================
   DUAL PIPELINE TRACKS
   ============================================================ */
.section-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 10px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.pipeline-tracks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.pipeline-track-card {
  background: var(--bg-card);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: all var(--transition);
}

.pipeline-track-card:hover {
  border-color: var(--border);
  box-shadow: 0 6px 24px rgba(0,0,0,0.09);
}

.track-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.track-label-ml {
  color: var(--purple);
}

.track-label-ml ~ .pipeline-wrapper .pipeline-packet-2 {
  background: var(--purple);
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.8);
}

.pipeline-packet-2 {
  background: var(--purple) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.8) !important;
  animation: flow-packet 4s ease-in-out 2s infinite !important;
}

.track-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-solid);
}

.track-tool {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-solid);
  color: var(--text-faint);
  letter-spacing: 0.02em;
}

.stage-waiting {
  color: var(--text-faint);
  background: transparent;
  border-color: transparent;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .pipeline-tracks-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RECOMMENDATIONS
   ============================================================ */
.recommendations {
  background: var(--bg-card-alt);
}

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

.rec-card {
  background: var(--bg);
  border: 1px solid var(--border-solid);
  border-radius: var(--radius);
  padding: 32px 28px 24px;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: all var(--transition);
}

.rec-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.09);
}

.rec-quote {
  font-size: 4rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.2;
  font-family: Georgia, serif;
  position: absolute;
  top: 16px;
  left: 24px;
  pointer-events: none;
}

.rec-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 24px;
  padding-top: 24px;
  font-style: italic;
}

.rec-author {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--border-solid);
  padding-top: 18px;
}

.rec-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.rec-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.rec-role {
  font-size: 0.75rem;
  color: var(--text-faint);
  line-height: 1.4;
}

@media (max-width: 700px) {
  .rec-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   IMPACT & METRICS SECTION
   ============================================================ */
.impact-section {
  background: var(--accent);
  padding: 80px 0;
}

.impact-header {
  text-align: center;
  margin-bottom: 48px;
}

.impact-section .section-label {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
  color: #fff;
}

.impact-section .section-title {
  color: #fff;
}

.impact-section .section-sub {
  color: rgba(255,255,255,0.8);
}

.impact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.impact-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(4px);
  transition: all var(--transition);
}

.impact-card:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-4px);
}

.impact-number {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-family: var(--font-body);
}

.impact-plus, .impact-unit {
  font-size: 1.8rem;
  vertical-align: super;
  color: rgba(255,255,255,0.7);
}

.impact-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

.impact-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 860px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .impact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .impact-number { font-size: 2.2rem; }
}

/* Ghost button (third CTA in hero) */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border-solid);
}

.btn-ghost:hover, .btn-ghost:focus-visible {
  color: var(--text);
  border-color: var(--text-muted);
  background: var(--bg-card);
  transform: translateY(-2px);
}
