/* =========================================================
   PRABEEN DUTTA — PORTFOLIO
   Theme: "Infrastructure Status Dashboard" dark mode
   ========================================================= */

:root {
  /* Color tokens */
  --bg: #08090b;
  --bg-elevated: #0d0e11;
  --surface: #131417;
  --surface-hover: #17181c;
  --border: #212227;
  --border-strong: #2c2d33;

  --text-primary: #f2f3f5;
  --text-secondary: #9a9ca6;
  --text-tertiary: #64666f;

  --accent-blue: #4f8cff;
  --accent-violet: #8b7bff;
  --accent-green: #22d3a5;
  --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-violet));

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container-w: 1120px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono { font-family: var(--font-mono); }

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent-blue); color: #05070a;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 999;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================== Ambient background =========================== */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; inset: 0;
  background:
    radial-gradient(600px circle at 15% 8%, rgba(79,140,255,0.14), transparent 60%),
    radial-gradient(500px circle at 85% 18%, rgba(139,123,255,0.12), transparent 60%);
  pointer-events: none;
}

/* =========================== Nav =========================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,9,11,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
}
.logo-mark {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--surface);
}
.logo-status {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(34,211,165,0.6);
  animation: pulse-ring 2.2s var(--ease) infinite;
}
.nav-links {
  display: flex; gap: 28px;
}
.nav-link {
  font-size: 14px; color: var(--text-secondary);
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -20px;
  height: 2px; background: var(--accent-gradient); border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 36px; background: transparent; border: 1px solid var(--border-strong);
  border-radius: 8px; cursor: pointer;
}
.nav-toggle span {
  width: 16px; height: 1.5px; background: var(--text-primary); margin: 0 auto;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* =========================== Buttons =========================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent-gradient);
  color: #05070a; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover { background: var(--surface-hover); border-color: var(--text-tertiary); }

/* =========================== Status pill / dots =========================== */
.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  padding: 7px 14px; border-radius: 999px;
  font-size: 12.5px; color: var(--text-secondary);
}
.status-pill-divider { color: var(--border-strong); }
.status-uptime { color: var(--accent-green); }

.dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-tertiary);
}
.dot-live {
  background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(34,211,165,0.55);
  animation: pulse-ring 2.2s var(--ease) infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(34,211,165,0.45); }
  70% { box-shadow: 0 0 0 8px rgba(34,211,165,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,165,0); }
}

/* =========================== Hero =========================== */
.hero {
  position: relative;
  padding: 168px 0 96px;
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }

.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  margin-top: 22px;
  background: linear-gradient(180deg, #ffffff 20%, #b9bcc7 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1.05;
}

.hero-role {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--accent-blue);
  min-height: 1.6em;
}
.caret {
  display: inline-block; width: 2px; height: 1em; background: var(--accent-blue);
  margin-left: 2px; vertical-align: -0.15em;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-tagline {
  max-width: 620px; margin: 26px auto 0;
  color: var(--text-secondary); font-size: 17px; line-height: 1.7;
}
.hero-tagline strong { color: var(--text-primary); font-weight: 600; }

.hero-ctas {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 36px;
}

/* Signature metrics bar */
.metrics-bar {
  margin-top: 64px;
  display: flex; align-items: center; justify-content: center;
  gap: 28px; flex-wrap: wrap;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 26px 36px;
  width: 100%; max-width: 880px;
}
.metric { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 120px; }
.metric-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-green);
  box-shadow: 0 0 8px rgba(34,211,165,0.6);
  margin-bottom: 2px;
}
.metric-value { font-size: 26px; font-weight: 600; color: var(--text-primary); }
.metric-unit { font-size: 14px; color: var(--text-tertiary); margin-left: 2px; }
.metric-label { font-size: 12px; color: var(--text-tertiary); text-align: center; }
.metric-sep { width: 1px; height: 36px; background: var(--border-strong); }
@media (max-width: 720px) { .metric-sep { display: none; } }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 34px; border: 1.5px solid var(--border-strong); border-radius: 12px;
  display: flex; justify-content: center; padding-top: 6px;
}
.scroll-cue span {
  width: 3px; height: 6px; border-radius: 2px; background: var(--accent-blue);
  animation: scrollcue 1.8s var(--ease) infinite;
}
@keyframes scrollcue {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(10px); opacity: 0; }
  100% { opacity: 0; }
}

/* =========================== Sections shared =========================== */
.section { padding: 108px 0; position: relative; }
.section-alt { background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-contact { padding-bottom: 140px; text-align: center; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-tertiary); font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.eyebrow .mono {
  color: var(--accent-blue); border: 1px solid var(--border-strong);
  padding: 2px 7px; border-radius: 5px; font-size: 11px;
}
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.15; }
.section-contact .section-title { }
.section-sub { color: var(--text-secondary); font-size: 16px; margin-top: 14px; max-width: 560px; }
.section-contact .section-sub { margin-left: auto; margin-right: auto; }

/* =========================== About =========================== */
.about-grid {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px;
  margin-top: 52px; align-items: start;
}
.about-copy p { color: var(--text-secondary); margin-bottom: 18px; font-size: 16px; }
.about-copy p:last-child { margin-bottom: 0; }

.about-achievements {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); padding: 8px;
}
.about-achievements li {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; font-size: 14.5px; color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.about-achievements li:last-child { border-bottom: none; }
.ach-icon { color: var(--accent-green); flex-shrink: 0; margin-top: 2px; }

.focus-block { margin-top: 64px; }
.focus-label { color: var(--text-tertiary); font-size: 13px; margin-bottom: 16px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 8px 16px; font-size: 13.5px; color: var(--text-secondary);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tag:hover { border-color: var(--accent-blue); color: var(--text-primary); }

/* =========================== Skills =========================== */
.skills-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
}
.skill-card {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface); padding: 24px;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.skill-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.skill-card-head h3 { font-size: 16px; font-weight: 600; }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-row-tight { margin-bottom: 18px; }
.pill {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--text-secondary);
  background: var(--bg-elevated); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 6px;
}

/* =========================== Timeline (experience) =========================== */
.timeline { margin-top: 56px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px;
  background: linear-gradient(to bottom, var(--border-strong), transparent);
}
.tl-item { display: flex; gap: 28px; padding-bottom: 52px; position: relative; }
.tl-item:last-child { padding-bottom: 0; }
.tl-marker { position: relative; z-index: 1; padding-top: 6px; }
.tl-content {
  flex: 1; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-md); padding: 26px 28px;
}
.tl-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.tl-role { font-size: 19px; }
.tl-company { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.tl-loc { color: var(--text-tertiary); }
.tl-date {
  font-size: 12.5px; color: var(--accent-blue);
  border: 1px solid var(--border-strong); padding: 5px 10px; border-radius: 6px;
  white-space: nowrap;
}
.tl-highlights li {
  position: relative; padding-left: 18px; margin-bottom: 10px;
  color: var(--text-secondary); font-size: 14.5px; line-height: 1.6;
}
.tl-highlights li:last-child { margin-bottom: 0; }
.tl-highlights li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent-violet);
}

/* =========================== Projects =========================== */
.projects-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.project-card {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-md); padding: 26px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.project-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.project-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.project-tag { color: var(--accent-blue); font-size: 11.5px; letter-spacing: 0.04em; }
.project-card h3 { font-size: 17px; margin-bottom: 16px; line-height: 1.3; }
.project-block-label {
  color: var(--text-tertiary); font-size: 11px; letter-spacing: 0.06em;
  margin-top: 16px; margin-bottom: 8px;
}
.project-card > p { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }
.project-card ul li {
  position: relative; padding-left: 16px; margin-bottom: 8px;
  color: var(--text-secondary); font-size: 13.5px; line-height: 1.55;
}
.project-card ul li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent-green);
}

/* =========================== Certifications =========================== */
.badge-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.badge-card {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-md); padding: 22px;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
  position: relative; overflow: hidden;
}
.badge-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.badge-card:hover::before { transform: scaleX(1); }
.badge-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.badge-org {
  display: inline-block; font-size: 11px; color: var(--accent-blue);
  border: 1px solid var(--border-strong); padding: 3px 9px; border-radius: 999px;
  margin-bottom: 12px;
}
.badge-card h4 { font-size: 14.5px; font-weight: 600; line-height: 1.4; }

/* Recognition */
.recognition { margin-top: 64px; }
.recog-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px;
}
.recog-item {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.recog-item strong { font-size: 14px; }
.recog-item span { font-size: 12.5px; color: var(--text-tertiary); }
.recog-note { color: var(--text-secondary); font-size: 14px; }

/* Education */
.education { margin-top: 56px; }
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.edu-item {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-sm); padding: 20px;
}
.edu-item h4 { font-size: 15px; margin-bottom: 6px; }
.edu-item p { color: var(--text-secondary); font-size: 13.5px; margin-bottom: 10px; }
.edu-item span { color: var(--accent-blue); font-size: 12px; }

/* =========================== Contact =========================== */
.contact-grid {
  margin-top: 48px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.contact-card {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius-sm); padding: 18px;
  font-size: 14px; color: var(--text-primary);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-card svg { color: var(--accent-blue); flex-shrink: 0; }
.contact-card:hover { border-color: var(--accent-blue); transform: translateY(-2px); }
.contact-card-static { cursor: default; }
.contact-card-static:hover { transform: none; border-color: var(--border); }

/* =========================== Footer =========================== */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer-status { font-size: 12.5px; color: var(--accent-green); display: flex; align-items: center; gap: 8px; }
.footer-copy { color: var(--text-tertiary); font-size: 13px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: var(--text-secondary); font-size: 13px; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-primary); }

/* =========================== Reveal animation =========================== */
[data-reveal] {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].in-view { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .caret, .dot-live, .scroll-cue span, .logo-status { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================== Responsive =========================== */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: repeat(2, 1fr); }
  .recog-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 20px 24px; gap: 4px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-link { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; }
  .nav-actions .btn-ghost span,
  .nav-actions .btn-ghost { }
  .hero { padding: 128px 0 72px; }
  .metrics-bar { padding: 20px; gap: 20px 16px; }
  .edu-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .recog-grid { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav-actions .btn-ghost { padding: 8px 10px; font-size: 0; }
  .nav-actions .btn-ghost svg { width: 16px; height: 16px; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
}
