/* ============================================================
   ttv.lt — palette pulled from the app icon
   ============================================================ */
:root {
  --bg:        #0d0d0f;   /* icon background */
  --bg-elev:   #16161a;   /* raised surfaces */
  --bg-alt:    #111114;   /* alternating sections */
  --line:      #26262c;   /* hairlines / borders */
  --text:      #ececef;   /* primary text */
  --muted:     #9a9aa2;   /* secondary text */
  --gray:      #c9c9cf;   /* logo arc gray */
  --cyan:      #a7d4de;   /* cyan hex accent */
  --amber:     #f2a63c;   /* amber hex accent */
  --amber-dim: #c9862c;

  --maxw: 1120px;
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 15, 0.72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: block; transition: transform .3s ease; }
.site-header.scrolled .brand-mark { transform: scale(.88); }
.brand-text { font-size: 20px; letter-spacing: -.02em; }
.brand-text .dot { color: var(--amber); }
.brand-sm .brand-mark { width: 28px; height: 28px; }
.brand-sm .brand-text { font-size: 17px; }

.nav { display: flex; gap: 6px; }
.nav a {
  position: relative;
  padding: 8px 14px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--muted);
  transition: color .2s ease, background .2s ease;
}
.nav a:hover { color: var(--text); background: var(--bg-elev); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { position: relative; overflow: hidden; padding: 120px 0 100px; }
.hero-glow {
  position: absolute; top: -30%; right: -10%;
  width: 720px; height: 720px; pointer-events: none;
  background: radial-gradient(circle at center, rgba(167,212,222,.16), transparent 60%),
              radial-gradient(circle at 60% 60%, rgba(242,166,60,.14), transparent 60%);
  filter: blur(20px);
  animation: glowBreathe 10s ease-in-out infinite;
}
@keyframes glowBreathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .78; transform: scale(1.07); }
}
.hero-inner { position: relative; }

/* Staggered entrance for the hero text, on load (not scroll-triggered — it's already in view) */
@keyframes heroUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.eyebrow, .hero-title, .hero-lead, .hero-cta {
  animation: heroUp .8s cubic-bezier(.2,.8,.25,1) both;
}
.eyebrow    { animation-delay: .05s; }
.hero-title { animation-delay: .18s; }
.hero-lead  { animation-delay: .34s; }
.hero-cta   { animation-delay: .48s; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 14px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 26px;
}
.eyebrow .sep { color: var(--line); }
.hex { width: 12px; height: 13px; display: inline-block; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hex-cyan { background: var(--cyan); }
.hex-amber { background: var(--amber); }

.hero-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(40px, 7vw, 76px); line-height: 1.02;
  letter-spacing: -.03em; margin-bottom: 24px;
}
.hero-title em { font-style: normal; color: var(--cyan); }
.hero-title em:last-of-type { color: var(--amber); }
.hero-title em.cy { color: var(--cyan); }
.hero-title em.am { color: var(--amber); }

.hero-lead { max-width: 560px; font-size: 19px; color: var(--muted); margin-bottom: 36px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 10px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: .2s ease;
}
.btn-primary { background: var(--amber); color: #1a1205; }
.btn-primary:hover { background: #ffb84d; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gray); background: var(--bg-elev); }
.btn-block { width: 100%; }
.btn-download { background: var(--bg); border-color: var(--line); color: var(--text); white-space: nowrap; }
.btn-download:hover { border-color: var(--cyan); color: var(--cyan); }

/* ============ SECTIONS ============ */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { margin-bottom: 48px; }
.section-num {
  font-family: var(--display); font-size: 14px; font-weight: 600;
  color: var(--amber); letter-spacing: .1em;
}
.section-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 4vw, 42px); letter-spacing: -.02em; margin-top: 4px;
}
.section-sub { color: var(--muted); margin-top: 10px; font-size: 17px; }

/* ============ ABOUT ============ */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.about-grid.has-portrait { grid-template-columns: 0.85fr 1.5fr 1fr; gap: 44px; }
.about-text .lead { font-size: 21px; color: var(--text); margin-bottom: 20px; }
.about-text p { color: var(--muted); margin-bottom: 18px; }

/* portrait — cyan→amber gradient frame */
.about-portrait { max-width: 340px; width: 100%; }
.about-portrait-frame {
  position: relative; aspect-ratio: 4 / 5; border-radius: 20px; padding: 2px;
  background: linear-gradient(150deg, var(--cyan), var(--amber));
  box-shadow: 0 24px 60px -28px rgba(0,0,0,.75);
}
.about-portrait-frame img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 18px; display: block;
}

.about-side { display: flex; flex-direction: column; gap: 18px; }
.stat-cards { display: flex; flex-direction: column; gap: 14px; }
.stat {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 18px 20px;
  display: flex; flex-direction: column;
}
.stat-num { font-family: var(--display); font-size: 32px; font-weight: 700; }
.stat-num .plus { color: var(--cyan); }
.stat-label { color: var(--muted); font-size: 14px; }

.skill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.skill-list li {
  font-size: 13px; color: var(--gray);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px;
}

/* ============ CARDS (Projects & Developing) ============ */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: #34343c; }

.card-media {
  aspect-ratio: 16 / 10; position: relative;
  background:
    linear-gradient(135deg, rgba(167,212,222,.10), rgba(242,166,60,.06)),
    repeating-linear-gradient(45deg, #1a1a1f 0 12px, #17171b 12px 24px);
  display: flex; align-items: flex-end; padding: 14px;
}
.media-dev {
  background:
    linear-gradient(135deg, rgba(242,166,60,.14), rgba(167,212,222,.05)),
    repeating-linear-gradient(45deg, #1a1a1f 0 12px, #17171b 12px 24px);
}
.card-tag {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
  background: rgba(13,13,15,.7); color: var(--cyan);
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
  backdrop-filter: blur(4px);
}
.card-tag.tag-amber { color: var(--amber); }

.card-body { padding: 18px 20px 22px; }
.card-body h3 { font-family: var(--display); font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.card-body p {
  color: var(--muted); font-size: 15px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}

.tech-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tech-row span {
  font-size: 12px; color: var(--gray);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 6px; padding: 3px 9px;
}

/* clickable card + read-more cue */
.card-open { cursor: pointer; }
.card-open:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.card-more {
  display: inline-block; margin-top: 14px;
  font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--cyan);
  opacity: .85; transition: transform .2s ease;
}
.card-open:hover .card-more { transform: translateX(3px); opacity: 1; }
.card-dev .card-more { color: var(--amber); }

/* ============ MODAL ============ */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,5,7,.72); backdrop-filter: blur(6px); animation: fadeIn .2s ease; }
.modal-dialog {
  position: relative; z-index: 1; width: 100%; max-width: 680px; max-height: 88vh;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  animation: popIn .24s cubic-bezier(.2,.8,.25,1);
}
.modal-scroll { overflow: auto; }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: rgba(13,13,15,.6); border: 1px solid var(--line); color: var(--text);
  font-size: 22px; line-height: 1; backdrop-filter: blur(4px);
}
.modal-close:hover { border-color: var(--gray); color: #fff; }
.modal-hero { height: 260px; background-size: cover; background-position: center; }
.modal-text { padding: 26px 30px 32px; }
.modal-title { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 6px; }
.modal-sub { color: var(--muted); font-size: 16px; margin-bottom: 14px; }
.modal-body { color: var(--gray); font-size: 16px; line-height: 1.7; }
.modal-body p { margin: 0 0 1em; }
.modal-body h2 { font-family: var(--display); font-size: 22px; margin: .6em 0 .3em; color: var(--text); }
.modal-body h3 { font-family: var(--display); font-size: 18px; margin: .6em 0 .3em; color: var(--text); }
.modal-body ul, .modal-body ol { padding-left: 22px; margin: 0 0 1em; }
.modal-body li { margin-bottom: .3em; }
.modal-body a { color: var(--cyan); text-decoration: underline; }
.modal-body blockquote { border-left: 3px solid var(--cyan); margin: 1em 0; padding-left: 14px; color: var(--muted); }
body.modal-open { overflow: hidden; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.98) } to { opacity: 1; transform: none } }

/* ============ PHOTO GALLERIES ============ */
.gallery-block { margin-bottom: 48px; }
.gallery-block:last-child { margin-bottom: 0; }
.gallery-head { margin-bottom: 18px; }
.gallery-head h3 { font-family: var(--display); font-size: 22px; font-weight: 600; }
.gallery-head p { color: var(--muted); margin-top: 4px; }

.photo-grid {
  display: grid; gap: 10px; margin: 18px 0;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.modal-body .photo-grid, .generic-body .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.gphoto {
  display: block; position: relative; aspect-ratio: 1 / 1;
  border-radius: 10px; overflow: hidden; background: var(--bg-elev);
  border: 1px solid var(--line); cursor: zoom-in;
}
.gphoto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease, opacity .2s ease; }
.gphoto:hover img { transform: scale(1.06); }
.gphoto::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(13,13,15,.4));
  transition: opacity .2s ease;
}
.gphoto:hover::after { opacity: 1; }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: rgba(5,5,7,.94); backdrop-filter: blur(4px);
  animation: fadeIn .18s ease; user-select: none;
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-figure img {
  max-width: 92vw; max-height: 82vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.8);
}
.lb-figure figcaption { color: var(--gray); font-size: 14px; text-align: center; max-width: 640px; }
.lb-btn {
  position: absolute; z-index: 2; cursor: pointer; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px); border-radius: 50%;
  display: grid; place-items: center; transition: background .15s ease, transform .15s ease;
}
.lb-btn:hover { background: rgba(255,255,255,.18); }
.lb-close { top: 20px; right: 20px; width: 46px; height: 46px; font-size: 26px; line-height: 1; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 34px; line-height: 1; }
.lb-nav:hover { transform: translateY(-50%) scale(1.06); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: var(--gray); font-family: var(--display); font-size: 14px;
  background: rgba(13,13,15,.5); border: 1px solid var(--line);
  padding: 5px 14px; border-radius: 999px;
}
body.lb-open { overflow: hidden; }
@media (max-width: 640px) {
  .lb-nav { width: 44px; height: 44px; font-size: 28px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-close { top: 12px; right: 12px; }
}

/* ============ YOUTUBE EMBEDS ============ */
/* video / playlist = cyan (camera/watch), channel = amber (link-out), matching the hero eyebrow's own color split */

/* These cards live inside prose (.modal-body / .generic-body already style
   bare <a> with an underline for regular links). Neutralise that here with
   higher specificity so the widgets always render on their own terms,
   regardless of where they're embedded. */
.modal-body .yt-widget, .modal-body .yt-widget a,
.generic-body .yt-widget, .generic-body .yt-widget a,
.yt-widget, .yt-widget a {
  text-decoration: none;
}

.yt-widget {
  display: block; margin: 20px 0; border-radius: 16px; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line);
}
.yt-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.yt-meta { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.yt-badge {
  flex: none; font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; padding: 5px 10px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.yt-badge-video, .yt-badge-playlist { color: var(--cyan); border-color: rgba(167,212,222,.4); }
.yt-badge-channel { color: var(--amber); border-color: rgba(242,166,60,.4); }
.yt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.yt-text strong { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-text span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-ext { flex: none; font-size: 13px; font-weight: 600; color: var(--cyan); }
.yt-ext:hover { text-decoration: underline; }

/* playlist — a shelf of real video cards, no embedded player (see index.php comment) */
.yt-playlist-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.yt-playlist-head h4 {
  flex: 1; min-width: 0; font-family: var(--display); font-size: 15px; font-weight: 600;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.yt-playlist-shelf {
  display: flex; gap: 12px; overflow-x: auto; padding: 10px 16px 16px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.yt-playlist-shelf::-webkit-scrollbar { height: 6px; }
.yt-playlist-shelf::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.yt-plitem { flex: none; width: 160px; scroll-snap-align: start; }
.yt-plitem-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px;
  overflow: hidden; background-size: cover; background-position: center; background-color: var(--bg);
}
.yt-plitem-thumb::after {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .15s ease;
  background: linear-gradient(180deg, transparent 55%, rgba(13,13,15,.55));
}
.yt-plitem:hover .yt-plitem-thumb::after { opacity: 1; }
.yt-plitem-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; opacity: 0; transform: scale(.85);
  transition: opacity .15s ease, transform .15s ease;
}
.yt-plitem:hover .yt-plitem-play { opacity: 1; transform: scale(1); }
.yt-plitem-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: 8px; font-size: 12.5px; line-height: 1.4; color: var(--gray);
}
.yt-playlist-empty-note { padding: 0 16px 16px; font-size: 13px; color: var(--muted); }
.yt-playlist-empty-note a { color: var(--cyan); }

/* channel card — cover backdrop, gradient-ring avatar (echoes the About portrait), clear CTA */
.yt-channel { position: relative; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.yt-channel:hover { border-color: var(--gray); transform: translateY(-2px); }
.yt-channel:hover .yt-channel-cta { color: #ffb84d; }

.yt-channel-cover {
  position: relative; height: 108px; background-size: cover; background-position: center; background-color: var(--bg);
}
.yt-channel-cover::before {
  content: ""; position: absolute; inset: 0; background-size: cover; background-position: center;
  background-image: inherit; filter: blur(22px) brightness(.5) saturate(1.25); transform: scale(1.25);
}
.yt-channel-kind {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  font-family: var(--display); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--amber); background: rgba(13,13,15,.55); border: 1px solid rgba(242,166,60,.4);
  padding: 4px 9px; border-radius: 999px; backdrop-filter: blur(4px);
}
.yt-channel-body { position: relative; padding: 0 20px 20px; margin-top: -32px; }
.yt-channel-avatar-ring {
  display: inline-block; padding: 2px; border-radius: 50%; margin-bottom: 12px;
  background: linear-gradient(150deg, var(--cyan), var(--amber));
  box-shadow: 0 8px 20px rgba(0,0,0,.45);
}
.yt-channel-avatar {
  width: 72px; height: 72px; border-radius: 50%; background-size: cover; background-position: center;
  background-color: var(--bg); border: 3px solid var(--bg-elev); display: block;
}
.yt-channel-text h4 { font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 6px; letter-spacing: -.01em; }
.yt-channel-text p {
  color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.yt-channel-cta { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--amber); transition: color .15s ease; }

/* fallback (resolution failed / not yet available) */
.yt-fallback {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; margin: 10px 0;
  border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--line);
  color: var(--text); font-size: 14px; font-weight: 600;
}
.yt-fallback:hover { border-color: var(--cyan); color: var(--cyan); }
.yt-fallback-icon { color: var(--cyan); }

@media (max-width: 720px) {
  .yt-meta { padding: 10px 12px; gap: 8px; }
  .yt-channel-avatar { width: 58px; height: 58px; }
  .yt-channel-body { padding: 0 16px 16px; margin-top: -26px; }
}

/* ============ DOWNLOADS ============ */
.dl-list { display: flex; flex-direction: column; gap: 14px; }
.dl-row {
  display: flex; align-items: center; gap: 20px;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px;
  transition: border-color .2s ease;
}
.dl-row:hover { border-color: #34343c; }
.dl-icon {
  flex: none; width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center; font-size: 26px; color: var(--cyan);
  background: var(--bg); border: 1px solid var(--line); overflow: hidden;
}
.dl-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-info { flex: 1; min-width: 0; }
.dl-info h3 { font-family: var(--display); font-size: 18px; font-weight: 600; }
.dl-ver { font-size: 12px; color: var(--amber); font-weight: 600; margin-left: 6px; }
.dl-info p { color: var(--muted); font-size: 15px; margin: 2px 0 8px; }
.dl-body { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 2px 0 10px; }
.dl-body p { margin: 0 0 8px; }
.dl-body ul, .dl-body ol { padding-left: 20px; margin: 0 0 8px; }
.dl-body a { color: var(--cyan); text-decoration: underline; }
.dl-body .photo-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 12px 0 8px; }
.dl-body .yt-widget { margin: 12px 0; }
.dl-body .yt-widget, .dl-body .yt-widget a, .dl-body .gphoto { text-decoration: none; }
.dl-body .yt-ext { color: var(--cyan); }
.dl-meta { display: flex; gap: 16px; }
.dl-meta span { font-size: 13px; color: var(--gray); }

/* ============ CONTACTS ============ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.contact-card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s ease;
}
a.contact-card:hover { border-color: var(--cyan); }
.contact-label { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.contact-value { font-family: var(--display); font-size: 17px; font-weight: 600; }
.contact-social { grid-column: 1 / -1; }
.contact-links { display: flex; gap: 16px; flex-wrap: wrap; }
.contact-links a { color: var(--cyan); font-weight: 500; }
.contact-links a:hover { text-decoration: underline; }

.contact-form { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; color: var(--text);
  font-family: inherit; font-size: 15px; resize: vertical;
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 12px; text-align: center; }

/* ============ FOOTER ============ */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-copy { color: var(--muted); font-size: 14px; }

/* ============ REVEAL ANIMATION ============ */
/* Uses `animation` (not `transition`) so it never collides with a component's
   own hover transition (e.g. .card's transform/border-color on :hover) — the
   two mechanisms are independent and can coexist on the same element. */
[data-reveal] { opacity: 0; transform: translateY(18px); }
[data-reveal].in {
  animation: revealIn .6s cubic-bezier(.2,.8,.25,1) both;
  animation-delay: calc(var(--stagger, 0) * 70ms);
}
@keyframes revealIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
  [data-reveal].in { animation: none; }
  html { scroll-behavior: auto; }
  .eyebrow, .hero-title, .hero-lead, .hero-cta, .hero-glow { animation: none; opacity: 1; transform: none; }
  .nav a { animation: none !important; opacity: 1; transform: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .about-grid,
  .about-grid.has-portrait { grid-template-columns: 1fr; gap: 32px; }
  .about-portrait { max-width: 300px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* Full-height solid overlay below the sticky header — no more shrink-to-fit
     panel with page content bleeding through beneath it. */
  .nav {
    /* .site-header's backdrop-filter makes it a new containing block for
       fixed descendants, so `bottom:0` would resolve against the header's own
       68px box, not the viewport — use an explicit viewport-relative height
       instead (unaffected by that quirk). */
    position: fixed; top: 68px; left: 0; right: 0; z-index: 55;
    height: calc(100vh - 68px); height: calc(100dvh - 68px);
    flex-direction: column; gap: 0;
    background: var(--bg); /* fully solid — no ghosting of page content behind it */
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 6px 22px 28px; overflow-y: auto;
    counter-reset: nav-i;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .nav.open {
    opacity: 1; visibility: visible; transform: translateY(0);
    transition: opacity .25s ease, transform .25s ease, visibility 0s linear 0s;
  }
  .nav a {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 2px; border-radius: 0; border-bottom: 1px solid var(--line);
    font-family: var(--display); font-size: 21px; font-weight: 600; color: var(--text);
    opacity: 0; transform: translateY(10px);
  }
  .nav a::before {
    counter-increment: nav-i; content: counter(nav-i, decimal-leading-zero);
    font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--amber);
  }
  .nav a:last-child { border-bottom: none; }
  .nav a:hover { background: none; color: var(--amber); }
  .nav a.active { color: var(--amber); }
  .nav a.active::after { display: none; }
  .nav.open a {
    animation: navLinkIn .5s cubic-bezier(.2,.8,.25,1) forwards;
    animation-delay: calc(var(--nav-i, 0) * 60ms + 60ms);
  }
  @keyframes navLinkIn { to { opacity: 1; transform: none; } }

  .nav-toggle { display: flex; position: relative; z-index: 56; }
  body.nav-locked { overflow: hidden; }

  .hero { padding: 80px 0 64px; }
  .section { padding: 64px 0; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-dialog { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-hero { height: 190px; }
  .modal-text { padding: 22px 20px 28px; }
  .modal-title { font-size: 23px; }
  .dl-row { flex-wrap: wrap; }
  .dl-row .btn-download { width: 100%; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
}
