/* ============================================================
   Hamzeh Emreish — portfolio
   Dark luxury · hacker · tech-geek · professional.
   Warm near-black canvas, soft bone-white ink, champagne accent.
   Inter for body, Instrument Serif for display italics,
   JetBrains Mono for terminal/technical details.
   ============================================================ */

/* ─────────────────────────── Tokens */
:root {
  /* Surface */
  --bg:           #0a0908;
  --bg-elev:      #14110f;
  --bg-elev-2:    #1c1815;
  --paper:        #f5f0e8;

  /* Ink */
  --ink:          #f5f0e8;
  --ink-2:        #d6cebf;
  --ink-3:        #b0a896;
  --muted:        #8b8273;
  --faint:        #5a5347;

  /* Lines */
  --hairline:     rgba(245, 240, 232, 0.08);
  --hairline-2:   rgba(245, 240, 232, 0.16);
  --hairline-3:   rgba(245, 240, 232, 0.28);

  /* The one accent — warm champagne, Equinox-coded.
     Functions as 'live', 'hover', 'active', 'attention'. */
  --accent:       #c8a96a;
  --accent-2:     #d8bb7a;
  --accent-soft:  rgba(200, 169, 106, 0.16);
  --accent-glow:  rgba(200, 169, 106, 0.32);

  /* Severity coding for findings — desaturated for the dark canvas */
  --sev-critical: #e26d6d;
  --sev-high:     #d9a35f;
  --sev-info:     #8b8273;
  --sev-valid:    #7eb87a;

  /* Type */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:   'Instrument Serif', ui-serif, Georgia, serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  /* Rhythm */
  --col:          780px;
  --col-wide:     1240px;
  --rhythm:       8rem;
  --rhythm-tight: 4.5rem;
  --side-pad:     clamp(1.5rem, 5vw, 4rem);
}

/* ─────────────────────────── Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'ss01', 'ss02', 'cv01', 'cv11', 'kern';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  position: relative;
}

/* Warm grain + radial spotlight: luxury patina */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%,
      rgba(200, 169, 106, 0.06),
      transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%,
      rgba(150, 110, 60, 0.04),
      transparent 60%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.96 0 0 0 0 0.94 0 0 0 0 0.91 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

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

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

/* ─────────────────────────── Layout */
.main {
  position: relative;
  z-index: 1;
  max-width: var(--col-wide);
  margin: 0 auto;
  padding: 6rem var(--side-pad) 4rem;
}

@media (max-width: 640px) {
  .main {
    padding: 3.5rem 1.25rem 2.5rem;
  }
}

/* All sections (including hero) use the wider container.
   Prose blocks inside specific sections (About) self-cap with max-width
   on their inner elements for readability. */
.section {
  max-width: var(--col-wide);
  margin: var(--rhythm) auto 0;
}

@media (max-width: 640px) {
  .section {
    margin-top: var(--rhythm-tight);
  }
}

/* ─────────────────────────── Section title */
.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.section-title::before {
  content: '§';
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
  transform: translateY(-1px);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--hairline-2),
    var(--hairline) 30%,
    transparent
  );
}

.section-intro {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 2.75rem;
  font-size: 1rem;
}

/* ─────────────────────────── Section header row
   Wraps the section title and any trailing meta chips
   (e.g. bug bounty platform logos beside "Findings") on one row. */
.section-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section-header .section-title {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

/* ─────────────────────────── Platform logos (HackerOne, Bugcrowd, Intigriti)
   Brand-colored square tiles, app-icon style, with white marks centered.
   Each tile uses the platform's own brand color so they read instantly. */
.platform-chips {
  list-style: none;
  display: flex;
  gap: 1.1rem;
  padding: 0;
  margin: 0;
  align-items: center;
  flex-wrap: wrap;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
  box-shadow:
    0 6px 18px -8px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.platform-chip img {
  display: block;
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.platform-chip:hover {
  transform: translateY(-3px);
  filter: brightness(1.08) saturate(1.1);
  box-shadow:
    0 12px 26px -8px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

/* Brand-specific backgrounds. HackerOne uses its violet gradient,
   Bugcrowd its signature orange, Intigriti its hot-pink/red brand. */
.platform-chip--hackerone {
  background: linear-gradient(135deg, #6B47F2 0%, #3022A8 100%);
}

.platform-chip--bugcrowd {
  background: linear-gradient(135deg, #F58220 0%, #D85A12 100%);
}

.platform-chip--intigriti {
  background: linear-gradient(135deg, #E5004C 0%, #A8003A 100%);
}

@media (max-width: 540px) {
  .platform-chip {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
  .platform-chip img {
    width: 32px;
    height: 32px;
  }
}

.section-after {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 2.5rem;
}

/* ─────────────────────────── Hero */
.hero {
  padding-top: 1.5rem;
}

/* Cascading first-paint reveal: each hero child fades + lifts in,
   in document order. Pure CSS, no JS, no waiting on IntersectionObserver. */
.hero .hero-eyebrow,
.hero .hero-title,
.hero .hero-pitch,
.hero .hero-terminal,
.hero .hero-portrait,
.hero .hero-stats,
.hero .hero-status {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero .hero-eyebrow  { animation-delay: 0.05s; }
.hero .hero-title    { animation-delay: 0.20s; }
.hero .hero-pitch    { animation-delay: 0.55s; }
.hero .hero-terminal { animation-delay: 0.75s; }
.hero .hero-portrait { animation-delay: 0.35s; }
.hero .hero-stats    { animation-delay: 0.95s; }
.hero .hero-status   { animation-delay: 1.15s; }

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero .hero-eyebrow,
  .hero .hero-title,
  .hero .hero-pitch,
  .hero .hero-terminal,
  .hero .hero-portrait,
  .hero .hero-stats,
  .hero .hero-status {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero-title em::after {
    animation: none;
    transform: scaleX(1);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 3rem;
  align-items: start;
  margin-bottom: 3rem;
}

@media (max-width: 760px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .hero-portrait {
    max-width: 200px;
  }
}

/* Eyebrow */
.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.eyebrow-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--hairline-2);
  border-radius: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elev);
  letter-spacing: 0;
}

.eyebrow-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--faint);
}

/* Title */
.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.6rem, 8.5vw, 6.25rem);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.042em;
  color: var(--ink);
  margin-bottom: 2.5rem;
  text-wrap: balance;
}

.hero-title em {
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent);
  padding: 0 0.04em;
}

/* Draw a champagne underline beneath each italicized word on load. */
.hero-title em::after {
  content: '';
  position: absolute;
  left: 0.04em;
  right: 0.04em;
  bottom: 0.12em;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent,
    var(--accent) 8%,
    var(--accent) 92%,
    transparent
  );
  transform-origin: left center;
  transform: scaleX(0);
  animation: draw-underline 1.4s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  animation-delay: 1.1s;
  opacity: 0.65;
}

.hero-title em:nth-of-type(2)::after {
  animation-delay: 1.6s;
}

@keyframes draw-underline {
  to {
    transform: scaleX(1);
  }
}

.hero-pitch {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 52ch;
  margin-bottom: 2.25rem;
}

@media (max-width: 640px) {
  .hero-pitch {
    font-size: 1.02rem;
  }
}

/* Hero verified credential — Anthropic CVP approval. Sits between
   pitch and terminal, refined credential card with champagne accent. */
.hero-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.85rem;
  padding: 0.85rem 1.15rem 0.85rem 1rem;
  border: 1px solid rgba(200, 169, 106, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(
      135deg,
      rgba(200, 169, 106, 0.08),
      rgba(200, 169, 106, 0.02)
    ),
    rgba(20, 17, 15, 0.6);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.hero-verified::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(200, 169, 106, 0.5) 0%,
    rgba(200, 169, 106, 0) 35%,
    rgba(200, 169, 106, 0) 65%,
    rgba(200, 169, 106, 0.3) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
}

.hero-verified:hover {
  border-color: rgba(200, 169, 106, 0.45);
}

.verified-icon {
  display: inline-flex;
  color: var(--accent);
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(200, 169, 106, 0.35));
}

.verified-body {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.verified-title {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: 1.2;
}

.verified-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .hero-verified {
    width: 100%;
  }
}

/* Terminal-style detail (hacker touch in hero) */
.hero-terminal {
  border-left: 1px solid var(--hairline-2);
  padding: 0.85rem 0 0.85rem 1.25rem;
  margin-bottom: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
}

.prompt-line {
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.prompt-arrow {
  color: var(--accent);
  margin-right: 0.4em;
  font-weight: 500;
}

.prompt-cmd {
  color: var(--ink-2);
  font-weight: 500;
}

.prompt-out {
  color: var(--muted);
  letter-spacing: -0.005em;
}

/* Portrait */
.hero-portrait {
  position: relative;
  margin: 0;
}

.portrait-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-2);
  box-shadow:
    0 1px 0 0 var(--hairline) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 0, 0, 0.4);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) contrast(1.05) brightness(0.92);
  transition: filter 0.6s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-portrait:hover .portrait-frame img {
  filter: grayscale(0.3) contrast(1.05) brightness(1);
  transform: scale(1.02);
}

.portrait-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.94 0 0 0 0 0.85 0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
  mix-blend-mode: overlay;
}

.portrait-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 100% 80% at 50% 40%,
    transparent 50%,
    rgba(0, 0, 0, 0.45)
  );
}

.portrait-empty {
  display: none;
}

.portrait-caption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.caption-line {
  width: 24px;
  height: 1px;
  background: var(--hairline-3);
}

/* Stats row */
.hero-stats {
  list-style: none;
  padding: 1.75rem 0;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}

.hero-stats::before,
.hero-stats::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--accent-soft) 50%,
    transparent
  );
  opacity: 0.6;
}

.hero-stats::before { top: -1px; }
.hero-stats::after  { bottom: -1px; }

.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-suffix {
  font-size: 0.55em;
  color: var(--accent);
  margin-left: 0.05em;
  font-style: italic;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  .stat-num {
    font-size: 2rem;
  }
}

/* Status */
.hero-status {
  display: flex;
  align-items: center;
  gap: 0.65em;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: -0.005em;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: status-pulse 2.4s ease-in-out infinite;
}

@keyframes status-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--accent-glow),
                0 0 8px var(--accent-soft);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(200, 169, 106, 0),
                0 0 8px var(--accent-soft);
  }
}

/* ─────────────────────────── Entries */
.entries {
  list-style: none;
  padding: 0;
}

.entry {
  border-top: 1px solid var(--hairline);
  padding: 2rem 0;
  position: relative;
}

.entry:last-child {
  border-bottom: 1px solid var(--hairline);
}

/* Work-section entries are 2-column grids: text + framed media.
   Each is a separate clickable target. With the wider container the
   media column gets significantly more weight (a real preview, not a thumb). */
.entries--work .entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 480px);
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .entries--work .entry {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .entries--work .entry {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* The text portion — links go to external URL, static entries are inert. */
.entry-text {
  position: relative;
}

.entry-text-link {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 0.4rem 0.65rem;
  margin: -0.4rem -0.65rem;
  border-radius: 6px;
  position: relative;
  transition: background-color 0.25s ease;
}

.entry-text-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.entry-text-link:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.entry-text-link:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.entry-text-link:hover .entry-title {
  color: var(--accent-2);
}

.entry-text-link:hover .entry-meta {
  color: var(--accent);
}

/* ───── Framed media (project preview videos & images)
       Now a <button> that opens a lightbox on click. */
.entry-media {
  position: relative;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: zoom-in;
  width: 100%;
  display: block;
  font-family: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

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

.media-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-2);
  box-shadow:
    0 1px 0 0 var(--hairline) inset,
    0 20px 40px -15px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(0, 0, 0, 0.3);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* Portrait variant for vertical photos. Keeps the same frame chrome
   but lets the image breathe instead of getting cropped to a band. */
.media-frame--portrait {
  aspect-ratio: 4 / 5;
}

/* Stack two or more entry-media frames vertically inside one media column.
   Used on experience entries that have a primary photo and a supporting one. */
.entry-media-stack {
  display: grid;
  gap: 1rem;
}

.entry-media:hover .media-frame {
  border-color: rgba(200, 169, 106, 0.4);
  box-shadow:
    0 1px 0 0 var(--hairline) inset,
    0 20px 40px -10px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 40px var(--accent-soft);
}

.media-frame video,
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.4) contrast(1.05) brightness(0.94);
  transition: filter 0.6s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.entry-media:hover .media-frame video,
.entry-media:hover .media-frame img {
  filter: grayscale(0.05) contrast(1.08) brightness(1);
  transform: scale(1.03);
}

.media-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='g2'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 0.94 0 0 0 0 0.85 0 0 0 0.15 0'/></filter><rect width='100%25' height='100%25' filter='url(%23g2)'/></svg>");
  mix-blend-mode: overlay;
}

.media-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse 100% 90% at 50% 50%,
    transparent 55%,
    rgba(0, 0, 0, 0.4)
  );
}

/* Expand badge — visual cue that the media opens a lightbox */
.media-expand-badge {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.55rem 0.32rem 0.5rem;
  background: rgba(10, 9, 8, 0.75);
  border: 1px solid var(--hairline-2);
  border-radius: 4px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
  opacity: 0.85;
  transition: opacity 0.25s ease,
              background-color 0.25s ease,
              color 0.25s ease,
              border-color 0.25s ease;
  pointer-events: none;
}

.entry-media:hover .media-expand-badge {
  opacity: 1;
  background: rgba(10, 9, 8, 0.92);
  color: var(--accent);
  border-color: rgba(200, 169, 106, 0.4);
}

.media-expand-badge svg {
  display: block;
}

.media-expand-badge .expand-text {
  letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════════════
   Lightbox — fullscreen media preview, opens on .entry-media click
   ═══════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-stage {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 1400px);
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--hairline-3);
  background: var(--bg-elev);
  box-shadow:
    0 40px 100px -20px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(200, 169, 106, 0.1);
  transform: scale(0.96);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.lightbox.is-open .lightbox-stage {
  transform: scale(1);
}

.lightbox-stage video,
.lightbox-stage img {
  max-width: min(92vw, 1400px);
  max-height: 84vh;
  display: block;
  object-fit: contain;
  background: #0a0908;
}

.lightbox-caption {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  max-width: 80vw;
  padding: 0.5rem 1rem;
  background: rgba(10, 9, 8, 0.6);
  border-radius: 4px;
  border: 1px solid var(--hairline-2);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease 0.2s;
}

.lightbox.is-open .lightbox-caption {
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline-2);
  color: var(--ink-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox-close:hover {
  background: rgba(200, 169, 106, 0.12);
  color: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
  }
  .lightbox-caption {
    bottom: 1rem;
    font-size: 10.5px;
  }
}

.entry-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
  transition: color 0.2s ease;
}

.entry-tag {
  position: relative;
  padding-left: 1.15rem;
}

.entry-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: currentColor;
}

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

.entry-title {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  color: var(--ink);
  text-wrap: balance;
}

.entry-link:hover .entry-title {
  color: var(--accent-2);
}

.entry-desc {
  color: var(--ink-3);
  max-width: 65ch;
  margin-bottom: 0.95rem;
  line-height: 1.6;
}

.entry-tech {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: -0.005em;
}

.entry-sub {
  color: var(--ink-3);
  max-width: 65ch;
  margin-bottom: 1rem;
  font-size: 0.97rem;
}

/* ─────────────────────────── Findings */
.finding-severity {
  position: relative;
  padding-left: 1.25rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.finding-severity::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-2);
  box-shadow: 0 0 8px currentColor;
}

/* Company-type chip: short 2-3 word descriptor of what kind of company
   this finding was reported on. Sits at the end of the severity row. */
.finding-type {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid rgba(200, 169, 106, 0.32);
  border-radius: 3px;
  background: rgba(200, 169, 106, 0.06);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.finding:nth-of-type(1) .finding-severity { color: var(--sev-critical); }
.finding:nth-of-type(1) .finding-severity::before { background: var(--sev-critical); }

.finding:nth-of-type(2) .finding-severity,
.finding:nth-of-type(3) .finding-severity,
.finding:nth-of-type(4) .finding-severity { color: var(--sev-high); }
.finding:nth-of-type(2) .finding-severity::before,
.finding:nth-of-type(3) .finding-severity::before,
.finding:nth-of-type(4) .finding-severity::before { background: var(--sev-high); }

.finding:nth-of-type(5) .finding-severity,
.finding:nth-of-type(6) .finding-severity { color: var(--sev-info); }
.finding:nth-of-type(5) .finding-severity::before,
.finding:nth-of-type(6) .finding-severity::before { background: var(--sev-info); }

.finding:nth-of-type(7) .finding-severity { color: var(--sev-valid); }
.finding:nth-of-type(7) .finding-severity::before { background: var(--sev-valid); }

.finding-title {
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 0.7rem;
  color: var(--ink);
  text-wrap: balance;
}

.finding-desc {
  color: var(--ink-3);
  max-width: 90ch;
  line-height: 1.6;
}

.finding-desc code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-2);
  padding: 0.1em 0.45em;
  border-radius: 3px;
  color: var(--accent-2);
  font-weight: 500;
}

/* ─────────────────────────── Experience */
.experience .entry-title {
  font-size: 1.3rem;
}

/* Two-column experience entry: text column + framed photo.
   Same skeleton as Work entries, but tighter media weight and
   top-aligned so the photo sits next to the role meta, not the bullets. */
.experience.entry--with-media {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .experience.entry--with-media {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .experience.entry--with-media {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.experience-points {
  list-style: none;
  padding: 0;
}

.experience-points li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.7rem;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 90ch;
}

.experience-points li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
}

/* ─────────────────────────── Education + Credentials */
.education-list,
.credentials-list {
  list-style: none;
  padding: 0;
}

.education-list li {
  margin-bottom: 1.5rem;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 90ch;
}

.education-list strong {
  font-weight: 600;
  color: var(--ink);
}

.education-list .muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.credentials-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1.75rem;
}

.credentials-list li {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-2);
  font-size: 1rem;
}

.credentials-list li:last-child {
  border-bottom: none;
}

.credentials-list .check {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
}

.credentials-list .cred-meta {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: -0.005em;
}

@media (max-width: 540px) {
  .credentials-list li {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .credentials-list .cred-meta {
    margin-left: 0;
    width: 100%;
    margin-top: 0.15rem;
  }
}

/* ─────────────────────────── About */
.about-body p {
  margin-bottom: 1.25rem;
  color: var(--ink-2);
  max-width: 75ch;
  line-height: 1.7;
  font-size: 1.05rem;
}

.about-stack {
  margin-top: 2.25rem !important;
  padding-top: 1.85rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.95rem !important;
  color: var(--ink-3) !important;
  line-height: 1.75 !important;
}

.about-stack strong {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-block;
  margin-right: 0.5em;
}

/* ─────────────────────────── Reach */
.reach-list {
  list-style: none;
  padding: 0;
}

.reach-list li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 1.05rem;
}

.reach-list li:first-child {
  border-top: 1px solid var(--hairline);
}

.reach-key {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  width: 5rem;
  flex-shrink: 0;
}

.reach-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* ─────────────────────────── Inline links */
a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--hairline-3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

a:hover {
  text-decoration-color: var(--accent);
  color: var(--accent);
}

/* ─────────────────────────── Footer */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--hairline);
  margin-top: var(--rhythm);
}

.footer-inner {
  max-width: var(--col);
  margin: 0 auto;
  padding: 2rem 1.75rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: -0.005em;
}

@media (max-width: 540px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 2rem 1.25rem 3rem;
  }
}

.footer-hint kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--hairline-2);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 0.1em 0.45em;
  color: var(--accent);
  font-weight: 500;
}

/* ============================================================
   Scroll-reveal (subtle) — only applied when JS is available.
   Without JS, everything stays at the default (fully visible).
   ============================================================ */
html.js-ready .section {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js-ready .section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js-ready .section {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .status-dot {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
  .hero-portrait:hover .portrait-frame img {
    transform: none;
  }
}

/* ============================================================
   Terminal Easter egg — slides up from bottom, fixed overlay
   ============================================================ */
.terminal-overlay {
  position: fixed;
  inset: auto 1.25rem 1.25rem 1.25rem;
  max-width: 720px;
  margin: 0 auto;
  height: 65vh;
  max-height: 540px;
  z-index: 100;
  transform: translateY(calc(100% + 2rem));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease;
}

.terminal-overlay.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.terminal-frame {
  background: #0a0908;
  color: #ededed;
  border-radius: 10px;
  border: 1px solid var(--hairline-3);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -10px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 40px var(--accent-soft);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 13px;
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.terminal-dots .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #333;
}

.terminal-dots .dot-red    { background: #ff5f57; }
.terminal-dots .dot-yellow { background: #febc2e; }
.terminal-dots .dot-green  { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #888;
  letter-spacing: -0.005em;
}

.terminal-close {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #aaa;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.terminal-close:hover {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.terminal-body {
  flex: 1;
  padding: 0.85rem 1rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.terminal-line {
  padding: 0.15rem 0;
  line-height: 1.5;
}

.terminal-welcome      { color: #ededed; }
.terminal-output-text  { color: #ededed; }
.terminal-prompt-text  { color: var(--accent); }
.terminal-cmd-text     { color: #ededed; }
.terminal-success      { color: var(--accent); font-weight: 500; }
.terminal-error        { color: #f87171; }
.terminal-link         { color: #93c5fd; text-decoration: underline; }

.cmd-highlight {
  color: var(--accent);
  font-weight: 500;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.terminal-prompt {
  color: var(--accent);
  font-weight: 500;
  white-space: pre;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ededed;
  font-family: var(--font-mono);
  font-size: 13px;
  caret-color: var(--accent);
}

.terminal-cursor {
  display: none;
}

@media (max-width: 640px) {
  .terminal-overlay {
    inset: auto 0.75rem 0.75rem 0.75rem;
    height: 70vh;
  }
}
