/* ============================================
   ABHISHEK JAISWAL : PORTFOLIO
   Design system: ops-dashboard aesthetic
   ============================================ */

:root {
  /* Color tokens */
  --bg: #0a0e1a;
  --bg-elevated: #111729;
  --bg-elevated-2: #161d33;
  --border: #232b45;
  --border-strong: #313c60;
  --text-primary: #edeef4;
  --text-secondary: #99a1b8;
  --text-tertiary: #7d86ab;
  --accent-amber: #e8a23d;
  --accent-amber-soft: rgba(232, 162, 61, 0.12);
  --accent-cyan: #4fd8c4;
  --accent-cyan-soft: rgba(79, 216, 196, 0.12);
  --status-green: #34d399;

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Layout */
  --container-w: 1120px;
  --section-pad: clamp(3.5rem, 8vw, 6.5rem);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

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

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ UTILITY ============ */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent-amber);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

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

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 0%, transparent 70%);
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ============ TYPOGRAPHY ============ */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-amber);
  margin-bottom: 1rem;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 30ch;
  margin-bottom: 2.75rem;
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-amber);
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
}
.nav-link {
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}
.nav-link:hover { color: var(--text-primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.25rem;
  height: 2.25rem;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  white-space: nowrap;
}
.btn .icon { width: 16px; height: 16px; }

.btn-primary {
  background: var(--accent-amber);
  color: #1a1304;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -8px rgba(232, 162, 61, 0.5);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.btn-ghost:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.header-resume { display: inline-flex; }

/* ============ HERO ============ */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(3rem, 7vw, 5rem);
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  margin-bottom: 2.25rem;
}
.status-segment {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}
.status-segment-muted { color: var(--text-tertiary); }
.status-sep { color: var(--text-tertiary); }

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-green);
  flex-shrink: 0;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--status-green);
  animation: pulse-ring 2.2s var(--ease) infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(1.9); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .status-dot::after { animation: none; opacity: 0; }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 19ch;
  margin-bottom: 1.5rem;
}
.hl-amber { color: var(--accent-amber); }
.hl-cyan { color: var(--accent-cyan); }

.hero-subhead {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 56ch;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

/* ============ METRIC GRID ============ */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.metric-card {
  position: relative;
  background: var(--bg-elevated);
  padding: 1.5rem 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.metric-spark {
  position: absolute;
  top: 1.3rem;
  right: 1.3rem;
  width: 56px;
  height: 22px;
  stroke: var(--accent-cyan);
  stroke-width: 1.6;
  fill: none;
  opacity: 0.55;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}
.stat-prefix, .stat-suffix { color: var(--accent-amber); }

.metric-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 0.35rem;
}
.metric-sub {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-tertiary);
}

.metric-card-progress { justify-content: flex-start; }
.progress-track {
  margin-top: 0.6rem;
  height: 5px;
  border-radius: 4px;
  background: var(--bg-elevated-2);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 5%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-amber));
  border-radius: 4px;
  transition: width 1.1s var(--ease);
}

/* ============ SECTIONS (generic) ============ */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--border);
}
.section-alt { background: var(--bg-elevated); }

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: start;
}

.readme-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.readme-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated-2);
}
.readme-dot { width: 9px; height: 9px; border-radius: 50%; }
.readme-dot-red { background: #e8665a; }
.readme-dot-amber { background: var(--accent-amber); }
.readme-dot-green { background: var(--status-green); }
.readme-filename {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-left: 0.4rem;
}
.readme-body { padding: 1.75rem; }
.readme-body p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.1rem;
}
.readme-body p:last-child { margin-bottom: 0; }

.meta-panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  align-self: stretch;
}
.meta-list { display: flex; flex-direction: column; gap: 1.3rem; }
.meta-row dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
}
.meta-row dd {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* ============ EXPERIENCE TIMELINE ============ */
.timeline { display: flex; flex-direction: column; gap: 0; }

.timeline-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1.75rem;
  padding-bottom: 3rem;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-rail {
  position: relative;
  display: flex;
  justify-content: center;
}
.timeline-rail::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: -3rem;
  width: 1px;
  background: var(--border-strong);
}
.timeline-item:last-child .timeline-rail::before { display: none; }
.timeline-dot {
  position: relative;
  z-index: 1;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent-amber);
  margin-top: 4px;
}

.timeline-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.1rem;
}
.timeline-role {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}
.timeline-company {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
}
.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.timeline-bullets { display: flex; flex-direction: column; gap: 0.65rem; }
.timeline-bullets li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.97rem;
  color: var(--text-secondary);
}
.timeline-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 5px;
  height: 5px;
  border-radius: 1px;
  background: var(--accent-cyan);
}

/* ============ PROJECTS ============ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.project-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.project-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.project-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.project-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.status-pill-building {
  color: var(--accent-amber);
  background: var(--accent-amber-soft);
}
.status-pill-active {
  color: var(--status-green);
  background: rgba(52, 211, 153, 0.12);
}

.project-desc {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.project-tags, .tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-secondary);
  background: var(--bg-elevated-2);
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.project-footnote {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--text-tertiary);
}
.project-footnote a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ FIELD NOTES ============ */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.note-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.85rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.note-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.note-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-amber);
  margin-bottom: 0.85rem;
}
.note-title {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.9rem;
}
.note-body {
  font-size: 0.93rem;
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
}
.note-body-tight { margin-top: 1.1rem; }

.note-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-cyan);
}
.note-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-sm { width: 13px; height: 13px; }

.bench-compare {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--bg-elevated-2);
  border-radius: var(--radius-sm);
}
.bench-row {
  display: grid;
  grid-template-columns: 52px 1fr 64px;
  align-items: center;
  gap: 0.75rem;
}
.bench-row-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-tertiary);
}
.bench-bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--bg);
  overflow: hidden;
}
.bench-bar {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  background: var(--text-tertiary);
  transition: width 1s var(--ease);
}
.bench-bar-accent { background: linear-gradient(90deg, var(--accent-cyan), var(--accent-amber)); }
.bench-row-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-primary);
  text-align: right;
}

/* ============ STACK / SKILLS ============ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 2.5rem;
  margin-bottom: 3rem;
}
.skill-group-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
}

.cert-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}
.cert-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.cert-name {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.cert-date {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* ============ CONTACT ============ */
.section-contact { text-align: left; }
.contact-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 52ch;
  margin-bottom: 2.5rem;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.contact-link:hover {
  border-color: var(--accent-amber);
  transform: translateY(-3px);
}
.contact-link .icon { width: 20px; height: 20px; color: var(--accent-amber); flex-shrink: 0; }
.contact-link-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.contact-link-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-word;
}

/* ============ FOOTER ============ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}
.footer-links a:hover { color: var(--accent-cyan); }

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

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    inset: 4.25rem 0 0 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .main-nav.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem;
  }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .nav-link {
    display: block;
    padding: 1.1rem 0;
    font-size: 1.05rem;
  }
  .nav-toggle { display: flex; }
  .header-resume { display: none; }

  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-spark { display: none; }

  .timeline-item { grid-template-columns: 18px 1fr; gap: 1rem; }
  .timeline-header { flex-direction: column; align-items: flex-start; gap: 0.3rem; }

  .project-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .cert-row { grid-template-columns: 1fr; }
  .contact-links { grid-template-columns: 1fr; }

  .bench-row { grid-template-columns: 44px 1fr 56px; gap: 0.5rem; }
}

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