/* Compact presentation, with the original information and interactions intact. */
body::before { opacity: 0.018; }
/* Fixed-size glows fade across the section boundary rather than ending at the hero. */
.portfolio-home {
  background-image:
    linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px),
    radial-gradient(ellipse 750px 600px at 32% 120px, var(--accent-sand-light), transparent 100%),
    radial-gradient(ellipse 800px 650px at 80% 280px, var(--accent-copper-light), transparent 100%);
  background-size: 40px 40px, 40px 40px, 100% 100%, 100% 100%;
}
.hero {
  min-height: auto;
  padding: 112px 0 2rem;
  background: transparent;
}
.hero > .container { width: 100%; }
.hero-grid { grid-template-columns: 1fr; gap: 0; text-align: center; }
.hero-editorial h1 { font-size: clamp(2.5rem, 4.2vw, 3.5rem); }
.hero-subtitle { font-size: .95rem; margin: 0 auto 1.25rem; min-height: 3.2em; }
.hero-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; max-width: 760px; margin-inline: auto; align-items: stretch; }
.btn { padding: .75rem 1.25rem; font-size: .78rem; }
.nav-subtag { font-size: .62rem; letter-spacing: .04em; }

/* Secondary project information stays available in a compact disclosure. */
.project-disclosure summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding-right: 1.5rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-muted);
}
.project-disclosure summary::-webkit-details-marker { display: none; }
.project-disclosure summary::after { content: "+"; position: absolute; right: 0; top: 0; color: var(--accent-copper); }
details[open] > summary::after { content: "−"; }
summary:focus-visible, .project-link:focus-visible { outline: 2px solid var(--accent-copper); outline-offset: 5px; border-radius: 3px; }

/* Keep the counters, but give them the scale of supporting information. */
.hero-stats-strip { max-width: 720px; margin: 1.75rem auto 0; padding: 1rem 0 0; background: transparent; border: 0; border-top: 1px solid var(--border-tactile); border-radius: 0; gap: 1rem; }
.stat-block { text-align: center; }
.stat-number { font-size: 1.7rem; }
.stat-label { font-size: .62rem; margin-top: .25rem; letter-spacing: .03em; }

/* Quiet ornamentation; retain dates, project categories and useful captions. */
.cad-crosshair, .card-logo-badge, .telemetry-dot,
.projects-header > .coord-stamp, .project-meta > .coord-stamp { display: none; }
.project-tag-pill { padding: 0; background: transparent; font-size: .65rem; letter-spacing: .035em; }
.telemetry-badge { border: 0; padding: 0; background: transparent; font-size: .65rem; color: var(--text-dim); }
.gallery-card-meta .coord-stamp { display: none; }
.hero-media-caption { padding: 1rem 1.25rem; }
.hero-caption-specs { gap: .4rem; }
.tag, .tag-chip { font-size: .7rem; background: transparent; padding: .15rem .45rem; }

/* Keep one project summary visible, with the rest available inline. */
.section { padding: 2.75rem 0; }
.projects-header { margin-bottom: 1.5rem; }
.projects-grid { gap: 1.75rem; }
.project-card { cursor: pointer; }
.project-card.featured-card { min-height: 300px; }
.project-info { padding: 1.5rem; }
.project-info h3 { font-size: 1.55rem; }
.project-info h3 a { color: inherit; }
.project-info h3 a:hover { color: var(--accent-copper); }
.project-image-wrapper { height: 220px; }
.project-bullet-list li { font-size: .9rem; }
.project-disclosure { margin: .75rem 0 1rem; padding-top: .6rem; border-top: 1px solid var(--border-subtle); }
.project-disclosure .tech-tags-list { margin-top: .75rem; }
.project-footer { justify-content: flex-end; padding-top: .65rem; border-top: 0; }
.project-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--accent-copper); font-size: .76rem; }
.project-card:hover { transform: translateY(-3px); }
.project-card:hover .project-image { transform: scale(1.025); }
.experience-card { padding: 1.5rem; }
.exp-header { margin-bottom: .9rem; }
.exp-header { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 1rem; }
.exp-header > .exp-role-meta, .exp-header > h3, .exp-header > .exp-subtitle { grid-column: 2; min-width: 0; }
.organization-logo {
  grid-column: 1; grid-row: 1 / span 3; align-self: center;
  display: flex; align-items: center; justify-content: center;
  height: 36px; padding: 0; background: transparent;
  border: 0; border-radius: 0;
}
.organization-logo img { display: block; max-width: 100%; height: 44px; object-fit: contain; }
.organization-logo--mw::before, .organization-logo--payer::before {
  content: ""; display: block; width: 36px; max-width: 100%; height: 28px;
  background: var(--text-muted);
  mask: var(--organization-mark) center / contain no-repeat;
  -webkit-mask: var(--organization-mark) center / contain no-repeat;
}
.organization-logo--mw { --organization-mark: url("assets/logos/mw-symbol.svg"); }
.organization-logo--payer { --organization-mark: url("assets/logos/payer-symbol.png"); }
.organization-logo--mw img, .organization-logo--payer img { position: absolute; opacity: 0; }
.organization-logo--umd img { filter: grayscale(1); mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
  .organization-logo--umd img { filter: grayscale(1) invert(1); mix-blend-mode: screen; }
}
.organization-logo--umd img { width: 28px; height: 28px; }
.exp-header > .exp-subtitle { margin-bottom: 0; }
.exp-subtitle { font-size: .82rem; }
.exp-tags-bar { margin: .8rem 0 .3rem; }
.card-toggle-btn { background: transparent; border-color: var(--border-subtle); padding: .45rem .9rem; font-size: .76rem; box-shadow: none; }
.card-toggle-btn:hover { transform: none; box-shadow: none; }
.contact-circular-row { gap: 1rem; margin: 1.5rem 0; }
.contact-icon-btn { width: 48px; height: 48px; font-size: 1.1rem; }

/* Entrances are handled by JS, with no hidden or blurred reading state. */
.reveal-blur, .reveal-scale, .fade-in-up,
.reveal-blur.visible, .reveal-scale.visible, .fade-in-up.visible {
  opacity: 1; filter: none; transform: none; will-change: auto; transition-delay: 0s;
}
@media (max-width: 992px) {

  .featured-card .project-image-wrapper { height: 220px; }
}
@media (max-width: 768px) {
  .hero { padding: 96px 0 1.5rem; }
  .hero-editorial h1 { font-size: 2.5rem; }
  .hero-subtitle { min-height: 3.2em; }
  .hero-actions { gap: .4rem; }
  .hero-actions .btn { width: auto; padding: .75rem .35rem; font-size: .65rem; letter-spacing: 0; min-height: 52px; }
  .hero-actions .btn i { display: none; }
  .hero-stats-strip { gap: .5rem; margin-top: 1.25rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: .56rem; }
  .project-info, .experience-card { padding: 1.25rem; }
  .exp-header { grid-template-columns: 36px minmax(0, 1fr); column-gap: .7rem; }
  .project-info h3 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .project-card:hover, .project-card:hover .project-image,
  .hero-media-card:hover .hero-media-img, .gallery-card:hover,
  .contact-icon-btn:hover, .contact-icon-btn:hover i { transform: none; }
}

/* Mobile navigation stays anchored to the header without a nested fixed overlay. */
@media (max-width: 768px) {
  .navbar, .navbar.scrolled { background: var(--bg-linen); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .navbar-content, .navbar.scrolled .navbar-content { height: 64px; padding-inline: 1.25rem; }
  .menu-toggle { position: relative; flex-shrink: 0; }
  .menu-toggle i { display: none; }
  .menu-toggle::before, .menu-toggle::after {
    content: ""; position: absolute; width: 18px; height: 2px; background: currentColor;
    left: 12px; top: 20px; transition: transform .2s;
  }
  .menu-toggle::before { transform: translateY(-4px); box-shadow: 0 4px currentColor; }
  .menu-toggle::after { transform: translateY(4px); }
  .menu-toggle[aria-expanded="true"]::before { transform: rotate(45deg); box-shadow: none; }
  .menu-toggle[aria-expanded="true"]::after { transform: rotate(-45deg); }
  .nav-links {
    position: absolute; top: 100%; left: 0; width: 100%; height: auto;
    max-height: calc(100dvh - 64px); overflow-y: auto;
    display: none; padding: .75rem 1.25rem 1rem; margin: 0; gap: .35rem;
    background: var(--bg-linen); backdrop-filter: none; -webkit-backdrop-filter: none;
    transform: none; opacity: 1; box-shadow: 0 12px 24px rgba(0,0,0,.15);
  }
  .nav-links.active { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; text-align: left; padding: .8rem 1rem; font-size: 1rem; }
  .hero-subtitle { min-height: 5.2em; line-height: 1.55; max-width: 32rem; }
  .typewriter-text { white-space: normal; overflow-wrap: anywhere; }
  .hero-actions { grid-template-columns: 1fr; gap: .65rem; max-width: 360px; }
  .hero-actions .btn { font-size: .78rem; min-height: 48px; padding: .8rem 1rem; }
  .hero-stats-strip { padding-inline: 0; }
  .stat-block { min-width: 0; }
  .projects-header h2, .section h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); line-height: 1.2; }
  .project-info, .experience-card { padding: 1rem; }
  .exp-role-meta { flex-wrap: wrap; gap: .35rem .7rem; }
  .exp-header > h3 { line-height: 1.25; margin-block: .4rem; }
  .exp-subtitle, .project-text, .detail-paragraph, .footer p { overflow-wrap: anywhere; }
  .project-disclosure summary, .project-link, .card-toggle-btn { min-height: 44px; display: flex; align-items: center; }
  .project-disclosure summary { padding-block: .45rem; }
  .projects-grid { grid-template-columns: minmax(0, 1fr); }
  .projects-grid > .project-card { grid-column: 1 / -1; min-width: 0; }
  .project-info, .project-image-wrapper { min-width: 0; }
  .project-grid-2col > *, .gallery-grid-3col > * { min-width: 0; }
  .benchmark-table-wrap { max-width: 100%; }
}
@media (max-width: 480px) {
  .gallery-grid-3col { grid-template-columns: 1fr; }
  .container { padding-inline: 1rem; }
  .hero { padding-top: 92px; }
  .contact-circular-row { flex-wrap: wrap; gap: .65rem; }
}

/* Fit the mobile viewport and contain sideways gestures at the page boundary. */
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  @supports (overflow: clip) { html, body { overflow-x: clip; } }
  html { overscroll-behavior-x: none; }
  .container, .hero-grid, .projects-grid, .experience-grid,
  .project-grid-2col, .gallery-grid-3col { min-width: 0; max-width: 100%; }
  .project-card, .experience-card, .gallery-card, .sidebar-card { max-width: 100%; }
  img, video, iframe, canvas, svg { max-width: 100%; }
  h1, h2, h3, p, li, a { overflow-wrap: anywhere; }
}

/* A lighter mobile header blends into the hero while retaining a full-size tap target. */
@media (max-width: 768px) {
  html { scroll-padding-top: 68px; }
  .navbar-content, .navbar.scrolled .navbar-content { height: 56px; padding-inline: 1rem; }
  .nav-logo { font-size: 1.2rem; }
  .navbar:not(.scrolled):not(:has(.nav-links.active)) { background: transparent; border-bottom-color: transparent; box-shadow: none; }
  .menu-toggle { border-color: transparent; background: transparent; }
  .menu-toggle:focus-visible { outline: 2px solid var(--accent-copper); outline-offset: 1px; }
  .nav-links { max-height: calc(100dvh - 56px); }
  .hero { padding-top: 84px; }
}
