/* styles.css */

/* Font (minimal + professional) */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&display=swap");

/* =========================
   THEME TOKENS
========================= */
:root{
  --bg0: #09090B;
  --bg1: #0E0D10;

  --text: rgba(255,255,255,.90);
  --muted: rgba(255,255,255,.66);
  --muted2: rgba(255,255,255,.46);

  --crimson: #B21F37;
  --crimson2: #7A1E2B;

  --shadow2: 0 10px 28px rgba(0,0,0,.50);
  --focus: rgba(178, 31, 55, .55);

  --cardStroke: rgba(255,255,255,.10);
  --cardStrokeHover: rgba(255,255,255,.16);
  --cardShadow: 0 14px 42px rgba(0,0,0,.58);
  --cardShadowHover: 0 18px 54px rgba(0,0,0,.66);

  --radius: 22px;
  --navMax: 1120px;
  --pagePadX: 22px;
}

/* =========================
   RESET
========================= */
*{ box-sizing: border-box; }
html, body{ height:100%; }
html{ background: var(--bg0); }

body{
  margin:0;
  font-family: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  overflow-x: hidden;

  /* Default site background (crimson + black) */
  background:
    radial-gradient(1200px 720px at 14% 10%, rgba(178,31,55,.22) 0%, rgba(178,31,55,0) 62%),
    radial-gradient(1100px 700px at 88% 24%, rgba(122,30,43,.16) 0%, rgba(122,30,43,0) 64%),
    radial-gradient(900px 600px at 52% 92%, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 62%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 64%, #07070A 100%);
}

/* =========================
   ACCESSIBILITY
========================= */
.skipLink{
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18,16,21,.92);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 160ms ease;
  box-shadow: var(--shadow2);
}
.skipLink:focus{ transform: translateY(0); outline: none; }

:where(a, button, [tabindex]):focus-visible{
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* =========================
   NAV
========================= */
.nav{
  max-width: var(--navMax);
  margin: 0 auto;
  padding: 26px var(--pagePadX);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 16px;
}

.brand{
  text-decoration:none;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 8px 10px;
  border-radius: 12px;
}
.brand:hover{ background: rgba(255,255,255,.04); }

.links{
  display:flex;
  gap: 18px;
  align-items:center;
}

.links a{
  position: relative;
  text-decoration:none;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.10em;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.links a:hover{
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.10);
  transform: translateY(-1px);
}

.links a::after{
  content:"";
  position:absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, rgba(178,31,55,0), rgba(178,31,55,.80), rgba(178,31,55,0));
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.links a:hover::after{
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   HOMEPAGE HERO
========================= */
.hero{
  min-height: calc(100vh - 92px);
  display:grid;
  place-items:center;
  padding: 34px var(--pagePadX) 70px;
}

.heroInner{
  width: min(920px, 100%);
  text-align: center;
  animation: rubberIn 900ms cubic-bezier(.2,.85,.2,1) both;
}

.heroName,
.heroRole,
.heroOrg{
  letter-spacing: 0.08em;
}

.heroName{
  margin: 0;
  font-size: clamp(44px, 6.4vw, 76px);
  line-height: 1.03;
  font-weight: 600;
  background: linear-gradient(92deg, rgba(255,255,255,.94), rgba(255,255,255,.72), rgba(178,31,55,.58));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 12px 40px rgba(178,31,55,.16));
  transition: filter 180ms ease, transform 180ms ease;
}
.heroInner:hover .heroName{
  filter: drop-shadow(0 14px 46px rgba(178,31,55,.22));
  transform: translateY(-1px);
}

.heroRole{
  margin: 14px 0 0;
  font-size: clamp(16px, 2.0vw, 20px);
  font-weight: 500;
  color: rgba(255,255,255,.78);
}

.heroOrg{
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.62);
}

/* =========================
   SOCIALS
========================= */
.socialRow{
  margin-top: 22px;
  display:flex;
  justify-content:center;
  flex-wrap: wrap;
  gap: 12px;
}

.socialBtn{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow2);
  color: var(--text);
  text-decoration:none;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  transform: translateY(0);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.socialBtn .icon{
  width: 18px;
  height: 18px;
  fill: currentColor;
  color: rgba(255,255,255,.86);
}

.socialBtn:hover{
  transform: translateY(-1px);
  border-color: rgba(178,31,55,.38);
  background: linear-gradient(180deg, rgba(178,31,55,.10), rgba(255,255,255,.025));
  box-shadow: 0 16px 44px rgba(0,0,0,.58);
}

.socialBtn:active{
  transform: translateY(0);
  box-shadow: 0 10px 26px rgba(0,0,0,.54);
}

.socialText{ color: rgba(255,255,255,.88); }

/* =========================
   GENERIC PAGES
========================= */
.page{
  min-height: calc(100vh - 92px);
  padding: 26px var(--pagePadX) 70px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 18px;
}

.pageHead{
  width: min(980px, 100%);
  padding-top: 6px;
}

.pageTitle{
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: 0.10em; /* match homepage feel */
  color: rgba(255,255,255,.92);
}

/* =========================
   WORK: CARD LAYOUT
========================= */
.workWrap{
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 8px;
}

.card{
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.045) 0%, rgba(255,255,255,.028) 100%);
  border: 1px solid var(--cardStroke);
  box-shadow: var(--cardShadow);
  padding: 18px 18px 16px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.cardTop{ margin-bottom: 10px; }

.cardTitle{
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,.92);
}

.cardOrg{
  margin: 8px 0 0;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,.74);
}

.cardMeta{
  margin: 6px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,.56);
}

.cardText{
  margin: 14px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,.74);
}

.cardTags{
  margin: 12px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,.60);
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.card:hover{
  transform: translateY(-2px);
  border-color: var(--cardStrokeHover);
  box-shadow: var(--cardShadowHover);
}

.card:focus-within{
  transform: translateY(-2px);
  border-color: rgba(178,31,55,.38);
  box-shadow: var(--cardShadowHover);
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* =========================
   ANIMATION (homepage)
========================= */
@keyframes rubberIn{
  0%{ opacity: 0; transform: translateY(10px) scale(0.98); filter: blur(2px); }
  55%{ opacity: 1; transform: translateY(0) scale(1.03); filter: blur(0); }
  78%{ transform: translateY(0) scale(0.995); }
  100%{ opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* ============================================================
   PHOTOGRAPHY THEME (NO CRIMSON) — apply via <body class="photoTheme">
============================================================ */
.photoTheme{
  --focus: rgba(255,255,255,.70);
  background:
    radial-gradient(1100px 820px at -12% 42%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 62%),
    radial-gradient(900px 620px at 28% 18%, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #070709 0%, #050507 50%, #030305 100%);
}

/* white underline accent on nav hover for photo theme */
.photoTheme .links a::after{
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.70), rgba(255,255,255,0));
}
.photoTheme .links a:hover{
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.03);
}

/* PHOTOGRAPHY: landing page layout */
.photoPage{
  max-width: none;
  width: 100%;
}

.photoHead{
  width: 100%;
}

.photoHeadCenter{
  text-align: center;
}

.photoTitle{
  letter-spacing: 0.12em;
}

/* Album landing grid: full width with ~0.5" side gaps */
.albumGrid{
  width: 100%;
  padding-left: clamp(18px, 4.5vw, 48px);
  padding-right: clamp(18px, 4.5vw, 48px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

/* Clickable album card: 21:9 cinematic banner */
.albumCard{
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: rgba(255,255,255,.92);

  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 18px 50px rgba(0,0,0,.62),
    0 0 0 1px rgba(255,255,255,.06) inset;

  aspect-ratio: 21 / 9;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.albumImg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* cover is correct for album banner */
  transform: scale(1.02);
  transition: transform 420ms cubic-bezier(.2,.8,.2,1), filter 220ms ease;
  filter: saturate(.98) contrast(1.02) brightness(.92);
}

.albumOverlay{
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: 16px;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.70) 100%);
}

.albumCaption{
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.92);
  text-shadow: 0 10px 28px rgba(0,0,0,.70);
}

.albumCard:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.20);
  box-shadow:
    0 22px 64px rgba(0,0,0,.70),
    0 0 0 1px rgba(255,255,255,.10) inset;
}
.albumCard:hover .albumImg{
  transform: scale(1.08);
  filter: saturate(1.02) contrast(1.05) brightness(.96);
}

.albumCard:focus-visible{
  outline: 3px solid rgba(255,255,255,.72);
  outline-offset: 4px;
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.24);
  box-shadow:
    0 22px 64px rgba(0,0,0,.70),
    0 0 0 1px rgba(255,255,255,.12) inset;
}
.albumCard:focus-visible .albumImg{ transform: scale(1.08); }

/* =========================
   ALBUM PAGE
========================= */
.albumTop{
  width: 100%;
  padding-left: clamp(18px, 4.5vw, 48px);
  padding-right: clamp(18px, 4.5vw, 48px);
  display: grid;
  gap: 10px;
  align-items: start;
}

.albumBack{
  width: fit-content;
  color: rgba(255,255,255,.72);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.albumBack:hover{
  color: rgba(255,255,255,.90);
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

/* Photo list: one photo per row, full-width with side gaps */
.photoGrid{
  width: 100%;
  padding-left: clamp(18px, 4.5vw, 48px);
  padding-right: clamp(18px, 4.5vw, 48px);
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 10px;
}

/* Tile wrapper stays invisible/seamless (no borders) */
.photoTile{
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

/* Preserve the uploaded aspect ratio (NO CROPPING) */
.photoTile img{
  display: block;
  width: 100%;
  height: auto;          /* preserves natural aspect ratio */
  max-width: 100%;
  border-radius: 18px;   /* you can set to 0 if you want perfectly edge-to-edge rectangles */
  filter: saturate(.98) contrast(1.02) brightness(.94);
  transform: scale(1);
}

/* ---------- BOUNCY “ZOOM INTO PAGE” ON SCROLL (CSS-only, progressive enhancement) ---------- */
/* Default: slight lift on hover/focus for desktop users */
.photoTile img{
  transition: transform 420ms cubic-bezier(.2,.8,.2,1), filter 220ms ease;
}
.photoTile:hover img{
  transform: scale(1.01);
  filter: saturate(1.02) contrast(1.05) brightness(.98);
}

/*
  Scroll-driven animation (supported in modern Chromium):
  Each photo gently “pops” (overshoot) as it enters the viewport.
*/
@supports (animation-timeline: view()){
  .photoTile img{
    transform: scale(.96);
    opacity: .98;
    animation-name: popIn;
    animation-timing-function: linear;
    animation-fill-mode: both;
    animation-timeline: view();
    /* start when entering, finish once mostly in view */
    animation-range: entry 10% cover 38%;
  }

  @keyframes popIn{
    0%   { transform: scale(.94); opacity: .92; }
    55%  { transform: scale(1.03); opacity: 1; }
    72%  { transform: scale(.995); }
    100% { transform: scale(1); }
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 720px){
  .nav{
    flex-direction: column;
    align-items: flex-start;
  }
  .links{
    flex-wrap: wrap;
    gap: 8px;
  }
  .hero{ padding-top: 24px; }
  .card{ padding: 16px 14px 14px; border-radius: 20px; }
  .albumCard{ border-radius: 20px; }
  .photoTile img{ border-radius: 16px; }
}

/* =========================
   REDUCED MOTION
========================= */
@media (prefers-reduced-motion: reduce){
  .heroInner{ animation: none; }
  .links a, .socialBtn, .heroName, .card, .albumCard, .albumImg, .albumBack, .photoTile img{ transition: none; }
  .card:hover, .card:focus-within, .albumCard:hover{ transform: none; }
  .albumCard:hover .albumImg{ transform: scale(1.02); }

  @supports (animation-timeline: view()){
    .photoTile img{ animation: none; transform: none; opacity: 1; }
  }
}
