/* =========================================================
   Amir Yusuf - personal site (multi-page)
   Black & white. Minimal. Warm. Editorial.
   ========================================================= */

:root {
  --bg: #050505;
  --text: #F5F5F0;
  --muted: #9C9C9C;
  --card: #101010;
  --card-2: #0c0c0c;
  --border: rgba(255, 255, 255, 0.10);
  --border-hover: rgba(255, 255, 255, 0.28);

  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, serif;

  --container: 1080px;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--text); color: var(--bg); }

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; z-index: 999;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.container.narrow { max-width: 720px; }
:focus-visible { outline: 1px solid var(--text); outline-offset: 3px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 999px;
  font-size: 0.94rem; font-weight: 500;
  background: var(--text); color: var(--bg); border: 1px solid var(--text);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.btn:hover { transform: translateY(-1px); opacity: 0.88; }
.btn-line { background: transparent; color: var(--text); border-color: var(--border-hover); }
.btn-line:hover { background: rgba(255,255,255,0.05); opacity: 1; }

.link-underline {
  font-size: 0.94rem; color: var(--muted);
  padding-bottom: 2px; border-bottom: 1px solid var(--border);
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.link-underline:hover { color: var(--text); border-color: var(--text); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.nav.scrolled, .nav.solid {
  background: rgba(5,5,5,0.78);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: 100%; max-width: var(--container);
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 28px;
}
.brand { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.nav-menu { display: flex; align-items: center; gap: 2px; }
.nav-link {
  position: relative; padding: 7px 11px;
  color: var(--muted); font-size: 0.9rem; font-weight: 500;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 1px;
  background: var(--text); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-cv { color: var(--text); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { width: 18px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

/* =========================================================
   PAGE ENTRANCE / FADE
   ========================================================= */
/* Cinematic reveal: opacity + slight rise + micro scale-up */
.fade {
  opacity: 0; transform: translateY(18px) scale(0.985);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.fade.in { opacity: 1; transform: none; }
.fade.d1 { transition-delay: .06s; }
.fade.d2 { transition-delay: .12s; }
.fade.d3 { transition-delay: .18s; }
.fade.d4 { transition-delay: .24s; }
.fade.d5 { transition-delay: .30s; }
.fade.d6 { transition-delay: .36s; }

/* =========================================================
   HOME - HERO + HUB
   ========================================================= */
/* Hero fills the first screen so the next section sits below the fold.
   svh keeps it stable on mobile (no jump when the address bar hides). */
.home-hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: 96px 0 92px; /* top clears the fixed nav; bottom leaves room for the scroll cue */
}
.home-hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.2rem);
  font-weight: 600; line-height: 1.02; letter-spacing: -0.035em;
}
.type {
  display: inline-flex; align-items: baseline;
  width: fit-content; max-width: 100%;
}
.type-out { display: inline; white-space: nowrap; }
.caret {
  display: inline-block; width: 3px; height: 0.9em;
  background: var(--text); margin-left: 4px;
  transform: translateY(2px); animation: caretBlink 0.9s ease-in-out infinite;
}
@keyframes caretBlink {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: 0.08; }
}
@media (max-width: 420px) { .type-out { white-space: normal; } }
.home-sub {
  margin-top: 20px; color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.18rem); max-width: 56ch;
}
.home-sub b { color: var(--text); font-weight: 500; }

/* subtle scroll cue anchoring the full-height hero (more below) */
.hero-scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; place-items: center; width: 34px; height: 34px;
  color: var(--muted); border-radius: 999px; opacity: 0.7;
  transition: color .2s var(--ease), opacity .2s var(--ease);
}
.hero-scroll:hover, .hero-scroll:focus-visible { color: var(--text); opacity: 1; outline: none; }
.hero-scroll::after {
  content: ""; width: 8px; height: 8px;
  border-right: 1px solid currentColor; border-bottom: 1px solid currentColor;
  animation: scrollBob 2.2s var(--ease) infinite;
}
@keyframes scrollBob {
  0%, 100% { transform: rotate(45deg) translate(-1.5px, -1.5px); opacity: 0.35; }
  50% { transform: rotate(45deg) translate(1.5px, 1.5px); opacity: 0.85; }
}

/* hero masthead: tiny labels anchoring the bottom edge so the full-height
   hero reads as a composed editorial cover, not an empty centered block */
.hero-meta {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  width: 100%; max-width: var(--container);
  padding: 0 28px; box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); pointer-events: none;
}
.hero-meta span { pointer-events: auto; }

.hub { padding-bottom: 70px; }
.hub-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-top: 8px;
}
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.card.link { cursor: pointer; }

.span-2 { grid-column: span 2; }

.card-label {
  font-family: var(--serif); font-style: italic;
  font-size: 0.86rem; color: var(--muted);
}
.go { color: var(--muted); transition: color .2s var(--ease), transform .2s var(--ease); }
.card:hover .go { color: var(--text); transform: translate(2px,-2px); }

/* media card (youtube / spotify / project) */
.media {
  display: flex; flex-direction: column; overflow: hidden;
}
.media-thumb {
  position: relative; aspect-ratio: 16 / 9; background: var(--card-2);
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.media-thumb.square { aspect-ratio: 1 / 1; }
.media-thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .6s var(--ease);
}
.card:hover .media-thumb img { transform: scale(1.02); }
.thumb-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted); z-index: 0;
}
.media-thumb.no-img img { display: none; }
.thumb-fallback svg { width: 38px; height: 38px; opacity: 0.5; }
.media-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 5px; }
.media-title { font-size: 1.02rem; font-weight: 600; }
.media-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.media-meta .go { font-size: 0.86rem; }

/* spotify: horizontal compact */
.spotify { display: flex; align-items: center; gap: 14px; padding: 16px; }
.spotify .art {
  position: relative; flex: 0 0 auto; width: 66px; height: 66px;
  border-radius: 8px; overflow: hidden; background: #1a1a1a; border: 1px solid var(--border);
}
.spotify .art img { width: 100%; height: 100%; object-fit: cover; }
.spotify .art.no-img img { display: none; }
.spotify .art.no-img::after { content: "♪"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 1.3rem; }
.spotify .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spotify .info .t { font-size: 1rem; font-weight: 600; }
.spotify .info .s { font-size: 0.85rem; color: var(--muted); }

/* camera roll preview */
.roll { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.roll-head { display: flex; align-items: center; justify-content: space-between; }
.roll-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.roll-strip .mini {
  position: relative; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden;
  background: var(--card-2); border: 1px solid var(--border);
}
.roll-strip .mini img { width: 100%; height: 100%; object-fit: cover; }
.roll-strip .mini.no-img img { display: none; }

/* quick links */
.quicklinks {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.qlink {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card);
  font-size: 0.9rem; color: var(--muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.qlink:hover { color: var(--text); border-color: var(--border-hover); transform: translateY(-2px); }
.qlink svg { width: 16px; height: 16px; }

/* =========================================================
   SUBPAGE HERO + SECTIONS
   ========================================================= */
.page-hero { padding: 128px 0 24px; }
.page-hero .eyebrow { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--muted); margin-bottom: 12px; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.02; }
.page-hero p { margin-top: 14px; color: var(--muted); max-width: 56ch; }
.section { padding: 30px 0 70px; }

/* About */
.about p { font-size: 1.18rem; line-height: 1.7; max-width: 60ch; }
.about p + p { margin-top: 18px; color: var(--muted); }
.currently { margin-top: 40px; border-top: 1px solid var(--border); }
.currently li {
  display: flex; gap: 16px; align-items: baseline;
  padding: 14px 2px; border-bottom: 1px solid var(--border);
}
.currently .k { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.9rem; min-width: 88px; }
.currently .v { font-size: 1.02rem; }

/* =========================================================
   PROJECTS
   ========================================================= */
.feature {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); overflow: hidden; margin-bottom: 16px;
  transition: border-color .3s var(--ease);
}
.feature:hover { border-color: var(--border-hover); }
.feature-grid { display: grid; grid-template-columns: 1.05fr 1fr; }
.feature-shot { position: relative; background: var(--card-2); border-right: 1px solid var(--border); overflow: hidden; min-height: 280px; }
.feature-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* clean research title-card (replaces the screenshot) */
.title-card {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
  padding: 34px;
  background:
    radial-gradient(110% 80% at 50% 0%, rgba(15, 76, 154, 0.18), transparent 62%),
    linear-gradient(158deg, #050505 0%, #07111f 58%, #0b1f3a 100%);
}
.title-card .tc-title { font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 1.7rem); line-height: 1.16; color: var(--text); }
.title-card .tc-sub { font-family: var(--serif); font-style: italic; font-size: 1rem; color: #7fa8d8; }
.title-card .tc-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-top: 10px; }
.feature-shot.no-img img { display: none; }
.feature-shot .shot-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.1rem; }
.feature-text { padding: 28px; display: flex; flex-direction: column; }
.feature h2 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.18; }
.feature .desc { color: var(--muted); margin-top: 12px; font-size: 0.95rem; }
.feature .related-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
/* NeuroFlow nested build, with its own site preview */
.rb-block { display: flex; flex-direction: column; gap: 10px; }
.rb-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rb-head strong { font-size: 1rem; }
.rb-head .go { color: var(--muted); font-size: 0.82rem; transition: color .2s var(--ease), transform .2s var(--ease); }
.rb-head a.go:hover { color: var(--text); transform: translate(2px,-2px); }
.rb-desc { color: var(--muted); font-size: 0.85rem; }
/* preview embedded as a project card's top visual */
.project .site-preview { border: 0; border-radius: 0; border-bottom: 1px solid var(--border); }
.project-head a.go { transition: color .2s var(--ease), transform .2s var(--ease); }
.project-head a.go:hover { color: var(--text); transform: translate(2px,-2px); }

.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.project:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.project.sub { background: var(--card-2); }
.project-shot {
  position: relative; aspect-ratio: 16/9; background: var(--card-2);
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.project-shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .6s var(--ease); }
.project:hover .project-shot img { transform: scale(1.02); }
.shot-fallback { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; font-family: var(--serif); font-style: italic; color: var(--muted); }
.project-shot.no-img img { display: none; }
.project-shot.no-img .shot-fallback { z-index: 0; }
.project-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 9px; flex-grow: 1; }
.project-head { display: flex; align-items: center; justify-content: space-between; }
.project-head h3 { font-size: 1.1rem; font-weight: 600; }
.project-body p { color: var(--muted); font-size: 0.92rem; flex-grow: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tags span { font-size: 0.72rem; color: var(--muted); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); }

/* =========================================================
   EXPERIENCE
   ========================================================= */
.xp { border-top: 1px solid var(--border); }
.xp-row {
  display: grid; grid-template-columns: 150px 1fr; gap: 24px;
  padding: 22px 4px; border-bottom: 1px solid var(--border);
  transition: padding-left .25s var(--ease);
}
.xp-row:hover { padding-left: 12px; }
.xp-date { color: var(--muted); font-size: 0.88rem; padding-top: 2px; }
.xp-main { display: flex; flex-direction: column; gap: 2px; }
.xp-role { font-size: 1.05rem; font-weight: 600; }
@media (min-width: 760px) { .xp-role.long { white-space: nowrap; font-size: clamp(0.96rem, 1.35vw, 1.05rem); } }
@media (max-width: 759px) { .xp-role.long { white-space: normal; } }
.xp-org { font-size: 0.92rem; }
.xp-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--a, var(--muted)); margin-right: 8px; vertical-align: 1px; }
.xp-loc { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.85rem; margin-top: 1px; }
.xp-note { font-size: 0.9rem; color: var(--muted); margin-top: 7px; max-width: 70ch; }

/* =========================================================
   GEAR
   ========================================================= */
.gear-cat { margin-top: 38px; }
.gear-cat:first-of-type { margin-top: 8px; }
.gear-cat h2 {
  font-size: 1.1rem; font-weight: 600;
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.gear-cat h2 span { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.gear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gear-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.gear-item:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.gear-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gear-name { font-size: 1rem; font-weight: 600; }
.gear-go { color: var(--muted); font-size: 0.85rem; transition: color .2s var(--ease), transform .2s var(--ease); }
a.gear-item:hover .gear-go { color: var(--text); transform: translate(2px, -2px); }
.gear-spec { font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.gear-tag { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 0.82rem; color: var(--muted); }

/* =========================================================
   GALLERY (phone camera-roll grid)
   ========================================================= */
.phone-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-flow: dense; gap: 8px; }
/* container itself does not fade; its shots stagger in instead */
.phone-gallery.fade { opacity: 1; transform: none; }
.phone-gallery .shot {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); display: block; width: 100%; padding: 0; cursor: pointer;
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), border-color .3s var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.phone-gallery.in .shot { opacity: 1; transform: none; }
.phone-gallery .shot:hover { border-color: var(--border-hover); transform: translateY(-3px); transition-delay: 0s; }
/* creative spans (desktop only) */
.phone-gallery .shot.wide { grid-column: span 2; aspect-ratio: 4 / 3; }
.phone-gallery .shot.tall { grid-row: span 2; aspect-ratio: 3 / 5; }
.phone-gallery .shot.large { grid-column: span 2; grid-row: span 2; aspect-ratio: 1 / 1; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transition: transform .6s var(--ease); }
.shot:hover img { transform: scale(1.03); }
.shot.no-img img { display: none; }

/* shared hover overlay: caption + location reveal */
.ph-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1px;
  padding: 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.74), rgba(0,0,0,0.05) 55%, transparent);
  opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.shot:hover .ph-overlay, .photo-card:hover .ph-overlay { opacity: 1; }
.ph-overlay .c { font-size: 0.95rem; font-weight: 600; color: #fff; }
.ph-overlay .l { font-family: var(--serif); font-style: italic; font-size: 0.82rem; color: rgba(255,255,255,0.85); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact-lead { font-size: 1.18rem; max-width: 52ch; margin-bottom: 26px; }
.contact-links { display: flex; flex-direction: column; border-top: 1px solid var(--border); max-width: 480px; }
.contact-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; border-bottom: 1px solid var(--border);
  font-size: 1.05rem; color: var(--text);
  transition: padding-left .25s var(--ease), color .2s var(--ease);
}
.contact-links a:hover { padding-left: 12px; }
.contact-links a .ext { color: var(--muted); font-size: 0.9rem; }
.contact-links a:hover .ext { color: var(--text); }
.contact-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; border-bottom: 1px solid var(--border);
  font-size: 1.05rem; color: var(--text);
}
.contact-row .ext { color: var(--muted); font-size: 0.95rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { border-top: 1px solid var(--border); padding: 26px 0; margin-top: 30px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner span { font-size: 0.86rem; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { font-size: 0.86rem; color: var(--muted); transition: color .2s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--muted); }

/* Social icon footer */
.social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.social a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  color: var(--muted);
  border: 1px solid var(--border); border-radius: 10px;
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.social a:hover { color: var(--text); border-color: var(--border-hover); transform: translateY(-2px); }
.social svg { width: 17px; height: 17px; }

/* =========================================================
   HOME COLLAGE - "recently"
   ========================================================= */
.recently { padding: 6px 0 56px; }
.section-kicker { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.recently h2 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 26px; }
.home-collage {
  display: flex; justify-content: center; align-items: center;
  padding: 18px 0;
}
/* Crooked collage card. --py is a scroll-parallax offset set by JS;
   the base transform composes it with the card's rotation + offset. */
.photo-card {
  position: relative;
  flex: 0 0 auto;
  width: 224px; aspect-ratio: 3 / 4;
  margin-left: -42px;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  opacity: 0; /* staggered reveal, set to 1 when collage enters view */
  transform: rotate(var(--r, 0)) translateY(calc(var(--y, 0px) + var(--py, 0px)));
  transition: transform .4s var(--ease), border-color .3s var(--ease),
              box-shadow .4s var(--ease), opacity .6s var(--ease);
}
.photo-card:first-child { margin-left: 0; }
.photo-card img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  /* full color at all times (no dimming/desaturation) */
  transition: transform .7s var(--ease);
}
/* hover: noticeable lift, straighten, gentle zoom, soft shadow */
.photo-card:hover {
  transform: rotate(0deg) translateY(-16px) scale(1.05);
  border-color: var(--text);
  box-shadow: 0 30px 56px -24px rgba(0,0,0,0.95);
  z-index: 5;
}
.photo-card:hover img { transform: scale(1.04); }
.photo-card:focus-visible {
  transform: rotate(0deg) translateY(-16px) scale(1.05);
  outline: 1px solid var(--text); outline-offset: 3px; z-index: 5;
}

/* staggered entrance once the collage scrolls into view */
.home-collage.fade { opacity: 1; transform: none; } /* container itself does not fade; cards do */
.home-collage.in .photo-card { opacity: 1; }
.home-collage.in .photo-card:nth-child(1) { transition-delay: .04s; }
.home-collage.in .photo-card:nth-child(2) { transition-delay: .10s; }
.home-collage.in .photo-card:nth-child(3) { transition-delay: .16s; }
.home-collage.in .photo-card:nth-child(4) { transition-delay: .22s; }
.home-collage.in .photo-card:nth-child(5) { transition-delay: .28s; }

/* recently collage uses the standard caption + location overlay (predalina / Tampa, Florida) */
.photo-card:focus-visible .ph-overlay { opacity: 1; }

/* =========================================================
   HOME - hobbies + finance + project preview cards
   ========================================================= */
.card-pad { padding: 18px 20px; display: flex; flex-direction: column; gap: 7px; }
.hobbies-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.hobbies-list span {
  font-size: 0.85rem; color: var(--muted);
  padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px;
}
.fin-main { font-size: 1.05rem; font-weight: 600; }
.fin-sub { color: var(--muted); font-size: 0.86rem; }
.fin-highlight { font-size: 0.92rem; color: var(--text); font-weight: 500; }
.fin-port { font-size: 0.85rem; color: var(--muted); }
.fin-detail { color: var(--muted); font-size: 0.82rem; }
.fin-note { font-family: var(--serif); font-style: italic; color: rgba(156,156,156,0.75); font-size: 0.78rem; margin-top: 6px; }

.ticker-group { display: flex; flex-direction: column; gap: 7px; margin-top: 6px; }
.ticker-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ticker-label { font-family: var(--serif); font-style: italic; font-size: 0.74rem; color: var(--muted); margin-right: 2px; }
.ticker { font-size: 0.7rem; color: var(--muted); padding: 3px 9px; border: 1px solid var(--border); border-radius: 999px; letter-spacing: 0.03em; }
.ticker.core { color: var(--text); border-color: var(--border-hover); }
.fin-spark { display: block; width: 100%; height: 26px; margin: 2px 0 2px; opacity: 0.7; }

/* larger Spotify preview card */
.spotify-card { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.sc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sc-head .card-label { font-size: 0.86rem; }
.sc-head .go { color: var(--muted); font-size: 0.84rem; transition: color .2s var(--ease), transform .2s var(--ease); }
.sc-head a.go:hover { color: var(--text); transform: translate(2px,-2px); }
.sc-embed { position: relative; border-radius: 12px; overflow: hidden; background: var(--card-2); border: 1px solid var(--border); min-height: 152px; }
.sc-embed iframe { position: relative; z-index: 2; display: block; width: 100%; height: 352px; border: 0; opacity: 0; transition: opacity .4s var(--ease); }
.sc-fallback {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: center; gap: 14px; padding: 16px;
}
.sc-fallback img { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; }
.sc-fallback .fb-t { font-size: 1rem; font-weight: 600; }
.sc-fallback .fb-l { font-size: 0.82rem; color: var(--muted); }

.proj-preview .media-title { font-size: 1.05rem; }

/* =========================================================
   SITE PREVIEW (live iframe with browser chrome + fallback)
   ========================================================= */
.site-preview {
  border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  background: var(--card-2);
}
.sp-bar {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 11px; border-bottom: 1px solid var(--border); background: var(--card);
}
.sp-dots { display: flex; gap: 5px; }
.sp-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.16); display: block; }
.sp-name { font-family: var(--serif); font-style: italic; font-size: 0.74rem; color: var(--muted); }
.sp-frame { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg); }
.sp-frame iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  background: #fff; opacity: 0; transition: opacity .5s var(--ease);
  pointer-events: none;
}
.sp-frame.loaded iframe { opacity: 1; }
.sp-fallback {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; padding: 16px; text-align: center;
}
.sp-frame.loaded .sp-fallback { display: none; }
.sp-fallback img { max-width: 72px; max-height: 72px; border-radius: 14px; object-fit: contain; }
.sp-fallback .fb-name { font-size: 0.9rem; color: var(--text); font-weight: 600; }
.sp-fallback .fb-sub { font-size: 0.76rem; color: var(--muted); }

/* =========================================================
   GALLERY - featured "places lately"
   ========================================================= */
.gallery-head h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 600; letter-spacing: -0.03em; }
.places-kicker { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.95rem; margin: 44px 0 16px; }
.places-lately {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  margin-bottom: 24px;
}
.places-lately .place:first-child { grid-column: span 2; }
.place {
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; background: none; border: 0; padding: 0; text-align: left;
  color: inherit; font: inherit;
}
.place-img {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--card);
}
.places-lately .place:first-child .place-img { aspect-ratio: 16 / 10; }
.place-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  transition: transform .6s var(--ease);
}
.place:hover .place-img img { transform: scale(1.03); }
.place:hover .place-img { border-color: var(--border-hover); }
.place-cap { display: flex; align-items: baseline; gap: 8px; }
.place-cap .c { font-size: 0.92rem; color: var(--text); }
.place-cap .l { font-family: var(--serif); font-style: italic; font-size: 0.82rem; color: var(--muted); }


/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 28px;
  background: rgba(3, 3, 3, 0.92);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-fig {
  display: flex; flex-direction: column; gap: 12px;
  max-width: min(92vw, 900px); max-height: 86vh;
}
.lightbox-fig img {
  max-width: 100%; max-height: 72vh; object-fit: contain;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.lightbox figcaption { display: flex; align-items: baseline; gap: 10px; }
.lightbox figcaption .c { font-size: 1rem; color: var(--text); }
.lightbox figcaption .l { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 0.9rem; }
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent; color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 1.2rem; cursor: pointer;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.lightbox-close:hover { border-color: var(--border-hover); transform: scale(1.05); }
body.no-scroll { overflow: hidden; }

/* =========================================================
   MICRO-INTERACTIONS (premium card hover, coordinates, intro)
   ========================================================= */

/* Tactile card hover: soft border glow + a masked diagonal light sweep.
   Applied to project, gear and home hub cards. Restrained, no color. */
.project, .gear-item, .hub-grid .card { position: relative; }
.project::after, .gear-item::after, .hub-grid .card::after {
  content: ""; position: absolute; inset: 0; z-index: 3;
  border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(245,245,240,0.14) 50%, transparent 70%);
  background-size: 230% 100%; background-position: 160% 0;
  opacity: 0;
  transition: opacity .35s var(--ease), background-position .85s var(--ease);
}
.project:hover::after, .gear-item:hover::after, .hub-grid .card:hover::after,
.project:focus-within::after, .gear-item:focus-within::after, .hub-grid .card:focus-within::after {
  opacity: 1; background-position: -40% 0;
}
/* clearer lift + brighter border + visible glow on hover/focus */
.project:hover, .gear-item:hover, .hub-grid .card:hover,
.project:focus-within, .gear-item:focus-within, .hub-grid .card:focus-within {
  transform: translateY(-6px);
  border-color: var(--text);
  box-shadow: 0 0 0 1px rgba(245,245,240,0.14), 0 26px 52px -22px rgba(0,0,0,0.95);
}

/* International "Now / Coordinates" status card */
.coordinates { padding: 18px 0 80px; }
/* centered centerpiece: present but quieter than the hero */
.coord-card {
  position: relative; overflow: hidden;
  max-width: 760px; margin: 0 auto;
  border: 1px solid var(--border-hover); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
  padding: 30px 32px 32px;
}
/* slow status "scanline" drifting across the card, very low opacity */
.coord-card::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -30%;
  width: 30%; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245,245,240,0.07), transparent);
  animation: coordScan 7s linear infinite;
}
@keyframes coordScan { to { transform: translateX(440%); } }
.coord-top {
  display: flex; align-items: center; gap: 11px;
  padding-bottom: 18px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.coord-live {
  width: 9px; height: 9px; border-radius: 50%; background: var(--text);
  box-shadow: 0 0 0 0 rgba(245,245,240,0.5);
  animation: coordPulse 2.4s var(--ease) infinite;
}
@keyframes coordPulse {
  0% { box-shadow: 0 0 0 0 rgba(245,245,240,0.5); }
  70% { box-shadow: 0 0 0 9px rgba(245,245,240,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,245,240,0); }
}
.coord-label { font-size: 0.74rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--text); }
.coord-coords { margin-left: auto; font-size: 0.74rem; letter-spacing: 0.12em; color: var(--muted); }
.coord-place {
  font-family: var(--serif); font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: -0.015em; line-height: 1.05; margin: 18px 0 6px;
}
.coord-place span { color: var(--muted); margin: 0 8px; }
.coord-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0 7px; margin-top: 14px; }
.coord-tags li { font-size: 0.95rem; color: var(--muted); }
.coord-tags li:not(:last-child)::after { content: "·"; margin-left: 6px; color: var(--border-hover); }
/* tags slide in gently, staggered, when the card reveals */
.coordinates.in .coord-tags li { animation: coordTag .6s var(--ease) both; }
.coordinates.in .coord-tags li:nth-child(1) { animation-delay: .12s; }
.coordinates.in .coord-tags li:nth-child(2) { animation-delay: .19s; }
.coordinates.in .coord-tags li:nth-child(3) { animation-delay: .26s; }
.coordinates.in .coord-tags li:nth-child(4) { animation-delay: .33s; }
.coordinates.in .coord-tags li:nth-child(5) { animation-delay: .40s; }
@keyframes coordTag { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* First-load identity moment (home only). Fades out, never blocks nav. */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: #050505;
  opacity: 1; transition: opacity .6s var(--ease);
}
.intro.done { opacity: 0; pointer-events: none; }
.intro-inner { text-align: center; animation: introRise .7s var(--ease) both; }
.intro-name { display: block; font-family: var(--serif); font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: -0.02em; }
.intro-loc { display: block; margin-top: 8px; font-size: 0.78rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
@keyframes introRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 880px) {
  .hub-grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 2; }
  .projects { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-shot { border-right: 0; border-bottom: 1px solid var(--border); aspect-ratio: 16/9; min-height: 0; }
  .gear-grid { grid-template-columns: repeat(2, 1fr); }
  .phone-gallery { grid-template-columns: repeat(3, 1fr); }
  .phone-gallery .shot.wide, .phone-gallery .shot.tall, .phone-gallery .shot.large { grid-column: auto; grid-row: auto; aspect-ratio: 3 / 4; }
  .places-lately { grid-template-columns: 1fr 1fr; }
  .places-lately .place:first-child { grid-column: span 2; }
  .photo-card { width: 200px; margin-left: -36px; }
}

@media (max-width: 600px) {
  .nav.solid, .nav { background: rgba(5,5,5,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
  .nav-toggle { display: flex; position: relative; z-index: 70; }

  /* Fullscreen editorial nav panel */
  .nav-menu {
    position: fixed; inset: 0; z-index: 60;
    flex-direction: column; align-items: flex-start; justify-content: center;
    gap: 4px; padding: 96px 34px 48px; height: 100dvh;
    background:
      radial-gradient(120% 70% at 100% 0%, rgba(255,255,255,0.05), transparent 60%),
      #050505;
    border: 0; border-left: 1px solid var(--border);
    opacity: 0; transform: translateX(6%); pointer-events: none;
    transition: opacity .35s var(--ease), transform .45s var(--ease);
  }
  .nav-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-link {
    font-size: 1.7rem; padding: 10px 0; color: var(--text);
    opacity: 0; transform: translateX(16px);
    transition: opacity .4s var(--ease), transform .4s var(--ease), color .2s var(--ease);
  }
  .nav-link::after { display: none; }
  /* links stagger in after the panel opens */
  .nav-menu.open .nav-link { opacity: 1; transform: none; }
  .nav-menu.open li:nth-child(1) .nav-link { transition-delay: .08s; }
  .nav-menu.open li:nth-child(2) .nav-link { transition-delay: .14s; }
  .nav-menu.open li:nth-child(3) .nav-link { transition-delay: .20s; }
  .nav-menu.open li:nth-child(4) .nav-link { transition-delay: .26s; }
  .nav-menu.open li:nth-child(5) .nav-link { transition-delay: .32s; }
  .nav-menu.open li:nth-child(6) .nav-link { transition-delay: .38s; }

  /* mobile: tighter hero so it doesn't feel over-spaced; hide masthead row */
  .home-hero { min-height: 90svh; padding: 92px 0 70px; }
  .hero-meta { display: none; }
  .page-hero { padding: 104px 0 18px; }
  .hub-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .gear-grid { grid-template-columns: 1fr; }
  .phone-gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .xp-row { grid-template-columns: 1fr; gap: 4px; }
  .xp-row:hover { padding-left: 4px; }
  .xp-date { padding-top: 0; }
  .container { padding: 0 20px; }

  /* collage becomes a horizontal scroll strip */
  .home-collage {
    justify-content: flex-start;
    overflow-x: auto; overflow-y: hidden;
    gap: 12px; padding: 4px 0 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .home-collage::-webkit-scrollbar { display: none; }
  .photo-card {
    width: 70vw; margin-left: 0;
    transform: none; scroll-snap-align: center;
  }
  .photo-card:hover { transform: translateY(-4px); }

  .places-lately { grid-template-columns: 1fr; }
  .places-lately .place:first-child { grid-column: auto; }
  .places-lately .place:first-child .place-img { aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .fade { opacity: 1; transform: none; }
  .phone-gallery .shot { opacity: 1 !important; transform: none !important; }
  .caret { animation: none; opacity: 1; }
  /* new motion upgrades: keep content visible, drop ambient motion */
  .photo-card { opacity: 1 !important; }
  .coord-card::before { display: none; }
  .coord-live { animation: none; }
  .coordinates .coord-tags li { animation: none !important; opacity: 1 !important; }
  .intro { display: none !important; }
  /* mobile menu: show links instantly, no staggered delay */
  .nav-menu.open .nav-link { transition-delay: 0s !important; }
  .photo-card, .home-collage .photo-card { transition-delay: 0s !important; }
}

/* Hero caret: intentionally keep blinking even under reduced motion.
   It is a 3px opacity-only cursor (no movement), placed after the
   reduced-motion block with higher specificity + !important so it wins. */
.type .caret {
  animation: caretBlink 0.9s ease-in-out infinite !important;
  opacity: 1;
}
