/* ═══════════════════════════════════════════════════
   TERMINAL THEME — Arijit Ghosh Personal Website
   v2: light/dark mode, colorblind mode, catchier design
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ─── DARK THEME (default) ─── */
:root, [data-theme="dark"] {
  --bg: #1A1714;
  --bg-alt: #211E19;
  --bg-surface: #252119;
  --cream: #F5F0EB;
  --tan: #C4A882;
  --green: #A8B87C;
  --muted: #8A8078;
  --border: rgba(196, 168, 130, 0.12);
  --border-strong: rgba(196, 168, 130, 0.25);
  --accent: #D4652E;
  --code-bg: rgba(196, 168, 130, 0.08);
  --card-hover: rgba(196, 168, 130, 0.04);
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-display: 'Space Grotesk', 'JetBrains Mono', sans-serif;
  --shadow: 0 2px 20px rgba(0,0,0,0.3);
}

/* ─── LIGHT THEME ─── */
[data-theme="light"] {
  --bg: #FAF8F5;
  --bg-alt: #F0EBE4;
  --bg-surface: #FFFFFF;
  --cream: #1A1714;
  --tan: #9A7B55;
  --green: #5A7A3A;
  --muted: #7A7570;
  --border: rgba(26, 23, 20, 0.1);
  --border-strong: rgba(26, 23, 20, 0.2);
  --accent: #C45522;
  --code-bg: rgba(26, 23, 20, 0.06);
  --card-hover: rgba(26, 23, 20, 0.03);
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
}

/* ─── COLORBLIND MODES ─── */
[data-vision="deuteranopia"] {
  --tan: #6B9BD2;
  --green: #E6A817;
  --accent: #D4652E;
}
[data-vision="protanopia"] {
  --tan: #B8A038;
  --green: #5AADE6;
  --accent: #CC8400;
}
[data-vision="tritanopia"] {
  --tan: #E07070;
  --green: #6BC5D2;
  --accent: #D4652E;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 18px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--tan) var(--bg);
}

/* ─── NOISE / FILM-GRAIN OVERLAY ─── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="light"] body::before { opacity: 0.18; mix-blend-mode: multiply; }

/* keep real content above noise */
.top-bar, .page-body, .status-bar, #term-easter, #page-transition { position: relative; z-index: 2; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-mono);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s, color 0.4s;
}

a {
  color: var(--tan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
a:hover {
  border-bottom-color: var(--tan);
  color: var(--cream);
}

::selection {
  background: var(--tan);
  color: var(--bg);
}

/* ─── TOP BAR ─── */
.top-bar {
  display: flex;
  align-items: center;
  padding: 14px 28px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  gap: 10px;
  transition: background 0.4s;
}

.top-bar__dots {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}
.top-bar__dot {
  width: 11px; height: 11px; border-radius: 50%;
}
.top-bar__dot--r { background: #E8655A; }
.top-bar__dot--y { background: #F2BD3A; }
.top-bar__dot--g { background: #69C94B; }

.top-bar__tabs {
  display: flex;
  gap: 0;
  margin-left: 16px;
  overflow-x: auto;
}
.top-bar__brand {
  color: var(--cream);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.top-bar__tab {
  padding: 6px 20px;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-decoration: none;
}
.top-bar__tab:hover {
  color: var(--cream);
  border-bottom-color: var(--tan);
}
.top-bar__tab--active {
  color: var(--cream);
  border-bottom: 2px solid var(--tan);
}

.top-bar__spacer { flex: 1; }

.top-bar__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.top-bar__time {
  font-size: 13px;
  color: var(--muted);
}

/* ─── THEME TOGGLE BUTTONS ─── */
.ctrl-btn {
  background: none;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 4px 11px;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 2px;
  white-space: nowrap;
}
.ctrl-btn:hover {
  color: var(--cream);
  border-color: var(--tan);
  background: var(--card-hover);
}
.ctrl-btn--active {
  color: var(--tan);
  border-color: var(--tan);
}

/* ─── LAYOUT ─── */
.page-body {
  flex: 1;
  max-width: 1380px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - 140px);
}
.split__left {
  padding-right: 36px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}
.split__right {
  padding-left: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

/* ─── TYPOGRAPHY ─── */
.prompt { color: var(--green); }
.muted { color: var(--muted); }
.comment { color: var(--muted); font-style: italic; }
.highlight { color: var(--tan); }
.accent { color: var(--accent); }

.hero-name {
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.section-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--tan);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ─── TAGS / CHIPS ─── */
.tag {
  display: inline-block;
  padding: 3px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  font-size: 11px;
  color: var(--tan);
  margin-right: 5px;
  margin-bottom: 5px;
  transition: all 0.25s;
}
.tag:hover {
  background: var(--card-hover);
  border-color: var(--tan);
  transform: translateY(-1px);
}

/* ─── CARDS ─── */
.card {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.25s;
}
.card:hover {
  padding-left: 8px;
  background: var(--card-hover);
}
.card:last-child { border-bottom: none; }
.card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 3px;
}
.card__meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.card__year {
  display: inline-block;
  background: var(--code-bg);
  color: var(--tan);
  padding: 1px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}

/* ─── NEWS ─── */
.news-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  font-size: 14px;
  line-height: 1.65;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.25s;
}
.news-item:hover {
  padding-left: 6px;
  background: var(--card-hover);
}
.news-item:last-child { border-bottom: none; }
.news-item__date {
  color: var(--green);
  font-size: 12px;
  white-space: nowrap;
}

/* ─── TIMELINE (CV) ─── */
.timeline-item {
  position: relative;
  padding: 16px 0 16px 24px;
  border-left: 2px solid var(--border-strong);
  transition: border-color 0.3s;
}
.timeline-item:hover {
  border-left-color: var(--tan);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px; top: 22px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--tan);
  transition: transform 0.2s;
}
.timeline-item:hover::before {
  transform: scale(1.4);
}
.timeline-item__year {
  font-size: 12px;
  color: var(--green);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.timeline-item__title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 2px;
}
.timeline-item__institution {
  font-size: 13px;
  color: var(--tan);
  margin-bottom: 6px;
}
.timeline-item__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.timeline-item__desc li {
  margin-bottom: 3px;
  list-style: none;
  padding-left: 14px;
  position: relative;
}
.timeline-item__desc li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--tan);
}

/* ─── REPO CARD ─── */
.repo-card {
  border: 1px solid var(--border-strong);
  padding: 20px;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}
.repo-card::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--tan);
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}
.repo-card:hover {
  border-color: var(--tan);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.repo-card:hover::after {
  width: 100%;
}
.repo-card__name {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--cream);
}
.repo-card__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 12px;
}
.repo-card__link {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.repo-card__lang {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 12px;
}
.repo-card__lang-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 6px;
}

/* ─── SERVICE LIST ─── */
.service-item {
  padding: 10px 0 10px 18px;
  border-left: 2px solid var(--border);
  font-size: 14px;
  line-height: 1.7;
  color: var(--cream);
  position: relative;
  transition: border-color 0.2s;
}
.service-item:hover {
  border-left-color: var(--tan);
}
.service-item::before {
  content: '~';
  position: absolute;
  left: 6px;
  color: var(--green);
}

/* ─── PROFILE IMAGE ─── */
.profile-img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  filter: grayscale(20%);
  transition: all 0.4s;
}
.profile-img:hover {
  filter: grayscale(0%);
  transform: scale(1.08);
  border-color: var(--tan);
}

/* ─── STATUS BAR ─── */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 28px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--code-bg);
  transition: background 0.4s;
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── INITIAL FADE IN ─── */
.fade-in {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }
.fade-in-d4 { animation-delay: 0.4s; }
.fade-in-d5 { animation-delay: 0.5s; }
.fade-in-d6 { animation-delay: 0.6s; }

/* typing cursor */
.cursor {
  display: inline-block;
  width: 9px; height: 18px;
  background: var(--tan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1.06s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ─── PUB PAGE SPECIFIC ─── */
.pub-grid { display: flex; flex-direction: column; gap: 0; }
.pub-entry {
  display: grid; grid-template-columns: 48px 1fr; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(10px);
  animation: fadeUp 0.5s cubic-bezier(0.23,1,0.32,1) forwards;
  transition: padding-left 0.25s, background 0.25s;
}
.pub-entry:hover {
  padding-left: 8px;
  background: var(--card-hover);
}
.pub-entry:last-child { border-bottom: none; }
.pub-num {
  font-family: var(--font-display); font-size: 30px; font-weight: 800;
  color: var(--border-strong); line-height: 1;
}
.pub-title { font-size: 15px; font-weight: 600; line-height: 1.55; margin-bottom: 4px; }
.pub-authors { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 3px; }
.pub-authors strong { color: var(--cream); font-weight: 600; }
.pub-venue { font-size: 13px; }
.pub-venue em { color: var(--tan); font-style: normal; }
.pub-link {
  display: inline-block; margin-top: 4px; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em;
  padding: 2px 10px; border: 1px solid var(--border-strong);
  transition: all 0.2s;
}
.pub-link:hover { border-color: var(--tan); background: var(--card-hover); }
.year-divider {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--green); padding: 20px 0 8px; font-weight: 600;
}

/* ─── CV PAGE SPECIFIC ─── */
.cv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.cv-col { display: flex; flex-direction: column; gap: 28px; }
.awards-item {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
  display: grid; grid-template-columns: 50px 1fr; gap: 10px;
  transition: padding-left 0.2s;
}
.awards-item:hover { padding-left: 6px; }
.awards-year { color: var(--green); font-weight: 600; font-size: 12px; }

/* ─── REPO PAGE SPECIFIC ─── */
.repo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }

/* ─── TEACHING PAGE SPECIFIC ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  html { font-size: 17px; }
  .page-body { max-width: 100%; padding: 32px 5vw 80px; }
}
/* ── Hamburger button (hidden on desktop) ── */
.top-bar__burger { display: none; }

@media (max-width: 768px) {
  html { font-size: 16px; }
  .split { grid-template-columns: 1fr; }
  .split__left {
    border-right: none; padding-right: 0;
    padding-bottom: 28px; border-bottom: 1px solid var(--border);
  }
  .split__right { padding-left: 0; padding-top: 28px; }
  .hero-name { font-size: 2rem; }

  /* ── Mobile navbar: hamburger dropdown ── */
  .top-bar {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 0;
  }
  .top-bar__dots { display: none; }

  /* Hamburger icon */
  .top-bar__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    padding: 8px 9px;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s;
  }
  .top-bar__burger:hover { border-color: var(--tan); }
  .top-bar__burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--cream);
    border-radius: 1px;
    transition: all 0.3s;
  }
  /* Animate to X when open */
  .nav-open .top-bar__burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-open .top-bar__burger span:nth-child(2) {
    opacity: 0;
  }
  .nav-open .top-bar__burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Dropdown menu */
  .top-bar__tabs {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-left: 0;
    order: 3;
    padding-top: 12px;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 12px;
  }
  .nav-open .top-bar__tabs {
    display: flex;
  }
  .top-bar__tab {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: none;
    border-left: 2px solid transparent;
    transition: all 0.2s;
  }
  .top-bar__tab:hover {
    border-bottom: none;
    border-left-color: var(--tan);
    background: var(--card-hover);
  }
  .top-bar__tab--active {
    border-bottom: none;
    border-left: 2px solid var(--tan);
    color: var(--cream);
    background: var(--card-hover);
  }

  .top-bar__spacer { flex: 1; order: 1; }
  .top-bar__controls {
    order: 2;
    gap: 4px;
  }

  .cv-grid, .repo-grid, .two-col { grid-template-columns: 1fr; }
  .ctrl-btn { font-size: 11px; padding: 3px 7px; }
}

/* ═══════════════════════════════════════════════
   INTERACTIVE TERMINAL EASTER EGG
   ═══════════════════════════════════════════════ */
#term-easter {
  position: fixed;
  bottom: 44px;   /* sit above the .status-bar (~32px tall) */
  left: 24px;
  z-index: 200;
  font-family: var(--font-mono);
}

#term-toggle {
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow);
  opacity: 0.85;
}
#term-toggle:hover {
  background: var(--bg-surface);
  border-color: var(--tan);
  opacity: 1;
  transform: translateY(-2px);
}
.term-toggle-cursor {
  animation: blink 1.06s step-end infinite;
  color: var(--tan);
}

#term-window {
  width: min(560px, 90vw);
  height: min(360px, 60vh);
  background: var(--bg-alt);
  border: 1px solid var(--tan);
  border-radius: 6px;
  flex-direction: column;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  animation: term-slide-up 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  overflow: hidden;
}
@keyframes term-slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

#term-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--code-bg);
}

#term-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  transition: color 0.2s;
}
#term-close:hover { color: var(--accent); }

#term-output {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--cream);
  scrollbar-width: thin;
  scrollbar-color: var(--tan) var(--bg-alt);
}
.term-line {
  white-space: pre-wrap;
  word-break: break-word;
}

#term-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.term-prompt {
  color: var(--green);
  font-size: 13px;
}
#term-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: var(--tan);
}

/* ═══════════════════════════════════════════════
   PAGE TRANSITION OVERLAY
   ═══════════════════════════════════════════════ */
#page-transition {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 8vw;
  font-family: var(--font-mono);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease-out;
}
#page-transition.active {
  opacity: 1;
  pointer-events: auto;
}
.pt-line {
  margin-bottom: 4px;
  opacity: 0;
  animation: pt-line-in 0.18s forwards;
}
.pt-line:nth-child(1) { animation-delay: 0.05s; }
.pt-line:nth-child(2) { animation-delay: 0.18s; }
@keyframes pt-line-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.pt-prompt { color: var(--green); margin-right: 8px; }
.pt-cmd { color: var(--cream); }
.pt-cursor {
  color: var(--tan);
  animation: blink 0.5s step-end infinite;
  margin-left: 2px;
}
.pt-loading {
  color: var(--muted);
  font-size: 12px;
}
.pt-dots {
  display: inline-block;
  animation: pt-dots 0.5s steps(4) infinite;
  width: 1.5em;
  text-align: left;
}
@keyframes pt-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

@media (max-width: 768px) {
  #term-easter { left: 8px; bottom: 38px; }
  #term-window { width: calc(100vw - 16px); height: 50vh; }
  #term-toggle { font-size: 12px; padding: 5px 10px; }
}


/* ═══════════════════════════════════════════════
   PRINT / PDF — clean monochrome layout for CV
   ═══════════════════════════════════════════════ */
@media print {
  @page { margin: 0.6in; size: letter; }
  html { font-size: 10.5pt; }
  body {
    background: #fff !important;
    color: #111 !important;
    font-family: 'JetBrains Mono', Consolas, monospace;
    line-height: 1.5;
  }
  body::before { display: none !important; }
  .top-bar,
  .status-bar,
  #term-easter,
  #term-window,
  #page-transition,
  .top-bar__controls,
  .top-bar__tabs { display: none !important; }
  .page-body { max-width: 100% !important; padding: 0 !important; }
  a { color: #111 !important; border-bottom: none !important; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; color: #555; }
  h1, h2, h3 { color: #111 !important; page-break-after: avoid; }
  .cv-section, .pub-card, .repo-card { page-break-inside: avoid; }
  .cv-grid, .repo-grid, .two-col { display: block !important; }
  .cv-grid > *, .repo-grid > * { margin-bottom: 12pt; }
  /* simulate a clean header for print */
  .page-body::before {
    content: "Arijit Ghosh — Curriculum Vitae";
    display: block;
    font-size: 16pt;
    font-weight: 700;
    border-bottom: 1.5pt solid #111;
    padding-bottom: 6pt;
    margin-bottom: 16pt;
  }
}
