/* ============================================================
   components.css — reusable UI components
   Sections are alphabetical. Reset/global/layouts win source-order
   for cascade purposes; overrides.css handles state modifiers.
   ============================================================ */

/* ============================================================
   ABOUT
   ============================================================ */
.about-intro {
  margin-bottom: var(--space-14);

  text-align: center;
}
.about-intro .eyebrow {
  display: inline-block;
  margin-bottom: var(--space-4);
}
.about-intro h2 {
  max-width: 22ch;
  margin: 0 auto;
}

/* Wide photo — landscape, holding printed infographic */
.about-photo {
  max-width: 1000px;
  margin: var(--space-14) auto 0;
}
.about-photo-frame {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 21 / 9;

  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.about-photo-frame::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 1px;

  content: '';

  background: linear-gradient(90deg, transparent, var(--accent-glow-strong), transparent);
}
.about-photo-frame::after {
  position: absolute;
  inset: 0;

  content: '';

  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.5;
  pointer-events: none;
}
.about-photo-label {
  position: relative;
  z-index: var(--z-content);

  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-bright);

  opacity: 0.7;
}
.about-photo-note {
  position: relative;
  z-index: var(--z-content);

  display: block;
  margin-top: var(--space-2);

  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);

  opacity: 0.7;
}

.about-bio {
  max-width: 56ch;
  margin: 0 auto;

  text-align: center;
}
.about-bio p {
  margin-bottom: 0;

  font-size: var(--font-size-lg);
  line-height: 1.65;
  color: var(--text-muted);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-section {
  text-align: center;
}

.contact-intro {
  max-width: 680px;
  margin: 0 auto var(--space-12);
}
.contact-intro h2 {
  margin-bottom: var(--space-5);

  font-size: var(--font-size-h2-large);
  letter-spacing: -0.025em;
}
.contact-lead {
  font-size: var(--font-size-lg);
  line-height: 1.6;
  color: var(--text-muted);
}
.contact-email {
  color: var(--accent-bright);
  font-weight: 500;
  text-decoration: none;

  border-bottom: 1px solid var(--accent-dim);

  transition: border-color var(--duration-base) ease, color var(--duration-base) ease;
}
.contact-email:hover {
  color: var(--accent-soft-hover);

  border-bottom-color: var(--accent);
}
.contact-email:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   CREDENTIALS — education timeline + cert list
   ============================================================ */
.creds {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.creds-header {
  margin-bottom: var(--space-14);

  text-align: center;
}
.creds-header-rule {
  width: 60px;
  height: 2px;
  margin: 0 auto var(--space-5);

  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: var(--radius-xs);
  box-shadow: 0 0 12px var(--accent-glow);
}
.creds-header h2 {
  font-size: var(--font-size-h2-fluid);
  letter-spacing: -0.025em;
}

/* Education timeline */
.edu-timeline {
  position: relative;

  padding-left: 0;

  list-style: none;
}
.edu-timeline::before {
  position: absolute;
  top: var(--space-px-4);
  bottom: var(--space-px-4);
  left: var(--space-px-3);

  width: 1px;

  content: '';

  background: linear-gradient(to bottom,
    transparent 0%,
    var(--border) 8%,
    var(--border) 92%,
    transparent 100%);
}

.edu-entry {
  position: relative;

  padding-bottom: 2.25rem;
  padding-left: 2.25rem;
}
.edu-entry:last-child {
  padding-bottom: 0;
}

.edu-marker {
  position: absolute;
  top: var(--space-px-2);
  left: 0;
  z-index: var(--z-marker);

  width: 15px;
  height: 15px;

  background: var(--bg-tertiary);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px var(--bg-tertiary), 0 0 12px var(--accent-glow);
}

.edu-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.edu-degree {
  font-size: var(--font-size-4xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent-bright);
}
.edu-tier {
  font-size: var(--font-size-2xl);
  font-weight: 500;
  color: var(--text-primary);
}
.edu-meta {
  margin-bottom: 0.3rem;

  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  font-style: italic;
  color: var(--text-muted);
}
.edu-desc {
  margin: 0;

  font-size: var(--font-size-body);
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Certifications stack */
.cert-item {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: 0;

  background: transparent;
  border: none;

  transition: transform var(--duration-base) ease;
}
.cert-item:hover {
  transform: translateX(2px);
}

.cert-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}
.cert-badge img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}
.cert-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;

  font-size: var(--font-size-2xl);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.cert-issuer {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;

  font-family: var(--font-mono);
  font-size: var(--font-size-cert-issuer);
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.cert-status {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem var(--space-2);

  font-family: var(--font-mono);
  font-size: var(--font-size-2xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);

  background: var(--accent-dim);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
}
.cert-status-planned {
  color: var(--text-faint);

  background: transparent;
  border-color: var(--border);
}

/* ============================================================
   EXPERIENCE — timeline + skills grid
   ============================================================ */
.experience {
  border-top: 1px solid var(--border);
}

.experience-header {
  margin-bottom: var(--space-10);
}
.experience-header-rule {
  width: 60px;
  height: 2px;
  margin-bottom: var(--space-5);

  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: var(--radius-xs);
  box-shadow: 0 0 12px var(--accent-glow);
}
.experience-header h2 {
  font-size: var(--font-size-h2-fluid);
  letter-spacing: -0.025em;
}

/* Experience timeline */
.exp-timeline {
  position: relative;

  padding-left: 0;

  list-style: none;
}
.exp-timeline::before {
  position: absolute;
  top: var(--space-px-4);
  bottom: var(--space-px-4);
  left: var(--space-px-3);

  width: 1px;

  content: '';

  background: linear-gradient(to bottom,
    transparent 0%,
    var(--border) 8%,
    var(--border) 92%,
    transparent 100%);
}

.exp-entry {
  position: relative;

  padding-bottom: 2.25rem;
  padding-left: 2.25rem;
}
.exp-entry:last-child {
  padding-bottom: 0;
}

.exp-marker {
  position: absolute;
  top: var(--space-px-2);
  left: 0;
  z-index: var(--z-marker);

  width: 15px;
  height: 15px;

  background: var(--bg-primary);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 4px var(--bg-primary), 0 0 12px var(--accent-glow);
}

.exp-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.exp-role {
  font-size: var(--font-size-4xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--accent-bright);
}
.exp-org {
  font-size: var(--font-size-2xl);
  font-weight: 500;
  color: var(--text-primary);
}
.exp-meta {
  margin-bottom: 0.3rem;

  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  font-style: italic;
  color: var(--text-muted);
}
.exp-desc {
  margin: 0;

  font-size: var(--font-size-body);
  line-height: 1.55;
  color: var(--text-secondary);
}

/* Skill tile */
.skill-tile {
  position: relative;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  min-height: 160px;
  padding: var(--space-6) var(--space-4);

  text-align: center;

  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);

  transition: border-color var(--duration-base) ease, transform var(--duration-base) ease;
}
.skill-tile:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.skill-tile::before {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;

  height: 1px;

  content: '';

  background: linear-gradient(90deg, transparent, var(--accent-glow-strong), transparent);
  opacity: 0.4;

  transition: opacity var(--duration-base) ease;
}
.skill-tile:hover::before {
  opacity: 1;
}

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;

  color: var(--text-faint);
}
.skill-icon svg {
  width: 100%;
  height: 100%;
}
.skill-icon-accent {
  color: var(--accent-bright);

  stroke: var(--accent-bright);
}

.skill-label {
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--text-primary);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  position: relative;
  z-index: var(--z-content);

  padding: var(--space-8) var(--gutter);

  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);

  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
}
.footer-inner {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-faint);
}
.footer-inner a {
  color: var(--text-muted);
}
.footer-inner a:hover {
  color: var(--accent-bright);
}
.footer-inner a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   GALLERY — stage banners + project cards
   ============================================================ */
.stage-banner {
  position: relative;

  margin-bottom: var(--space-12);

  text-align: center;
}
.stage-banner-rule {
  position: relative;

  height: 1px;
  max-width: 200px;
  margin: 0 auto var(--space-6);

  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  box-shadow: 0 0 8px var(--accent-glow);
}
.stage-banner-rule::after {
  position: absolute;
  top: -3px;
  left: 50%;

  width: 7px;
  height: 7px;

  content: '';

  background: var(--accent-bright);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--accent-glow-strong);
  transform: translateX(-50%);
}
.stage-banner h2 {
  margin-bottom: 0.6rem;
}
.stage-banner-desc {
  max-width: 60ch;
  margin: 0 auto;

  font-size: var(--font-size-body);
  color: var(--text-muted);
}

/* Inline tab headings — Engineer · Analyze · Act */
.tab-heading {
  padding: 0;

  font-family: inherit;
  font-size: var(--font-size-tab);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--text-faint);

  background: transparent;
  border: none;
  opacity: 0.4;
  cursor: pointer;

  transition: opacity var(--duration-base) ease, color var(--duration-base) ease, transform var(--duration-base) ease;
}
.tab-heading:hover {
  color: var(--text-secondary);

  opacity: 0.75;
}
.tab-heading.active {
  color: var(--text-primary);

  opacity: 1;
  cursor: default;
}
.tab-heading.active:hover {
  color: var(--text-primary);

  opacity: 1;
}
.tab-heading:focus-visible {
  border-radius: var(--radius-sm);
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.tab-heading:disabled,
.tab-heading[disabled] {
  opacity: 0.25;
  cursor: not-allowed;
}
.tab-sep {
  font-size: var(--font-size-tab);
  line-height: 1.1;
  color: var(--text-faint);

  opacity: 0.3;
  user-select: none;
}

/* Tab desc + grid swap with crossfade */
.tab-desc,
.tab-grid {
  transition: opacity var(--duration-base) ease;
}

/* Project cards — strong hover glow */
.project-card {
  position: relative;

  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 340px;

  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);

  transition: border-color var(--duration-slow) ease, transform var(--duration-slow) ease, box-shadow var(--duration-slow) ease;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow:
    0 20px 40px -20px var(--shadow-rgb-deeper),
    0 0 0 1px var(--accent-glow),
    0 0 30px -8px var(--accent-glow);
}
.project-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.project-thumb {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 16 / 10;

  background:
    linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
  border-bottom: 1px solid var(--border);
}
.project-thumb::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 1px;

  content: '';

  background: linear-gradient(90deg, transparent, var(--accent-glow-strong), transparent);
}
/* Faint scanline pattern on thumbs so they don't read as totally empty */
.project-thumb::after {
  position: absolute;
  inset: 0;

  content: '';

  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.5;
}
.project-thumb img {
  position: relative;
  z-index: var(--z-content);

  display: block;
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.6rem;
  padding: var(--space-5) var(--space-6) var(--space-6);
}
.project-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag {
  padding: var(--space-px-1) var(--space-px-5);

  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);

  background: var(--accent-dim);
  border: 1px solid var(--accent-border-translucent);
  border-radius: var(--radius-sm);
}
.tag.tag-status {
  color: var(--text-faint);

  background: transparent;
  border-color: var(--border);
}

.project-title {
  font-size: var(--font-size-3xl);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}
.project-title strong {
  font-weight: inherit;
}
.project-desc {
  flex: 1;

  font-size: var(--font-size-card-desc);
  line-height: 1.6;
  color: var(--text-muted);
}
.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-2);

  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-bright);
}
.project-cta::after {
  content: '→';

  transition: transform var(--duration-base) ease;
}
.project-card:hover .project-cta::after {
  transform: translateX(4px);
}

/* ============================================================
   GLOW RULE — section divider
   ============================================================ */
.glow-rule {
  position: relative;

  height: 1px;
  max-width: 600px;
  margin: 0 auto;

  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  border: none;
  box-shadow: 0 0 12px var(--accent-glow);
}
.glow-rule::after {
  position: absolute;
  top: -3px;
  left: 50%;

  width: 7px;
  height: 7px;

  content: '';

  background: var(--accent-bright);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px var(--accent-glow-strong);
  transform: translateX(-50%);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);

  background: var(--scrim-header);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;

  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
}
.brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}
.brand .mark {
  display: inline-block;
  width: 8px;
  height: 8px;

  background: var(--accent);
  border-radius: var(--radius-xs);
  box-shadow: 0 0 10px var(--accent-glow-strong);
}

.nav-links {
  display: flex;
  gap: 1.75rem;

  font-size: var(--font-size-base);
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);

  transition: color var(--duration-fast) ease;
}
.nav-links a:hover {
  color: var(--accent-bright);
}
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   HERO — centered console
   ============================================================ */
.hero {
  position: relative;

  overflow: hidden;
  padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 8vw, 6rem);

  text-align: center;

  isolation: isolate;
}

/* Inline hex SVG covers the hero. Hexes are SOLID dark cells with
   thin transparent gridlines between them. Light underneath shines
   through the gridlines. */
.hero-hex {
  position: absolute;
  inset: 0;
  z-index: var(--z-content);

  width: 100%;
  height: 100%;

  pointer-events: none;
}

/* Cursor-following light — sits behind the hex grid */
.hero-light {
  position: absolute;
  top: 30%;
  left: 50%;

  width: 500px;
  height: 500px;

  background: radial-gradient(circle at center,
    var(--hero-light-core) 0%,
    var(--accent-bright) 25%,
    var(--accent) 50%,
    transparent 75%);
  border-radius: var(--radius-full);
  opacity: 1;
  transform: translate(-50%, -50%);
  filter: blur(2rem);
  pointer-events: none;
}

/* Container sits above both layers */
.hero .container-narrow {
  position: relative;
  z-index: var(--z-elevated);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-10);

  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-secondary);

  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.hero-status .dot {
  width: 7px;
  height: 7px;

  background: var(--accent-bright);
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px var(--accent-glow-strong);

  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px var(--accent-glow-strong); }
  50% { opacity: 0.5; box-shadow: 0 0 16px var(--accent-glow-strong); }
}

.hero h1 {
  max-width: 22ch;
  margin: 0 auto var(--space-6);
}

.hero .lead {
  max-width: 56ch;
  margin: 0 auto var(--space-12);
}

/* Stat pills — mobile: stacked; desktop: row */
.hero-stats {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  overflow: hidden;
  gap: 0;

  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
}
.hero-stat {
  width: 100%;
  min-width: 0;
  padding: var(--space-4) var(--space-6);

  text-align: center;

  border-bottom: 1px solid var(--border);
}
.hero-stat:last-child {
  border-bottom: none;
}
@media (min-width: 701px) {
  .hero-stats {
    flex-direction: row;
  }
  .hero-stat {
    width: auto;

    border-right: none;
    border-bottom: none;
  }
}

.hero-stat-label {
  display: block;
  margin-bottom: 0.3rem;

  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}
.hero-stat-value {
  font-family: var(--font-mono);
  font-size: var(--font-size-stat-value);
  font-weight: 500;
  color: var(--text-primary);
}

/* Glow rule below hero stats */
.hero-rule-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-16);
}

/* ============================================================
   PRESENCE GRID — brand-colored cards
   ============================================================ */
.presence-card {
  position: relative;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  overflow: hidden;
  gap: var(--space-4);
  min-height: 160px;
  padding: 1.75rem 1.75rem var(--space-8);

  text-align: left;

  background: var(--brand-bg, var(--bg-secondary));
  border: 1px solid transparent;
  border-radius: var(--radius-xl);

  transition: transform var(--duration-slow) ease, box-shadow var(--duration-slow) ease;

  isolation: isolate;
}
.presence-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.presence-card:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.presence-card-content {
  position: relative;
  z-index: var(--z-elevated);

  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.4rem;
  min-width: 0;
}
.presence-name {
  font-size: var(--font-size-presence-name);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--on-brand-fg);

  text-shadow: 0 1px 3px var(--shadow-rgb-text-strong);
}
.presence-tagline {
  max-width: 38ch;
  margin: 0.3rem 0 0;

  font-size: var(--font-size-presence);
  font-weight: 500;
  line-height: 1.5;
  color: var(--on-brand-fg-soft);

  text-shadow: 0 1px 2px var(--shadow-rgb-text-soft);
}

/* Bleeding logo — sits behind text, escapes the bottom-right corner */
.presence-icon,
.presence-mark {
  position: absolute;
  right: calc(-1 * var(--space-px-6));
  bottom: calc(-1 * var(--space-px-7));
  z-index: var(--z-content);

  width: 160px;
  height: 160px;

  color: var(--on-brand-icon);

  opacity: 0.95;
  pointer-events: none;

  transition: transform 0.4s ease, opacity 0.3s ease;
}
.presence-card:hover .presence-icon,
.presence-card:hover .presence-mark {
  transform: scale(1.04) rotate(-2deg);
}

.presence-icon svg, .presence-icon { display: block; }

/* Monogram marks (Avid, Data Gamer) — typographic */
.presence-mark {
  display: flex;
  align-items: center;
  justify-content: center;

  font-family: var(--font-mono);
  font-size: var(--font-size-monogram);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.06em;
}
.presence-mark span {
  margin-left: -0.12em;

  color: var(--on-brand-fg-dim);
}

.presence-card.presence-personal {
  min-height: 280px;
}

/* Brand backgrounds — full saturation gradients */
.presence-linkedin   { --brand-bg: var(--brand-linkedin); }
.presence-github     { --brand-bg: var(--brand-github); }
.presence-kaggle     { --brand-bg: var(--brand-kaggle); }
.presence-avid       { --brand-bg: var(--brand-avid); }
.presence-datagamer  { --brand-bg: var(--brand-datagamer); }

/* ============================================================
   PROJECT MODAL — lean "trailer" style
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal-overlay);

  background: var(--scrim-modal);
  opacity: 0;
  visibility: hidden;
  backdrop-filter: blur(8px);

  transition: opacity var(--duration-slow) ease, visibility var(--duration-slow) ease;

  -webkit-backdrop-filter: blur(8px);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-modal);

  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 100%;
  height: 100%;

  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 0;
  opacity: 0;
  visibility: hidden;
  transform: none;
  pointer-events: none;
  box-shadow: var(--shadow-modal);

  transition: transform 0.3s var(--ease-out-soft), opacity var(--duration-slow) ease;
}
.modal.open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
@media (min-width: 641px) {
  .modal {
    top: 50%;
    left: 50%;

    width: calc(100% - 3rem);
    height: auto;
    max-width: 880px;
    max-height: calc(100vh - 4rem);

    border-radius: var(--radius-3xl);
    transform: translate(-50%, -48%) scale(0.98);
  }
  .modal.open {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Close button — floats top right */
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-close);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;

  color: var(--text-muted);

  background: var(--scrim-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  backdrop-filter: blur(8px);

  transition: color var(--duration-fast) ease, border-color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.modal-close:hover {
  color: var(--accent-bright);

  background: var(--accent-dim);
  border-color: var(--accent);
}
.modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.modal-close:active {
  transform: scale(0.96);
}
.modal-close:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.modal-close svg {
  width: 16px;
  height: 16px;
}

/* Modal scrolls if content exceeds height */
.modal-body {
  overflow-y: auto;

  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.modal-body::-webkit-scrollbar {
  width: 8px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-sm);
}

/* ZONE 3 — Visual (bottom anchor) */
.modal-visual {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: 16 / 9;

  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
  border-top: 1px solid var(--border);
}
.modal-visual::before {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;

  height: 1px;

  content: '';

  background: linear-gradient(90deg, transparent, var(--accent-glow-strong), transparent);
}
.modal-visual::after {
  position: absolute;
  inset: 0;

  content: '';

  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.6;
  pointer-events: none;
}
.modal-visual-placeholder {
  position: relative;
  z-index: var(--z-content);

  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-bright);

  opacity: 0.7;
}
.modal-visual-placeholder small {
  display: block;
  margin-top: var(--space-2);

  font-size: var(--font-size-xs);
  letter-spacing: 0.14em;
  color: var(--text-faint);

  opacity: 0.7;
}
.modal-visual img {
  position: relative;
  z-index: var(--z-content);

  display: block;
  width: 100%;
  height: 100%;

  object-fit: contain;
}

/* ZONE 1 — Summary (top anchor) + metadata */
.modal-summary {
  padding: var(--space-6) 3.5rem var(--space-5) var(--space-5);
}
@media (min-width: 601px) {
  .modal-summary {
    padding: 1.75rem 4rem var(--space-6) var(--space-8);
  }
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.modal-headline {
  margin-bottom: 0.85rem;

  font-family: var(--serif, inherit);
  font-size: var(--font-size-modal-headline);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-blurb {
  margin-bottom: 0;

  font-size: var(--font-size-lg);
  line-height: 1.65;
  color: var(--text-muted);
}

/* ZONE 2 — Supporting links row */
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5);

  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
}
@media (min-width: 601px) {
  .modal-actions {
    padding: var(--space-5) var(--space-8);
  }
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.7rem 1.1rem;

  font-family: var(--font-mono);
  font-size: var(--font-size-cert-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);

  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;

  transition: all var(--duration-fast) ease;
}
.modal-btn:hover {
  color: var(--accent-bright);

  background: var(--accent-dim);
  border-color: var(--accent);
}
.modal-btn:active {
  transform: translateY(1px);
}
.modal-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.modal-btn:disabled,
.modal-btn[data-disabled="true"] {
  opacity: 0.4;
  pointer-events: none;
}
.modal-btn::after {
  content: '→';

  transition: transform var(--duration-fast) ease;
}
.modal-btn:hover::after {
  transform: translateX(3px);
}
.modal-btn.external::after {
  content: '↗';
}

/* ZONE 4 — Full-span primary CTA at bottom */
.modal-cta {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 1.1rem var(--space-5);

  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--on-brand-fg);

  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deeper) 100%);
  border-top: 1px solid var(--accent);
  box-shadow:

    inset 0 1px 0 var(--accent-glow-strong),
    0 -8px 24px -8px var(--accent-glow);

  transition: background var(--duration-base) ease, padding var(--duration-base) ease;
}
.modal-cta::before {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;

  height: 1px;

  content: '';

  background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
  box-shadow: 0 0 12px var(--accent-glow-strong);
}
.modal-cta:hover {
  padding-left: var(--space-6);

  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 100%);
}
.modal-cta:active {
  transform: translateY(1px);
}
.modal-cta:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: -3px;
}
@media (min-width: 601px) {
  .modal-cta {
    padding: var(--space-5) var(--space-8);
    padding-left: var(--space-10);

    font-size: var(--font-size-base);
  }
}
.modal-cta-arrow {
  flex-shrink: 0;

  font-size: var(--font-size-2xl);

  transition: transform var(--duration-base) ease;
}
.modal-cta:hover .modal-cta-arrow {
  transform: translateX(6px);
}

/* ============================================================
   TYPOGRAPHIC HELPERS
   ============================================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-bright) 50%, var(--accent-deep) 100%);
  background-clip: text;

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent-bright);
}

.lead {
  font-size: var(--font-size-lead);
  line-height: 1.65;
  color: var(--text-muted);
}
