/* ==========================================================================
   Shreesh Dwivedi - Portfolio
   Shared stylesheet. Sidebar layout, monochrome theme (light/dark/auto),
   Hanken Grotesk (body) + Dancing Script (signature) + JetBrains Mono (mono).
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-raised: #fafafa;
  --fg: #121212;
  --muted: #6d6d6d;
  --faint: #a3a3a3;
  --border: #e6e6e4;
  --border-strong: #cfcfcc;
  --accent: #121212;
  --accent-contrast: #ffffff;

  --font-body: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-signature: "Dancing Script", cursive;

  --sidebar-w: 264px;
  --content-max: 760px;
  --radius: 10px;
  --transition: 180ms ease;
}

html[data-theme="dark"] {
  --bg: #0b0b0c;
  --bg-raised: #131314;
  --fg: #f2f2f0;
  --muted: #9c9c98;
  --faint: #6b6b68;
  --border: #232324;
  --border-strong: #313132;
  --accent: #f2f2f0;
  --accent-contrast: #0b0b0c;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  transition: background var(--transition), color var(--transition);
}

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

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

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

kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--bg-raised);
}

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

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============ Mobile menu button ============ */
.menu-btn {
  display: none;
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 50;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  font-size: 1.1rem;
}

/* ============ Layout shell ============ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ============ Sidebar ============ */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 34px 26px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: inline-block;
  margin-bottom: 40px;
}

.signature {
  font-family: var(--font-signature);
  font-size: 2.1rem;
  font-weight: 700;
}

.nav-group {
  margin-bottom: 26px;
}

.nav-group .label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  font-size: 0.93rem;
  color: var(--muted);
  transition: color var(--transition), padding-left var(--transition);
}

.nav-item .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  width: 18px;
}

.nav-item .arrow {
  margin-left: auto;
  opacity: 0;
  transition: opacity var(--transition);
}

.nav-item:hover,
.nav-item.active {
  color: var(--fg);
  padding-left: 4px;
}

.nav-item:hover .arrow,
.nav-item.active .arrow {
  opacity: 1;
}

.nav-item.active {
  font-weight: 600;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
}

.theme-toggle {
  display: inline-flex;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.theme-toggle button {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 12px;
  border-radius: 999px;
  color: var(--muted);
}

.theme-toggle button.active {
  background: var(--fg);
  color: var(--bg);
}

/* ============ Content ============ */
.content {
  flex: 1;
  min-width: 0;
}

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 60px 32px 100px;
}

.topbar {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin-bottom: 46px;
}

/* ============ Intro / hero ============ */
.intro {
  margin-bottom: 64px;
}

.intro-status {
  font-size: clamp(2rem, 4.2vw, 2.9rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.intro-bio {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 54ch;
  margin: 0;
}

.intro-bio a {
  border-bottom: 1px solid var(--border-strong);
}

.intro-bio a:hover {
  border-color: var(--fg);
}

.intro-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin-bottom: 14px;
}

/* ============ Section head ============ */
section {
  margin-bottom: 64px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  max-width: 46ch;
}

.viewall {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.viewall:hover {
  color: var(--fg);
}

/* ============ Journey / card grid (timeline + currently) ============ */
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.journey.journey-3 {
  grid-template-columns: repeat(3, 1fr);
}

.j-card {
  background: var(--bg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
}

.j-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yr,
.j-body>.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
}

.j-card h3 {
  font-size: 0.98rem;
  margin: 4px 0 2px;
}

.j-card p {
  font-size: 0.87rem;
  color: var(--muted);
  margin: 0 0 4px;
  line-height: 1.5;
}

.j-future {
  justify-content: space-between;
  background: var(--bg-raised);
}

.gfx {
  position: relative;
  height: 60px;
}

.bars {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.bars span {
  flex: 1;
  background: var(--border-strong);
  border-radius: 2px 2px 0 0;
  animation: grow 2.6s ease-in-out infinite;
}

.bars span:nth-child(1) {
  height: 30%;
  animation-delay: 0s;
}

.bars span:nth-child(2) {
  height: 55%;
  animation-delay: .15s;
}

.bars span:nth-child(3) {
  height: 40%;
  animation-delay: .3s;
}

.bars span:nth-child(4) {
  height: 70%;
  animation-delay: .45s;
}

.bars span:nth-child(5) {
  height: 50%;
  animation-delay: .6s;
}

.bars span:nth-child(6) {
  height: 85%;
  animation-delay: .75s;
}

@keyframes grow {

  0%,
  100% {
    transform: scaleY(0.85);
  }

  50% {
    transform: scaleY(1);
  }
}

.trend {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.trend-line,
.trend-head {
  fill: none;
  stroke: var(--fg);
  stroke-width: 1.4;
}

.future-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-top: 12px;
}

/* ============ Project preview grid ============ */
.pgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.pcard {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.pcard:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.thumb .scene {
  width: 100%;
  height: 100%;
  display: block;
}

.pbody {
  padding: 20px;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--muted);
}

.tag.dev {
  color: var(--fg);
  border-color: var(--fg);
}

.pbody h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}

.pbody>p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.metrics-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

.metrics-list b {
  color: var(--fg);
  font-weight: 600;
}

/* ============ List rows (writing preview) ============ */
.list-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.list-row:first-of-type {
  border-top: 1px solid var(--border);
}

.lead-col {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
  width: 90px;
  flex-shrink: 0;
}

.list-row .body {
  flex: 1;
}

.list-row h3 {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

.list-row .ext {
  color: var(--faint);
  transition: color var(--transition);
}

.list-row:hover .ext {
  color: var(--fg);
}

.list-row:hover h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ Updates (personal/career) ============ */
.updates-list {
  display: flex;
  flex-direction: column;
}

.update-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: start;
  gap: 4px 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.update-row:first-of-type {
  border-top: 1px solid var(--border);
}

.uicon {
  color: var(--muted);
  padding-top: 2px;
}

.ur-body {
  grid-column: 2;
}

.ur-body h3 {
  font-size: 0.94rem;
  margin: 0;
}

.ur-body p {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 4px 0 0;
}

.ur-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
  white-space: nowrap;
}

a.update-row:hover h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ Page head (non-home pages) ============ */
.page-head {
  margin-bottom: 50px;
}

.kicker.mono {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin-bottom: 12px;
}

.page-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  margin: 0;
  letter-spacing: -0.01em;
}

.page-head .lede {
  font-size: 1rem;
  color: var(--muted);
  max-width: 58ch;
  margin: 14px 0 0;
}

.compact-contact .contact-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

/* ============ Toolkit page ============ */
.tool-group {
  margin-bottom: 46px;
}

.skill-block {
  margin-bottom: 22px;
}

.skill-block:last-child {
  margin-bottom: 0;
}

.skill-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--faint);
  margin-bottom: 10px;
}

.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.85rem;
  padding: 7px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color var(--transition), color var(--transition);
}

.tchip:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.tchip img {
  width: 15px;
  height: 15px;
  border-radius: 3px;
}

.tchip.skill {
  color: var(--fg);
  background: var(--bg-raised);
  border-color: var(--border);
}

.footer-cta {
  padding: 28px 0 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.footer-cta h2 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}

.footer-cta p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-primary:hover {
  opacity: 0.85;
}

/* ============ Experience page ============ */
.role-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.role-id {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-mark {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: var(--fg);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
  overflow: hidden;
}

.role-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg);
  padding: 6px;
}

.role-id a.role-link {
  border-bottom: 1px solid var(--border-strong);
}

.role-id a.role-link:hover {
  border-color: var(--fg);
}

/* ============ Case study page ============ */
.case-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.case-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.case-shot {
  aspect-ratio: 16/8;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-raised);
  margin-bottom: 50px;
}

.case-shot .placeholder-copy {
  text-align: center;
  color: var(--faint);
}

.case-shot .placeholder-copy strong {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.case-shot .placeholder-copy span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

/* ============ Contact modal ============ */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.contact-modal-overlay.open {
  display: flex;
}

.contact-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  padding: 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  animation: modalPop 220ms cubic-bezier(.2, .9, .3, 1.3);
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.contact-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.contact-modal-head h3 {
  font-size: 1.35rem;
  margin: 0 0 6px;
}

.contact-modal-head p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}

.modal-close:hover {
  background: var(--fg);
  color: var(--bg);
}

.contact-modal .contact-row {
  padding: 18px 0;
}

.contact-modal .contact-row:first-of-type {
  border-top: none;
}

.contact-modal .contact-row:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-modal .cr-body h3 {
  font-size: 1.02rem;
}

.contact-modal .cr-body p {
  font-size: 0.9rem;
}

.role-id h2 {
  font-size: 1.1rem;
  margin: 0 0 3px;
}

.role-id p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.role-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* ============ Toolkit page ============ */
.tool-group {
  margin-bottom: 46px;
}

.skill-block {
  margin-bottom: 22px;
}

.skill-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin-bottom: 10px;
}

.tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  transition: border-color var(--transition), color var(--transition);
}

.tchip:hover {
  border-color: var(--border-strong);
  color: var(--fg);
}

.tchip img {
  width: 15px;
  height: 15px;
  border-radius: 3px;
}

.tchip.skill {
  border-style: dashed;
}

.footer-cta {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  margin-bottom: 20px;
}

.footer-cta h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.footer-cta p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: 999px;
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.85;
}

/* ============ Portrait ============ */
.about-top {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
}

.portrait {
  margin: 0;
}

.portrait img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.portrait figcaption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
  margin-top: 10px;
}

/* ============ Prose ============ */
.prose p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 18px;
  line-height: 1.65;
}

.prose strong {
  color: var(--fg);
  font-weight: 600;
}

/* ============ Facts / strengths grid ============ */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.fact {
  background: var(--bg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fact .mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
}

.fact p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* ============ Education ============ */
.education-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.education-card {
  background: var(--bg);
  padding: 20px;
}

.card-index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  margin: 0 0 10px;
}

.education-card h3 {
  font-size: 0.94rem;
  margin: 0 0 6px;
  line-height: 1.4;
}

.education-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.education-card span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
}

.resume-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
}

.resume-links .mono {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.resume-links a {
  border-bottom: 1px solid var(--border-strong);
}

.resume-links a:hover {
  border-color: var(--fg);
}

/* ============ Contact block (about page) ============ */
.contact-time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  margin: 0 0 24px;
}

.contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.contact-row:first-of-type {
  border-top: 1px solid var(--border);
}

.cr-body h3 {
  font-size: 0.95rem;
  margin: 0 0 4px;
}

.cr-body p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.cr-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: background var(--transition), color var(--transition);
}

.cbtn:hover {
  background: var(--fg);
  color: var(--bg);
}

.cr-socials {
  display: flex;
  gap: 18px;
  flex-shrink: 0;
}

.cr-socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.cr-socials a:hover {
  color: var(--fg);
}

.sicon {
  display: inline-flex;
}

/* ============ Endnote / closing CTA ============ */
.endnote {
  margin-bottom: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.endnote>p {
  font-size: 1.05rem;
  margin: 0 0 22px;
}

.endnote a {
  border-bottom: 1px solid var(--border-strong);
}

.endnote a:hover {
  border-color: var(--fg);
}

.foot-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
  flex-wrap: wrap;
  gap: 6px;
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
  .pgrid {
    grid-template-columns: 1fr;
  }

  .journey {
    grid-template-columns: 1fr 1fr;
  }

  .education-grid {
    grid-template-columns: 1fr;
  }

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

  .portrait {
    width: 160px;
  }
}

@media (max-width: 720px) {
  .menu-btn {
    display: block;
  }

  .layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 20% 0 0;
    height: 100vh;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform var(--transition);
    background: var(--bg);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    width: 100%;
  }

  .wrap {
    padding: 90px 22px 70px;
  }

  .journey {
    grid-template-columns: 1fr;
  }

  .update-row {
    grid-template-columns: 26px 1fr;
  }

  .ur-date {
    grid-column: 2;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .contact-row {
    flex-direction: column;
    align-items: flex-start;
  }
}