/* =========================================================
   Portfolio — Rodel Jr. Ganancial
   1. Tokens        6. Skills
   2. Background    7. Experience timeline
   3. Layout        8. Projects
   4. Profile       9. Lightbox
   5. Buttons      10. Motion / Responsive / Print
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #070a12;
  --glow-a: rgba(109, 40, 217, 0.3);
  --glow-b: rgba(14, 116, 144, 0.22);
  --glow-c: rgba(109, 40, 217, 0.18);

  --surface: rgba(255, 255, 255, 0.035);
  --surface-hi: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hi: rgba(255, 255, 255, 0.16);

  --fg: #e9eefc;
  --muted: #8f9dba;
  --dim: #6b7893;

  --accent: #a78bfa;
  --accent-dp: #7c3aed;
  --accent-2: #22d3ee;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --accent-line: rgba(139, 92, 246, 0.3);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px -12px rgba(0, 0, 0, 0.7);
  --shadow-lift: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -16px rgba(0, 0, 0, 0.8);

  --max-width: 1180px;
  --sans: "Inter var", Inter, ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  padding: clamp(14px, 3vw, 40px);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- 2. Ambient background ---------- */
.aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -8%, var(--glow-a), transparent 65%),
    radial-gradient(48rem 34rem at 95% 8%, var(--glow-b), transparent 62%),
    radial-gradient(52rem 40rem at 50% 110%, var(--glow-c), transparent 60%);
}

/* Fine grid texture, barely there */
.aura::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 20%, transparent 75%);
}

/* ---------- 3. Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(20px, 2.4vw, 30px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.section {
  margin-top: 26px;
}

/* Small uppercase mono label above each block */
.section h3,
.eyebrow,
.summary-heading {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section h3::after,
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hi), transparent);
}

/* ---------- 4. Profile ---------- */
.profile-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.avatar {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: var(--r-lg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 0 0 1px var(--border-hi), 0 10px 30px -8px rgba(124, 58, 237, 0.55);
}

/* Gradient ring */
.avatar::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--r-lg) + 3px);
  background: linear-gradient(140deg, var(--accent), var(--accent-2), transparent 70%);
  z-index: -1;
  opacity: 0.85;
}

.identity {
  min-width: 0;
}

h1 {
  margin: 0;
  font-size: clamp(21px, 2.3vw, 25px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  background: linear-gradient(180deg, #fff, #b9c6e4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.role {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--accent);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.location {
  font-size: 12.5px;
  color: var(--muted);
}

.location svg {
  vertical-align: -2px;
  color: var(--dim);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

p.about {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- 5. Buttons ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.actions .btn {
  flex: 1 1 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-dp), #5b21b6);
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 8px 22px -8px rgba(124, 58, 237, 0.85);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px -8px rgba(124, 58, 237, 1);
  border-color: rgba(167, 139, 250, 0.8);
}

.btn-ghost {
  color: var(--fg);
  background: var(--surface-hi);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hi);
}

/* ---------- Contacts ---------- */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.18s ease, border-color 0.18s ease,
    transform 0.18s ease;
}

.chip:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  transform: translateX(2px);
}

.chip .screen-only {
  display: inline-flex;
  flex-shrink: 0;
}

.chip svg {
  flex-shrink: 0;
  color: var(--muted);
  transition: color 0.18s ease;
}

.chip:hover svg {
  color: var(--accent);
}

.chip .ico {
  font-size: 13px;
  line-height: 1;
}

a.link {
  color: inherit;
  text-decoration: none;
  overflow-wrap: anywhere;
}

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

/* ---------- 6. Skills ---------- */
.skill-group + .skill-group {
  margin-top: 14px;
}

.skill-group-label {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
  color: var(--dim);
  margin-bottom: 7px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.skill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: color 0.18s ease, border-color 0.18s ease,
    background 0.18s ease, transform 0.18s ease;
}

.skill:hover {
  color: var(--fg);
  border-color: var(--accent-line);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

/* Visibility utilities */
.print-only { display: none; }
.summary-heading { display: none; }
.chip-phone { display: none; }

footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
  text-align: center;
}

/* ---------- 7. Experience timeline ---------- */
.experience-head {
  margin-bottom: 22px;
}

.experience-head h2 {
  margin: 6px 0 0;
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.education-head {
  margin-top: 40px;
}

.experience-head .count {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--muted);
}

/* The rail */
.experience-list {
  position: relative;
  padding-left: 26px;
}

.experience-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(
    180deg,
    var(--accent-line),
    var(--border) 30%,
    var(--border) 70%,
    transparent
  );
}

.job-card {
  position: relative;
  padding: 18px 20px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.22s ease, border-color 0.22s ease,
    transform 0.22s ease, box-shadow 0.22s ease;
}

.job-card + .job-card {
  margin-top: 16px;
}

.job-card:hover {
  background: var(--surface-hi);
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

/* Timeline node */
.job-card::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 26px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #121a2b;
  border: 2px solid var(--border-hi);
  transition: border-color 0.22s ease, box-shadow 0.22s ease;
}

.job-card:hover::before {
  border-color: var(--accent);
}

.job-card.is-current::before {
  background: var(--accent-dp);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.16);
}

.job-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.job-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--fg);
}

.job-date {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.job-card.is-current .job-date {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.job-company {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
}

.job-company-name {
  text-transform: uppercase;
}

/* Badge sits after the name in the DOM (for parsers) but shows first */
.job-type {
  order: -1;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
}

.job-desc {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}

.job-desc li {
  position: relative;
  padding-left: 18px;
}

.job-desc li + li {
  margin-top: 7px;
}

.job-desc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-line);
}

/* ---------- 8. Projects accordion ---------- */
.projects-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 16px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.projects-toggle:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.5);
}

.projects-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.projects-count {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  color: #ddd6fe;
  background: rgba(139, 92, 246, 0.28);
}

.toggle-arrow {
  flex-shrink: 0;
  transition: transform 0.28s ease;
}

.projects-toggle[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

/* grid-template-rows 0fr -> 1fr gives a true auto-height animation */
.projects-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s ease, margin-top 0.34s ease;
  margin-top: 0;
}

.projects-panel.open {
  grid-template-rows: 1fr;
  margin-top: 14px;
}

.projects-grid {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

/* ---------- Project card ---------- */
.project {
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.project:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hi);
  transform: translateY(-3px);
}

.project h4 {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.project .desc {
  flex-grow: 1;
  margin-bottom: 12px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

.project-img-container {
  position: relative;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
}

.project-img-container::before {
  content: "";
  position: absolute;
  inset: -12px;
  background-image: var(--img-bg);
  background-size: cover;
  background-position: center;
  filter: blur(20px) saturate(1.6);
  opacity: 0.4;
  z-index: 0;
}

.project-collage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3px;
  height: 165px;
  border-radius: 8px;
  overflow: hidden;
}

.project-collage.count-1 { grid-template-columns: 1fr; }
.project-collage.count-2 { grid-template-columns: 3fr 2fr; }
.project-collage.count-3 {
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 1fr 1fr;
}

.project-collage.count-2 .collage-item:first-child,
.project-collage.count-3 .collage-item:first-child {
  grid-row: span 2;
}

.collage-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.collage-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.collage-item:hover .project-img {
  transform: scale(1.07);
}

.project-collage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 8px;
  background: transparent;
  pointer-events: none;
  transition: background 0.22s ease;
}

.project-img-container:hover .project-collage::after {
  background: rgba(5, 8, 15, 0.45);
}

.collage-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: rgba(5, 8, 15, 0.6);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.tooltip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.94);
  z-index: 10;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(124, 58, 237, 0.9);
  border: 1px solid rgba(167, 139, 250, 0.5);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.project-img-container:hover .tooltip {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto;
}

.badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  color: #c4b5fd;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}

.project-link-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.project-link-btn:hover {
  color: #ede9fe;
  background: rgba(139, 92, 246, 0.24);
  border-color: rgba(139, 92, 246, 0.55);
}

/* ---------- 9. Lightbox ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 6, 12, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: scale(0.97);
  transition: transform 0.24s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1);
}

.modal-img-area {
  position: relative;
  flex-shrink: 0;
  width: min(82vw, 960px);
  height: 74vh;
  border-radius: var(--r-md);
}

.modal-img-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
}

.modal-img-wrap::before {
  content: "";
  position: absolute;
  inset: -14px;
  background-image: var(--modal-bg);
  background-size: cover;
  background-position: center;
  filter: blur(24px) saturate(1.5);
  opacity: 0.45;
  z-index: 0;
}

.modal-img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.75);
  transition: opacity 0.14s ease;
}

.modal-close,
.modal-nav {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(8, 11, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.modal-close {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.modal-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.modal-prev { left: 12px; }
.modal-next { right: 12px; }

.modal-close:hover {
  background: rgba(124, 58, 237, 0.7);
  border-color: var(--accent);
}

.modal-nav:hover {
  background: rgba(124, 58, 237, 0.7);
  border-color: var(--accent);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 20px;
}

.modal-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.modal-dot.active {
  background: var(--accent);
  transform: scale(1.45);
}

.modal-counter {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  min-width: 40px;
  text-align: center;
}

/* ---------- 10a. Motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

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

@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;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 10b. Responsive ---------- */
@media (max-width: 960px) {
  .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-head {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }
}

@media (max-width: 700px) {
  body { font-size: 14.5px; }

  .profile-head {
    gap: 14px;
  }

  .avatar {
    width: 64px;
    height: 64px;
  }

  .experience-list {
    padding-left: 20px;
  }

  .job-card::before {
    left: -20px;
  }

  .job-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

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

  .project-collage {
    height: 150px;
  }

  .modal-img-area {
    width: 92vw;
    height: 56vh;
  }

  .modal-nav {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
}

/* ---------- 10c. App shell: panes that scroll independently ---------- */
.pane {
  position: relative;
  min-width: 0;
}

.pane-scroll {
  min-height: 0;
  scroll-behavior: smooth;
}

/* Fades appear only on the edge that actually has content beyond it.
   Masking the scroller (not the panel) keeps the panel's frame crisp. */
.pane-scroll.fade-b {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 60px), transparent);
}

.pane-scroll.fade-t {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 44px);
  mask-image: linear-gradient(to bottom, transparent, #000 44px);
}

.pane-scroll.fade-t.fade-b {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 44px, #000 calc(100% - 60px), transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 44px, #000 calc(100% - 60px), transparent);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(16, 20, 36, 0.86);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: cue-bob 1.9s ease-in-out infinite;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.scroll-cue:hover {
  background: rgba(139, 92, 246, 0.28);
  border-color: var(--accent);
}

.scroll-cue[hidden] {
  display: none;
}

@keyframes cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 4px); }
}

/* No scrollbars: the edge fades and the cue button carry the affordance. */
.pane-scroll {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.pane-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* The panes are focusable so they stay keyboard-scrollable without a
   visible scrollbar; the ring only shows for keyboard users. */
.pane-scroll:focus {
  outline: none;
}

.pane-scroll:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Shell mode only where there is genuinely room for it. Below either
   threshold the page falls back to ordinary document scrolling. */
@media screen and (min-width: 961px) and (min-height: 620px) {
  html,
  body {
    height: 100%;
  }

  body {
    overflow: hidden;
  }

  .wrap {
    height: 100%;
  }

  .panel {
    display: flex;
    flex-direction: column;
    max-height: 100%;
    min-height: 0;
  }

  .pane-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ---------- 10d. Print / PDF resume ---------- */
@media print {
  @page {
    size: A4;
    margin: 18mm 15mm;
  }

  /* The dark color-scheme meta otherwise paints the page margins black */
  :root {
    color-scheme: light;
    background: #fff !important;
  }

  body {
    padding: 0 !important;
    font-size: 10.5pt;
    color: #1a1a1a !important;
    background: #fff !important;
  }

  .wrap {
    display: block !important;
    max-width: 100% !important;
  }

  .panel {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .about-section {
    position: static !important;
    margin-bottom: 14px !important;
    padding-bottom: 12px !important;
    border-bottom: 2px solid #e5e7eb !important;
  }

  /* Screen-only chrome */
  .aura,
  .avatar,
  .status,
  .actions,
  .projects-toggle,
  .projects-panel,
  .modal-overlay,
  .project-link-btn,
  footer {
    display: none !important;
  }

  .chip-phone { display: flex !important; }
  .screen-only { display: none !important; }
  .print-only {
    display: inline !important;
    font-weight: 600;
    color: #374151;
  }

  .reveal { opacity: 1 !important; transform: none !important; }

  .scroll-cue { display: none !important; }

  .panel,
  .pane,
  .pane-scroll {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }

  h1 {
    margin: 0 0 3px !important;
    font-size: 19pt !important;
    color: #111827 !important;
    background: none !important;
    -webkit-text-fill-color: #111827 !important;
  }

  .role {
    font-size: 10.5pt !important;
    color: #6d28d9 !important;
  }

  .meta-row { margin-top: 6px !important; }
  .location { font-size: 9.5pt !important; color: #4b5563 !important; }

  p.about {
    margin-top: 8px !important;
    font-size: 10pt !important;
    color: #374151 !important;
  }

  .section { margin-top: 12px !important; }

  .section h3,
  .eyebrow,
  .summary-heading {
    margin-bottom: 7px !important;
    padding-bottom: 3px !important;
    font-size: 8.5pt !important;
    color: #6b7280 !important;
    border-bottom: 1px solid #e5e7eb;
  }

  .section h3::after,
  .eyebrow::after { display: none !important; }

  .contact-list { flex-direction: row !important; flex-wrap: wrap !important; gap: 6px !important; }

  .chip {
    padding: 3px 8px !important;
    font-size: 9pt !important;
    color: #111827 !important;
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
  }

  /* One comma-separated line per group ("BACKEND: PHP, Laravel") so parsers
     read each skill as a separate keyword */
  .skill-group + .skill-group { margin-top: 3px !important; }
  .skill-group-label {
    display: inline !important;
    font-size: 8.5pt !important;
    color: #374151 !important;
  }
  .skill-group-label::after { content: ": "; }

  .skills { display: inline !important; }

  .skill {
    display: inline !important;
    padding: 0 !important;
    font-size: 9.5pt !important;
    color: #374151 !important;
    background: none !important;
    border: none !important;
  }
  .skill:not(:last-child)::after { content: ", "; }

  a.link { color: #111827 !important; }

  .experience-head { margin-bottom: 10px !important; }
  .experience-head h2 { font-size: 14pt !important; color: #111827 !important; }
  .experience-head .count,
  .experience-head .eyebrow { display: none !important; }

  .summary-heading { display: block !important; margin-top: 12px !important; }
  .education-head { margin-top: 14px !important; }

  .experience-list { padding-left: 0 !important; }
  .experience-list::before { display: none !important; }

  .job-card,
  .job-card + .job-card {
    margin: 0 !important;
    padding: 9px 0 !important;
    background: none !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .job-card::before { display: none !important; }

  .job-title { font-size: 11pt !important; color: #111827 !important; }

  /* Real capitalisation in the PDF text layer, not the screen's uppercase */
  .job-title,
  .job-company-name { text-transform: none !important; }

  .job-date {
    padding: 0 !important;
    font-size: 9pt !important;
    color: #6b7280 !important;
    background: none !important;
    border: none !important;
  }

  .job-company { margin-top: 3px !important; font-size: 10pt !important; color: #6d28d9 !important; }
  .job-type {
    order: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: 9.5pt !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: #6b7280 !important;
    border: none !important;
  }

  .job-type::before { content: "· "; }

  .job-desc { margin-top: 6px !important; font-size: 9.5pt !important; color: #374151 !important; }
  .job-desc li::before { background: #9ca3af !important; }
}
