/* ============================================
   INDEX.CSS — Home / Landing Page
   ============================================ */

/* --- Hero Section (camera viewfinder intro) --- */
.hero {
  /* Viewfinder geometry — tweak these to adjust the frame */
  --vf-x: var(--spacing-lg);                       /* side inset; matches navbar padding so the frame lines up with the logo */
  --vf-top: calc(var(--nav-height) + 0.25rem);     /* frame starts just under the navbar */
  --vf-bottom: clamp(1.25rem, 3vh, 2rem);          /* gap below the frame */
  --vf-pad: clamp(1rem, 2vw, 1.6rem);              /* inner padding between frame edge and readouts */
  --vf-corner: clamp(22px, 3vw, 44px);             /* length of the corner brackets */
  --vf-stroke: 1.5px;
  --vf-ink: rgba(255, 255, 255, 0.85);
  --hero-peek: 0px;                                /* set e.g. 4rem to let the next section peek in below the hero */

  position: relative;
  height: calc(100vh - var(--hero-peek));
  height: calc(100svh - var(--hero-peek));         /* svh = visible screen height on phones (ignores browser toolbars) */
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding:
    var(--vf-top)
    calc(var(--vf-x) + var(--vf-pad))
    calc(var(--vf-bottom) + var(--vf-pad) + 4.5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.4);
  transform: scale(1.05);
  animation: heroZoom 20s ease-in-out infinite alternate;
}

/* "Rack focus": photo starts soft and snaps sharp when the focus box locks */
.js .hero-bg {
  filter: brightness(0.4) blur(10px);
}

.js .hero.is-ready .hero-bg {
  animation:
    heroRackFocus 1.1s 0.35s cubic-bezier(0.3, 0, 0.2, 1) forwards,
    heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroRackFocus {
  0%   { filter: brightness(0.4) blur(10px); }
  60%  { filter: brightness(0.42) blur(1.5px); }
  75%  { filter: brightness(0.42) blur(2.5px); }
  100% { filter: brightness(0.4) blur(0); }
}

@keyframes heroZoom {
  from { transform: scale(1.05); }
  to { transform: scale(1.12); }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(26,26,26,0.3) 0%,
    rgba(26,26,26,0.1) 40%,
    rgba(26,26,26,0.6) 80%,
    rgba(26,26,26,0.95) 100%
  );
}

/* --- Viewfinder overlay --- */
.viewfinder {
  position: absolute;
  top: var(--vf-top);
  left: var(--vf-x);
  right: var(--vf-x);
  bottom: var(--vf-bottom);
  z-index: 2;
  pointer-events: none;
  color: var(--vf-ink);
  will-change: opacity;
}

/* Corner brackets */
.vf-corner {
  position: absolute;
  width: var(--vf-corner);
  height: var(--vf-corner);
  border: 0 solid var(--vf-ink);
  opacity: 0;
  animation: vfCornerIn 0.7s 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.vf-corner--tl { top: 0;    left: 0;  border-top-width: var(--vf-stroke);    border-left-width: var(--vf-stroke);  --vf-from: -10px, -10px; }
.vf-corner--tr { top: 0;    right: 0; border-top-width: var(--vf-stroke);    border-right-width: var(--vf-stroke); --vf-from: 10px, -10px; }
.vf-corner--bl { bottom: 0; left: 0;  border-bottom-width: var(--vf-stroke); border-left-width: var(--vf-stroke);  --vf-from: -10px, 10px; }
.vf-corner--br { bottom: 0; right: 0; border-bottom-width: var(--vf-stroke); border-right-width: var(--vf-stroke); --vf-from: 10px, 10px; }

@keyframes vfCornerIn {
  from { opacity: 0; transform: translate(var(--vf-from)); }
  to   { opacity: 1; transform: translate(0, 0); }
}

/* Rule-of-thirds grid */
.vf-grid {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: fadeIn 1.2s 0.6s ease forwards;
}

.vf-grid::before,
.vf-grid::after {
  content: '';
  position: absolute;
  border: 0 solid rgba(255, 255, 255, 0.07);
}

.vf-grid::before {
  top: 0;
  bottom: 0;
  left: 33.333%;
  right: 33.333%;
  border-left-width: 1px;
  border-right-width: 1px;
}

.vf-grid::after {
  left: 0;
  right: 0;
  top: 33.333%;
  bottom: 33.333%;
  border-top-width: 1px;
  border-bottom-width: 1px;
}

/* Autofocus box — JS moves it onto the photo's focus point (see data-focus-x / data-focus-y on the hero image) */
.vf-focus {
  --size: clamp(54px, 6vw, 84px);
  --tick: calc(var(--size) * 0.22);
  position: absolute;
  left: 56%;
  top: 30%;
  width: var(--size);
  height: var(--size);
  translate: -50% -50%;
  color: rgba(255, 255, 255, 0.9);
  background:
    linear-gradient(currentColor, currentColor) top left    / var(--tick) var(--vf-stroke),
    linear-gradient(currentColor, currentColor) top left    / var(--vf-stroke) var(--tick),
    linear-gradient(currentColor, currentColor) top right   / var(--tick) var(--vf-stroke),
    linear-gradient(currentColor, currentColor) top right   / var(--vf-stroke) var(--tick),
    linear-gradient(currentColor, currentColor) bottom left / var(--tick) var(--vf-stroke),
    linear-gradient(currentColor, currentColor) bottom left / var(--vf-stroke) var(--tick),
    linear-gradient(currentColor, currentColor) bottom right/ var(--tick) var(--vf-stroke),
    linear-gradient(currentColor, currentColor) bottom right/ var(--vf-stroke) var(--tick);
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.5);
}

.vf-focus-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: currentColor;
}

.hero.is-ready .vf-focus {
  animation:
    vfFocusHunt 1.1s 0.35s cubic-bezier(0.3, 0, 0.2, 1) forwards,
    vfFocusLock 0.6s 1.45s steps(1, end) forwards;
}

@keyframes vfFocusHunt {
  0%   { opacity: 0; transform: scale(1.5); }
  20%  { opacity: 1; }
  60%  { transform: scale(0.9); }
  78%  { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

/* Two quick blinks, then it stays lit in the accent colour = "focus locked" */
@keyframes vfFocusLock {
  0%   { color: var(--color-accent-hover); }
  25%  { color: rgba(255, 255, 255, 0.9); }
  50%  { color: var(--color-accent-hover); }
  75%  { color: rgba(255, 255, 255, 0.9); }
  100% { color: var(--color-accent-hover); }
}

/* Readout bars */
.vf-bar {
  position: absolute;
  left: var(--vf-pad);
  right: var(--vf-pad);
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  opacity: 0;
  animation: fadeIn 0.8s 0.5s ease forwards;
}

.vf-bar--top    { top: calc(var(--vf-pad) * 0.85); }
.vf-bar--bottom { bottom: calc(var(--vf-pad) * 0.85); }

.vf-spacer { flex: 1; }

/* Shooting mode (boxed "M" = manual) */
.vf-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 0.3em 0.35em 0.3em 0.5em; /* extra left offsets letter-spacing */
  border: 1px solid var(--vf-ink);
  border-radius: 2px;
  font-weight: 500;
}

/* Autofocus mode — turns gold when the focus box locks */
.vf-af {
  color: rgba(255, 255, 255, 0.7);
}

.hero.is-ready .vf-af {
  animation: vfAfLock 0.01s 2.05s forwards;
}

@keyframes vfAfLock {
  to { color: var(--color-accent-hover); }
}

.vf-battery {
  position: relative;
  width: 22px;
  height: 11px;
  border: 1px solid var(--vf-ink);
  border-radius: 2px;
  padding: 1.5px;
}

.vf-battery::after {
  content: '';
  position: absolute;
  top: 2.5px;
  right: -4px;
  width: 2px;
  height: 4px;
  background: var(--vf-ink);
  border-radius: 0 1px 1px 0;
}

.vf-battery i {
  display: block;
  width: 75%;
  height: 100%;
  background: var(--vf-ink);
  border-radius: 1px;
}

.vf-shots { color: rgba(255, 255, 255, 0.7); }

/* Shutter: a quick blackout, then a soft white flash */
.vf-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.vf-flash.is-firing {
  animation: vfShutter 0.55s ease-out;
}

@keyframes vfShutter {
  0%   { opacity: 1; background: #000; }
  14%  { opacity: 1; background: #000; }
  24%  { opacity: 0.85; background: #fff; }
  100% { opacity: 0; background: #fff; }
}

/* Visually hidden (still read by screen readers & search engines) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* "View" button — centred on the lower rule-of-thirds line of the viewfinder */
.hero-cta {
  position: absolute;
  left: 50%;
  top: calc(var(--vf-top) + (100% - var(--vf-top) - var(--vf-bottom)) * 2 / 3);
  translate: -50% -50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  margin: 0;
  padding: 1.5rem 4rem 1.5rem 4.4rem; /* extra left padding balances the letter-spacing */
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  transition: background var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
  animation: fadeUp 0.8s 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  opacity: 0;
}

.hero-cta:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 169, 110, 0.25);
}

.hero-cta svg {
  width: 22px;
  height: 22px;
  animation: vfBob 1.8s ease-in-out infinite;  /* gentle "there's more below" hint */
}

@keyframes vfBob {
  0%, 100% { transform: translateY(-2px); }
  50%      { transform: translateY(2px); }
}

/* --- Hero: tablets & phones --- */
@media (max-width: 768px) {
  .hero {
    --vf-x: var(--spacing-sm);       /* matches mobile navbar padding */
    --vf-bottom: 1rem;
    --vf-pad: 0.9rem;
  }

  .vf-bar {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
  }

  .vf-hide-sm {
    display: none;
  }
}

/* Phones: slightly smaller button */
@media (max-width: 480px) {
  .hero-cta {
    gap: 0.9rem;
    padding: 1.3rem 3.2rem 1.3rem 3.55rem;
    font-size: 1rem;
  }

  .hero-cta svg {
    width: 19px;
    height: 19px;
  }
}

/* Respect "reduce motion": no flash, no blinking, no zoom — focus box just appears locked */
@media (prefers-reduced-motion: reduce) {
  .hero-bg,
  .js .hero-bg,
  .js .hero.is-ready .hero-bg {
    animation: none;
    filter: brightness(0.4);
    transform: none;
  }

  .hero.is-ready .vf-focus,
  .vf-focus {
    animation: none;
    opacity: 1;
    transform: none;
    color: var(--color-accent-hover);
  }

  .hero.is-ready .vf-af {
    animation: none;
    color: var(--color-accent-hover);
  }

  .hero-cta svg {
    animation: none;
  }
}

/* ============================================
   ABOUT ME / EXPERIENCE / SKILLS (home page)
   ============================================ */
.about,
.experience {
  scroll-margin-top: var(--nav-height);
}

/* --- About Me --- */
.about {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-lg);
}

.about-inner {
  display: grid;
  grid-template-columns: 210px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "photo heading"
    "photo body";
  column-gap: var(--spacing-lg);
  max-width: 980px;
  margin: 0 auto;
}

.about-headshot { grid-area: photo; }
.about-heading  { grid-area: heading; }
.about-body     { grid-area: body; }

.about-headshot-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--color-bg-elevated);
}

/* thin offset accent frame behind the photo */
.about-headshot-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: translate(10px, 10px);
  border: 1px solid var(--color-accent);
  opacity: 0.45;
  pointer-events: none;
}

.about-headshot-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.headshot-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px dashed var(--color-border);
  background: linear-gradient(180deg, #262626 0%, #1e1e1e 100%);
  color: var(--color-text-dim);
}

.headshot-placeholder svg {
  width: 40%;
  max-width: 64px;
}

.headshot-placeholder span {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.about-name {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: var(--spacing-sm);
}

.about-name em {
  font-style: italic;
  color: var(--color-accent);
}

.about-bio {
  color: var(--color-text-muted);
  line-height: 1.85;
  max-width: 640px;
  margin-bottom: var(--spacing-sm);
}

.about-bio:last-child {
  margin-bottom: 0;
}

/* --- Experience --- */
.experience {
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

/* vertical list: UCCS on top, TSU below */
.exp-list {
  display: grid;
  gap: var(--spacing-md);
}

.exp-card {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: var(--spacing-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.exp-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.exp-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.exp-badge {
  flex: 0 0 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.exp-role {
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}

.exp-school {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.exp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-text-dim);
}

.exp-points {
  display: grid;
  gap: 0.45rem;
}

.exp-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

.exp-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 1px;
  background: var(--color-accent);
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.exp-tags span {
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  padding: 0.28rem 0.7rem;
  border: 1px solid var(--color-border);
}

/* --- Experience: UCCS featured case study --- */
.exp-feature {
  gap: var(--spacing-md);
  padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-md);
  background:
    radial-gradient(80% 60% at 15% 30%, rgba(176, 137, 104, 0.07), transparent 70%),
    var(--color-bg-elevated);
}

.exp-feature:hover {
  transform: none;            /* big card: no lift, just the border */
  box-shadow: none;
}

.exp-feature .exp-head {
  align-items: center;
}

.exp-feature .exp-title {
  flex: 1;
}

.exp-feature .exp-school {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

/* View Account button */
.exp-account {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--color-accent);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  transition: background var(--transition-smooth), color var(--transition-smooth);
}

.exp-account svg {
  width: 14px;
  height: 14px;
}

.exp-account:hover {
  background: var(--color-accent);
  color: var(--color-bg);
}

/* phone + details */
.exp-feature-body {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.exp-phone {
  position: relative;
  display: flex;
  justify-content: center;
  padding: var(--spacing-sm) 0;
}

.exp-phone img {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55));
  animation: expFloat 6s ease-in-out infinite;
}

.exp-phone-glow {
  position: absolute;
  inset: 10% -5%;
  background: radial-gradient(closest-side, rgba(176, 137, 104, 0.35), transparent);
  filter: blur(30px);
  pointer-events: none;
}

@keyframes expFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.exp-details {
  display: grid;
  gap: var(--spacing-md);
}

/* stat tiles */
.exp-stats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.exp-stats-period {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.exp-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.exp-stat {
  position: relative;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--color-border);
  background: rgba(26, 26, 26, 0.6);
}

/* little viewfinder corner on each stat */
.exp-stat::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--color-accent);
  border-left: 1px solid var(--color-accent);
}

.exp-stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--color-accent-hover);
  font-variant-numeric: tabular-nums;
}

.exp-stat-label {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.exp-block-title {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.8rem;
}

.exp-resp {
  display: grid;
  gap: 0.6rem;
  max-width: 760px;
}

.exp-resp li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.exp-resp li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 8px;
  height: 1px;
  background: var(--color-accent);
}

.exp-chips-block {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.exp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.exp-chips span {
  padding: 0.38rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--color-text);
  background: rgba(26, 26, 26, 0.6);
  transition: border-color var(--transition-snappy), color var(--transition-snappy);
}

.exp-chips span:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-hover);
}

/* selected work */
.exp-work {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.exp-work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.exp-work-hint {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.exp-work-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.exp-work-item {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: zoom-in;
}

.exp-work-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-smooth);
}

.exp-work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* viewfinder corners appear on hover */
.exp-work-media::after {
  content: '';
  position: absolute;
  inset: 8px;
  --c: rgba(255, 255, 255, 0.9);
  --l: 14px;
  background:
    linear-gradient(var(--c), var(--c)) top left     / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) top left     / 1.5px var(--l),
    linear-gradient(var(--c), var(--c)) top right    / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) top right    / 1.5px var(--l),
    linear-gradient(var(--c), var(--c)) bottom left  / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) bottom left  / 1.5px var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) 1.5px,
    linear-gradient(var(--c), var(--c)) bottom right / 1.5px var(--l);
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
  pointer-events: none;
}

.exp-work-item:hover .exp-work-media,
.exp-work-item:focus-visible .exp-work-media {
  border-color: var(--color-accent);
}

.exp-work-item:hover .exp-work-media img {
  transform: scale(1.05);
}

.exp-work-item:hover .exp-work-media::after,
.exp-work-item:focus-visible .exp-work-media::after {
  opacity: 1;
  transform: scale(1);
}

.exp-work-item:focus-visible {
  outline: none;
}

.exp-work-caption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.exp-work-title {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
  color: var(--color-text);
}

.exp-work-tag {
  font-size: 0.56rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

/* --- Work lightbox --- */
.work-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  background: rgba(10, 10, 10, 0.94);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.work-lightbox[hidden] {
  display: none;
}

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

.wl-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  max-height: 100%;
  margin: 0;
}

.wl-figure img {
  max-width: min(88vw, 620px);
  max-height: calc(100vh - 9rem);
  max-height: calc(100svh - 9rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.wl-figure figcaption {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

#wlTitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-text);
}

.wl-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  background: rgba(26, 26, 26, 0.7);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition-snappy), color var(--transition-snappy);
}

.wl-btn svg {
  width: 20px;
  height: 20px;
}

.wl-btn:hover,
.wl-btn:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
  outline: none;
}

.wl-close {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
}

/* --- UCCS case study: responsive --- */
@media (max-width: 1100px) {
  .exp-work-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .exp-feature {
    padding: var(--spacing-md);
  }

  .exp-feature .exp-head {
    flex-wrap: wrap;
  }

  .exp-account {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .exp-feature-body {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .exp-phone img {
    max-width: 250px;
  }
}

@media (max-width: 600px) {
  .exp-feature {
    padding: 1.4rem;
  }

  /* phones: metrics stack as rows — big number left, label right */
  .exp-stats {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .exp-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem 0.85rem 1.1rem;
  }

  .exp-stat-num {
    flex: 0 0 auto;
    min-width: 6.2rem;
    font-size: 2rem;
  }

  .exp-stat-label {
    margin-top: 0;
    font-size: 0.6rem;
    letter-spacing: 0.16em;
  }

  .exp-resp,
  .exp-chips-block {
    grid-template-columns: 1fr;
  }

  .exp-work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .work-lightbox {
    padding: var(--spacing-sm);
  }

  .wl-prev,
  .wl-next {
    position: absolute;
    bottom: var(--spacing-sm);
  }

  .wl-prev { left: calc(50% - 56px); }
  .wl-next { right: calc(50% - 56px); }

  .wl-figure img {
    max-width: 92vw;
    max-height: calc(100svh - 11rem);
  }

  .wl-figure {
    margin-bottom: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .exp-phone img {
    animation: none;
  }
}

/* --- About / Experience: responsive --- */
@media (max-width: 768px) {
  .about {
    padding-top: var(--spacing-lg);
  }

  /* small headshot sits beside the name; bio runs full width underneath */
  .about-inner {
    grid-template-columns: 112px 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "photo heading"
      "body  body";
    column-gap: 1.25rem;
    row-gap: var(--spacing-md);
    align-items: center;
  }

  .about-headshot-frame::before {
    transform: translate(6px, 6px);
  }

  .about-name {
    font-size: clamp(1.9rem, 8vw, 2.4rem);
    margin-bottom: 0;
  }

  .exp-card {
    padding: 1.4rem;
  }
}

@media (max-width: 480px) {

  .exp-head {
    gap: 0.85rem;
  }

  .exp-badge {
    flex-basis: 48px;
    height: 48px;
    font-size: 0.85rem;
  }
}

/* --- Category Showcase Sections --- */
.showcase {
  /* top/bottom only, so the .container side padding still applies */
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-xl);
}

.showcase-section {
  margin-bottom: var(--spacing-2xl);
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + var(--spacing-sm)); /* keep heading clear of the fixed navbar */
}

.showcase-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--color-border);
}

.showcase-header .section-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 300;
  color: var(--color-border);
  line-height: 1;
  margin-right: var(--spacing-md);
}

.showcase-header-text {
  flex: 1;
}

.showcase-link {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap var(--transition-snappy);
  white-space: nowrap;
}

.showcase-link:hover {
  gap: 0.85rem;
}

.showcase-link svg {
  width: 14px;
  height: 14px;
}

/* --- Photo Grid (4 images per section) --- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.photo-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.5s ease;
}

.photo-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(26,26,26,0.7) 100%
  );
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.photo-card:hover img {
  transform: scale(1.08);
}

.photo-card:hover::after {
  opacity: 1;
}

.photo-card-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-sm);
  z-index: 2;
  transform: translateY(10px);
  opacity: 0;
  transition: all var(--transition-smooth);
}

.photo-card:hover .photo-card-caption {
  transform: translateY(0);
  opacity: 1;
}

.photo-card-caption span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--color-text);
}

/* --- Featured photos: gold offset frame ---
   A thin gold outline sits offset behind each photo; on hover it snaps
   around the photo. (On phones it simply stays in the offset position.) */
.photo-grid--offset {
  gap: 24px;
  padding: 0 10px 10px 0;   /* room for the offset outline on the last row/column */
}

.photo-grid--offset .photo-card {
  display: block;
  overflow: visible;
}

.photo-grid--offset .photo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-accent);
  opacity: 0.55;
  transform: translate(10px, 10px);
  transition:
    inset 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.4s ease;
  pointer-events: none;
}

.photo-grid--offset .photo-card:hover::before {
  inset: -7px;
  transform: translate(0, 0);
  opacity: 1;
}

/* no dark hover overlay on featured photos */
.photo-grid--offset .photo-card::after {
  content: none;
}

/* The frame and photo are pinned to the card (position: absolute), so the
   card's height comes only from its aspect-ratio. This stops iPhone Safari
   from stretching a frame to the photo's full height and spilling it over
   the next section. */
.photo-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border: 3px solid #0a0a0a;   /* subtle black edge */
}

.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* older phones without aspect-ratio support: reserve the same shape with padding */
@supports not (aspect-ratio: 1 / 1) {
  .photo-grid--offset .photo-card { padding-top: 133.333%; }
}
@media (max-width: 480px) {
  @supports not (aspect-ratio: 1 / 1) {
    .photo-grid--offset .photo-card { padding-top: 75%; }
  }
}

@media (max-width: 600px) {
  .photo-grid--offset {
    gap: 20px;
    padding: 0 8px 8px 0;
  }

  .photo-grid--offset .photo-card::before {
    transform: translate(8px, 8px);
  }
}

/* --- Featured reels: rounded corners, soft gold glow, lift on hover --- */
.reel-row .reel-card {
  border: 3px solid #0a0a0a;   /* subtle black edge */
  border-radius: 12px;
  box-shadow: 0 14px 34px -14px rgba(176, 137, 104, 0.4);
  transition:
    transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.45s ease,
    border-color 0.45s ease;
}

.reel-row .reel-card:hover,
.reel-row .reel-card.is-unmuted {
  transform: translateY(-8px);
  border-color: rgba(176, 137, 104, 0.6);
  box-shadow:
    0 24px 50px -18px rgba(0, 0, 0, 0.7),
    0 0 55px -4px rgba(176, 137, 104, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .reel-row .reel-card:hover,
  .reel-row .reel-card.is-unmuted {
    transform: none;
  }
}

/* --- Accent Layout Variations --- */
.photo-grid.layout-featured {
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
}

.photo-grid.layout-featured .photo-card:first-child {
  aspect-ratio: auto;
  grid-row: span 1;
}

.photo-grid.layout-wide {
  grid-template-columns: 1fr 1fr 2fr;
}

.photo-grid.layout-wide .photo-card:last-child {
  aspect-ratio: 16/10;
}

/* --- Contact Section --- */
.contact-section {
  /* top/bottom only, so the .container side padding still applies */
  padding-top: 0.5rem;
  padding-bottom: var(--spacing-xl);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: stretch; /* both columns share the form's height */
  border-top: 1px solid var(--color-border);
  padding: var(--spacing-xl) 0;
}

/* heading at the top, LinkedIn button pinned to the bottom (lines up with the form's bottom edge) */
.contact-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.15;
  margin-bottom: var(--spacing-md);
}

.contact-text h2 span {
  color: var(--color-accent);
  font-style: normal;
}

/* While the contact form is hidden: heading + LinkedIn button centred.
   (Turns itself off automatically when the form is shown again.) */
.contact-inner:not(:has(.contact-form)) {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.contact-inner:not(:has(.contact-form)) .contact-text {
  align-items: center;
}

.contact-inner:not(:has(.contact-form)) .contact-linkedin {
  margin-top: var(--spacing-sm);
  text-align: left;
}

/* LinkedIn button */
.contact-linkedin {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  padding: 0.9rem 2.4rem 0.9rem 0.9rem;
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  transition: background var(--transition-smooth), color var(--transition-smooth), transform var(--transition-smooth);
}

.contact-linkedin-icon {
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent);
  color: var(--color-bg);
  transition: background var(--transition-smooth), color var(--transition-smooth);
}

.contact-linkedin-icon svg {
  width: 46px;
  height: 46px;
}

.contact-linkedin-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  line-height: 1.1;
}

.contact-linkedin-label {
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
  transition: color var(--transition-smooth);
}

.contact-linkedin:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  transform: translateY(-2px);
}

.contact-linkedin:hover .contact-linkedin-icon {
  background: var(--color-bg);
  color: var(--color-accent);
}

.contact-linkedin:hover .contact-linkedin-label {
  color: var(--color-bg);
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 1.25rem;
  padding: var(--spacing-md);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.form-optional {
  color: var(--color-text-dim);
  letter-spacing: 0.12em;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 0;
  padding: 0.85rem 1rem;
  outline: none;
  transition: border-color var(--transition-snappy), box-shadow var(--transition-snappy);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--color-text-dim);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(176, 137, 104, 0.15);
}

.contact-form input:user-invalid,
.contact-form textarea:user-invalid {
  border-color: #c4646b;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.form-honeypot {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 0.25rem;
}

.form-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.2rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-bg);
  background: var(--color-accent);
  border: none;
  cursor: pointer;
  transition: background var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.form-submit svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-snappy);
}

.form-submit:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(201, 169, 110, 0.25);
}

.form-submit:hover svg {
  transform: translateX(4px);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.form-status {
  flex: 1 1 220px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  margin: 0;
}

.form-status:empty {
  display: none;
}

.form-status.is-success { color: var(--color-accent-hover); }
.form-status.is-error   { color: #e0868c; }

.form-status a {
  color: inherit;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.25rem;
  }

  .form-submit {
    width: 100%;
    justify-content: center;
  }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .photo-grid,
  .photo-grid.layout-featured,
  .photo-grid.layout-wide {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
}

@media (max-width: 768px) {
  .showcase-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
  }

  .showcase-header .section-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .photo-grid,
  .photo-grid.layout-featured,
  .photo-grid.layout-wide {
    grid-template-columns: 1fr;
  }

  .photo-card {
    aspect-ratio: 4/3;
  }
}

/* --- Videos Section --- */
.showcase-section:last-child {
  margin-bottom: 0;
}

.videos {
  padding-top: var(--spacing-md);
  padding-bottom: var(--spacing-lg);
  scroll-margin-top: var(--nav-height);
}

/* Reel & documentary card styles live in main.css (shared with videos.html) */

.reel-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* --- Videos: tablets & phones ---
   Featured reels stack 1 per row (vertical list) instead of sitting side by side.
   1024px matches the site's other tablet breakpoints (covers iPads in portrait). */
@media (max-width: 1024px) {
  .reel-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .reel-row .reel-card {
    width: 100%;
    max-width: 420px;   /* keeps reels from getting too tall on bigger screens */
    margin-inline: auto;
  }
}
