/* ════════════════════════════════════════════════════════════════════════════
   HOME — "the study desk"
   An editorial cover page: an oversized serif headline beside a desk of tilted
   index cards, then the four tracks as a numbered magazine index.

   Stays inside the brand — same cream paper, burnt-orange accent, and the
   Playfair Display + DM Sans pair the logo and every other screen already use.
   Only global tokens for colour, so dark mode needs no second copy of the page;
   per-track colour comes from --c, set inline from HOME_GROUPS.
   Every class is prefixed hx- so nothing here can leak into another screen.
   ════════════════════════════════════════════════════════════════════════════ */

#home-screen {
  --hx-ink: var(--text);
  --hx-paper: var(--surface);
  --hx-line: var(--border);
  --hx-ease: cubic-bezier(.2, .7, .2, 1);
  position: relative;
  max-width: 1140px;
  padding-top: 8px;
}

/* Paper: a faint dot grid and grain behind the page. Both are fixed to the
   viewport and fade out through a radial mask, so there are no visible edges
   and nothing sits outside the page to cause sideways scrolling on a phone.
   They only exist while the home screen is shown — they are its pseudo-
   elements, and the screen is display:none otherwise. */
#home-screen::before,
#home-screen::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
#home-screen::before {
  background-image: radial-gradient(color-mix(in srgb, var(--hx-ink) 13%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 0%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 75% 70% at 50% 0%, #000 30%, transparent 85%);
}
/* Grain, very quietly, so the flat cream reads as paper. */
#home-screen::after {
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: 40px;
  padding: 44px 0 36px;
}

/* Greeting — a serif line with a small time-of-day mark, not a label. */
.hx-greet {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--text-muted);
}
.hx-greet-icon {
  --tint: var(--accent);
  --wash: var(--accent-pale);
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--wash);
  color: var(--tint);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tint) 18%, transparent) inset;
}
.hx-greet-icon svg {
  width: 26px; height: 26px;
  overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
/* Each part of the day has its own light — so the icon changes colour, not
   just shape, as the day goes on. */
.hx-greet-icon[data-part="morning"]   { --tint: #E0843A; --wash: #FFEBD6; }   /* dawn peach   */
.hx-greet-icon[data-part="afternoon"] { --tint: #D99800; --wash: #FFF4C7; }   /* midday gold  */
.hx-greet-icon[data-part="evening"]   { --tint: #D4504A; --wash: #FDE2DE; }   /* sunset coral */
.hx-greet-icon[data-part="night"]     { --tint: #5A5AD2; --wash: #E6E6FA; }   /* night indigo */
html[data-theme="dark"] .hx-greet-icon[data-part="morning"]   { --tint: #FFAE6B; --wash: rgba(255,174,107,.14); }
html[data-theme="dark"] .hx-greet-icon[data-part="afternoon"] { --tint: #FFD24A; --wash: rgba(255,210,74,.13); }
html[data-theme="dark"] .hx-greet-icon[data-part="evening"]   { --tint: #FF8A7A; --wash: rgba(255,138,122,.14); }
html[data-theme="dark"] .hx-greet-icon[data-part="night"]     { --tint: #A9A9FF; --wash: rgba(169,169,255,.14); }

/* Motion: the sunrise arrow drifts up, the sunset arrow down, the midday sun
   turns slowly, and the night stars twinkle. */
.hx-greet-icon[data-part="morning"] .hx-arrow { animation: hx-rise-arrow 2.8s ease-in-out infinite; }
.hx-greet-icon[data-part="evening"] .hx-arrow { animation: hx-sink-arrow 2.8s ease-in-out infinite; }
.hx-greet-icon[data-part="afternoon"] svg     { animation: hx-spin 24s linear infinite; }
.hx-greet-icon[data-part="night"] .hx-star    { animation: hx-twinkle 2.4s ease-in-out infinite; }
.hx-greet-icon[data-part="night"] .hx-star-2  { animation-delay: -1.2s; }

.hx-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: clamp(3rem, 7.2vw, 5.6rem);
  line-height: .96;
  letter-spacing: -.035em;
  color: var(--hx-ink);
}
.hx-line { display: block; }
.hx-line-em em {
  position: relative;
  font-style: italic;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
/* A hand-drawn underline under the brand line. */
.hx-line-em em::after {
  content: '';
  position: absolute;
  left: 2%; right: 2%; bottom: -.06em;
  height: .14em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 60 2, 120 11, 180 5 S 270 3, 298 7' fill='none' stroke='%23D4621A' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: .55;
  transform-origin: left center;
  animation: hx-draw .9s .75s var(--hx-ease) both;
}

.hx-lede {
  max-width: 470px;
  margin: 26px 0 0;
  font-size: 1.04rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.hx-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hx-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-family: inherit;
  font-size: .94rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s var(--hx-ease), box-shadow .2s var(--hx-ease),
              background .2s, border-color .2s;
}
.hx-btn-primary {
  border: 0;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 24px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.hx-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 16px 30px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.hx-btn-ghost {
  border: 1px solid var(--hx-line);
  background: var(--hx-paper);
  color: var(--hx-ink);
}
.hx-btn-ghost:hover { border-color: var(--hx-ink); transform: translateY(-2px); }
.hx-btn:focus-visible { outline: 3px solid var(--accent-pale); outline-offset: 3px; }

.hx-stats {
  display: flex;
  gap: 0;
  margin: 34px 0 0;
  padding-top: 22px;
  border-top: 1px dashed var(--hx-line);
}
.hx-stats > div { padding-right: 26px; margin-right: 26px; border-right: 1px solid var(--hx-line); }
.hx-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hx-stats dt {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--hx-ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.hx-stats dd {
  margin: 6px 0 0;
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── The desk ─────────────────────────────────────────────────────────────── */
.hx-desk {
  position: relative;
  height: 430px;
}
/* A soft pool of warm light the cards sit in. */
.hx-desk::before {
  content: '';
  position: absolute;
  inset: 8% 4% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
  filter: blur(8px);
}
.hx-card {
  --r: 0deg;
  position: absolute;
  width: 214px;
  padding: 16px 16px 14px;
  border: 1px solid var(--hx-line);
  border-radius: 16px;
  background:
    linear-gradient(transparent 29px, color-mix(in srgb, var(--c) 18%, transparent) 30px, transparent 31px) 0 38px / 100% 22px,
    var(--hx-paper);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 40px -18px rgba(44, 36, 24, .35), 0 2px 6px rgba(44, 36, 24, .06);
  transform: rotate(var(--r));
  animation: hx-card-in .8s var(--hx-ease) both, hx-float 7s ease-in-out infinite;
}
.hx-card::before {   /* coloured top edge, like a tabbed index card */
  content: '';
  position: absolute;
  left: 16px; right: 16px; top: -1px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: var(--c);
}
.hx-card img {
  display: block;
  width: 54px; height: 54px;
  object-fit: contain;
  margin-bottom: 30px;
}
.hx-card span {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hx-ink);
}
.hx-card b {
  position: absolute;
  top: 14px; right: 16px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--c);
}
.hx-card-1 { --r: -7deg;  top: 18px;  left: 4%;   animation-delay: .15s, 0s;   }
.hx-card-2 { --r:  5deg;  top: 0;     right: 2%;  animation-delay: .25s, -2s;  }
.hx-card-3 { --r:  4deg;  bottom: 22px; left: 12%; animation-delay: .35s, -4s; }
.hx-card-4 { --r: -4deg;  bottom: 4px;  right: 8%; animation-delay: .45s, -1s; z-index: 2; }

.hx-desk-note {
  position: absolute;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  z-index: 3;
  padding: 8px 14px;
  border-radius: 4px;
  background: #F6D776;
  color: #4A3A12;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: .86rem;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 10px 20px -10px rgba(74, 58, 18, .5);
  animation: hx-note-in .7s .9s var(--hx-ease) both;
}

/* ── Resume card, restyled as a dark bookmark ─────────────────────────────── */
#home-screen .pw-resume-card {
  margin: 4px 0 56px;
  padding: 22px 26px 22px 30px;
  border: 1px solid #2E2519;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 55%),
    #1F1912;
  color: #F6EFE4;
  box-shadow: 0 24px 48px -28px rgba(20, 14, 8, .7);
  overflow: hidden;
}
#home-screen .pw-resume-card::before {   /* the bookmark ribbon */
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--accent);
}
#home-screen .pw-resume-card:hover { transform: translateY(-3px); box-shadow: 0 30px 56px -28px rgba(20, 14, 8, .8); }
#home-screen .pw-resume-icon { width: 54px; height: 54px; border-radius: 15px; border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
#home-screen .pw-resume-icon img { width: 46px; height: 46px; }
#home-screen .pw-resume-label { color: var(--accent-light); opacity: 1; letter-spacing: .1em; }
#home-screen .pw-resume-title { font-size: 1.5rem; }
#home-screen .pw-resume-sub { color: rgba(246, 239, 228, .65); opacity: 1; }
#home-screen .pw-resume-go {
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: .9rem;
  opacity: 1;
  transition: transform .2s var(--hx-ease);
}
#home-screen .pw-resume-card:hover .pw-resume-go { transform: translateX(4px); }
#home-screen .pw-resume-dismiss { top: 10px; right: 12px; color: rgba(246, 239, 228, .45); }

/* ── Section heading ──────────────────────────────────────────────────────── */
.hx-section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin: 8px 0 22px;
  scroll-margin-top: 90px;
}
.hx-section-kicker {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hx-section-title {
  margin: 0;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--hx-ink);
}
.hx-section-head::after {   /* a rule that runs off to the edge */
  content: '';
  flex: 1;
  height: 1px;
  align-self: center;
  background: var(--hx-line);
}

/* ── The tracks ───────────────────────────────────────────────────────────── */
.hx-tracks {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}
.hx-track {
  position: relative;
  grid-column: span 6;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 20px;
  min-height: 214px;
  padding: 26px 26px 54px;
  border: 1px solid var(--hx-line);
  border-radius: 22px;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--c) 12%, transparent), transparent 60%),
    var(--hx-paper);
  color: var(--hx-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  animation: hx-rise .7s calc(.45s + var(--i) * .08s) var(--hx-ease) both;
  transition: transform .3s var(--hx-ease), box-shadow .3s var(--hx-ease), border-color .3s;
}
/* Asymmetric index: wide, narrow / narrow, wide. */
.hx-track:nth-child(1), .hx-track:nth-child(4) { grid-column: span 7; }
.hx-track:nth-child(2), .hx-track:nth-child(3) { grid-column: span 5; }

.hx-track:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--c) 45%, var(--hx-line));
  box-shadow: 0 26px 50px -30px color-mix(in srgb, var(--c) 70%, rgba(0,0,0,.4));
}
.hx-track:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 40%, transparent); outline-offset: 3px; }

.hx-track-num {
  position: absolute;
  left: 26px; bottom: 18px;
  font-family: 'Playfair Display', serif;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: color-mix(in srgb, var(--c) 80%, var(--hx-ink));
}
.hx-track-logo {
  display: grid;
  place-items: center;
  width: 70px; height: 70px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--c) 10%, var(--hx-paper));
  border: 1px solid color-mix(in srgb, var(--c) 22%, transparent);
  transition: transform .4s var(--hx-ease);
}
.hx-track:hover .hx-track-logo { transform: rotate(-6deg) scale(1.05); }
.hx-track-logo img { width: 48px; height: 48px; object-fit: contain; }

.hx-track-body { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; }
.hx-track-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.62rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.015em;
}
.hx-track-sub {
  margin-top: 6px;
  font-size: .9rem;
  color: var(--text-muted);
}
/* Its own full-width row under the logo, so a narrow card still fits them. */
.hx-track-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.hx-track-tags i {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 24%, var(--hx-line));
  background: color-mix(in srgb, var(--c) 6%, transparent);
  font-style: normal;
  font-size: .76rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--c) 70%, var(--hx-ink));
}
.hx-track-tags .hx-more { border-style: dashed; background: none; color: var(--text-muted); }

.hx-track-go {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--hx-line);
  background: var(--hx-paper);
  color: var(--hx-ink);
  transition: background .3s var(--hx-ease), color .3s, border-color .3s, transform .3s var(--hx-ease);
}
.hx-track-go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-track:hover .hx-track-go { background: var(--c); border-color: var(--c); color: #fff; transform: rotate(-45deg); }

/* The track's logo again, huge and faint, bleeding off the corner. */
.hx-track-mark {
  position: absolute;
  right: -34px; bottom: -44px;
  z-index: -1;
  width: 190px; height: 190px;
  object-fit: contain;
  opacity: .07;
  filter: grayscale(.2);
  transform: rotate(-12deg);
  transition: transform .6s var(--hx-ease), opacity .4s;
}
.hx-track:hover .hx-track-mark { transform: rotate(-4deg) scale(1.06); opacity: .12; }

/* ── Footer: social profiles ──────────────────────────────────────────────── */
#home-screen {
  --hx-mono-bg: #111;        /* X, TikTok and Threads are black marks */
  --hx-mono-fg: #fff;
}
html[data-theme="dark"] #home-screen { --hx-mono-bg: #F4EEE4; --hx-mono-fg: #111; }

.hx-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 72px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--hx-line);
}
.hx-footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.hx-footer-mark { width: 40px; height: 40px; object-fit: contain; }
.hx-footer-brand strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}
.hx-footer-legal {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: .85rem;
}
.hx-footer-legal a { color: var(--text-muted); text-decoration: none; }
.hx-footer-legal a:hover { color: var(--text); text-decoration: underline; }
.hx-footer-brand span:not([class^="brand-"]) {
  display: block;
  margin-top: 2px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: .9rem;
  color: var(--text-muted);
}

.hx-social {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hx-social-label {
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.hx-social-label b { color: var(--hx-ink); font-weight: 600; }
.hx-social-list {
  display: flex;
  flex-wrap: wrap;           /* seven icons: on the narrowest phones, wrap rather than overflow */
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hx-social-link {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--hx-line);
  border-radius: 12px;
  background: var(--hx-paper);
  color: var(--hx-ink);
  transition: background .25s var(--hx-ease), color .25s, border-color .25s, transform .25s var(--hx-ease);
}
.hx-social-link svg { width: 18px; height: 18px; fill: currentColor; }
/* Monochrome at rest so the row stays calm; each lights up in its own brand
   colour on hover. */
.hx-social-link:hover,
.hx-social-link:focus-visible {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-fg);
  transform: translateY(-3px);
}
.hx-social-link:focus-visible { outline: 3px solid var(--accent-pale); outline-offset: 2px; }

@media (max-width: 760px) {
  .hx-footer { flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 56px; }
  .hx-social { flex-direction: column; align-items: flex-start; gap: 10px; }
}
/* Eight icons: 36px keeps one row on a 375px phone (8×36 + 7×5 = 323px). */
@media (max-width: 400px) {
  .hx-social-list { gap: 5px; }
  .hx-social-link { width: 36px; height: 36px; border-radius: 10px; }
  .hx-social-link svg { width: 16px; height: 16px; }
}

/* ── Load-in ──────────────────────────────────────────────────────────────── */
.hx-greet, .hx-line, .hx-lede, .hx-cta, .hx-stats { animation: hx-rise .7s var(--hx-ease) both; }
.hx-greet                { animation-delay: .02s; }
.hx-line:nth-child(1)    { animation-delay: .08s; }
.hx-line:nth-child(2)    { animation-delay: .16s; }
.hx-line:nth-child(3)    { animation-delay: .24s; }
.hx-lede                 { animation-delay: .34s; }
.hx-cta                  { animation-delay: .42s; }
.hx-stats                { animation-delay: .5s; }

@keyframes hx-rise   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes hx-card-in { from { opacity: 0; transform: translateY(30px) rotate(calc(var(--r) * 2.2)); } to { opacity: 1; transform: rotate(var(--r)); } }
@keyframes hx-float  { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes hx-note-in { from { opacity: 0; transform: translate(-50%, -30%) rotate(-14deg) scale(.8); } to { opacity: 1; transform: translate(-50%, -50%) rotate(-6deg); } }
@keyframes hx-draw   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hx-spin   { to { rotate: 360deg; } }
@keyframes hx-rise-arrow { 0%, 100% { translate: 0 1px; opacity: .55; } 50% { translate: 0 -1.5px; opacity: 1; } }
@keyframes hx-sink-arrow { 0%, 100% { translate: 0 -1px; opacity: .55; } 50% { translate: 0 1.5px; opacity: 1; } }
@keyframes hx-twinkle    { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  #home-screen *, #home-screen *::before, #home-screen *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Dark ─────────────────────────────────────────────────────────────────── */
html[data-theme="dark"] .hx-card { box-shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -18px rgba(0,0,0,.7); }
html[data-theme="dark"] .hx-desk-note { background: #E9C75E; }
html[data-theme="dark"] #home-screen .pw-resume-card { background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 55%),
    #0E0B08; border-color: #2A2219; }
html[data-theme="dark"] .hx-track-mark { opacity: .09; }

/* ── Tablet ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hx-hero { grid-template-columns: 1fr; gap: 12px; padding-top: 28px; }
  .hx-desk { height: 300px; max-width: 520px; width: 100%; margin: 0 auto; }
  .hx-card { width: 180px; }
  .hx-card img { width: 44px; height: 44px; margin-bottom: 20px; }
  .hx-track:nth-child(n) { grid-column: span 12; min-height: 0; padding-bottom: 46px; }
}

/* ── Phone ────────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hx-hero { padding: 18px 0 10px; }
  .hx-title { font-size: clamp(2.7rem, 13vw, 3.4rem); }
  .hx-lede { font-size: .96rem; margin-top: 18px; }
  .hx-cta { flex-direction: column; }
  .hx-btn { justify-content: center; width: 100%; }
  .hx-stats > div { padding-right: 16px; margin-right: 16px; }
  .hx-stats dt { font-size: 1.5rem; }
  .hx-stats dd { font-size: .66rem; }
  .hx-desk { height: 240px; }
  .hx-card { width: 142px; padding: 12px 12px 10px; border-radius: 13px; }
  .hx-card img { width: 34px; height: 34px; margin-bottom: 14px; }
  .hx-card span { font-size: .9rem; }
  .hx-desk-note { font-size: .74rem; }
  .hx-section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hx-section-head::after { display: none; }
  .hx-track { grid-template-columns: auto 1fr; min-height: 0; padding: 20px 20px 48px; gap: 14px 16px; border-radius: 18px; }
  .hx-track-logo { width: 56px; height: 56px; border-radius: 14px; }
  .hx-track-logo img { width: 38px; height: 38px; }
  .hx-track-name { font-size: 1.35rem; }
  .hx-track-go { position: absolute; right: 18px; bottom: 14px; width: 36px; height: 36px; }
  .hx-track-num { left: 20px; bottom: 16px; }
  #home-screen .pw-resume-card { padding: 18px 18px 18px 22px; margin-bottom: 40px; }
  #home-screen .pw-resume-title { font-size: 1.15rem; }
}

/* ── Feedback card (Google Form), above the footer ────────────────────────── */
.hx-feedback {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  margin-top: 64px;
  padding: 28px 32px;
  border: 1px solid var(--hx-line);
  border-radius: 22px;
  background:
    radial-gradient(80% 140% at 100% 50%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 65%),
    var(--hx-paper);
  overflow: hidden;
}
.hx-feedback::before {           /* the same ribbon as the resume bookmark */
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--accent);
}
.hx-feedback-icon {
  display: grid;
  place-items: center;
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--accent-pale);
  color: var(--accent);
}
.hx-feedback-icon svg {
  width: 28px; height: 28px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.hx-feedback-kicker {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hx-feedback h2 {
  margin: 4px 0 6px;
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--hx-ink);
}
.hx-feedback p {
  margin: 0;
  max-width: 520px;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.hx-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--accent) 75%, transparent);
  transition: transform .2s var(--hx-ease), box-shadow .2s var(--hx-ease);
}
.hx-feedback-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--hx-ease); }
.hx-feedback-btn:hover { transform: translateY(-2px); }
.hx-feedback-btn:hover svg { transform: translate(2px, -2px); }
.hx-feedback-btn:focus-visible { outline: 3px solid var(--accent-pale); outline-offset: 3px; }
/* The footer's own top margin is redundant right after this card. */
.hx-feedback + .hx-footer { margin-top: 40px; }

@media (max-width: 760px) {
  .hx-feedback { grid-template-columns: auto 1fr; padding: 24px 22px 22px 26px; gap: 16px 18px; margin-top: 48px; }
  .hx-feedback-icon { width: 48px; height: 48px; border-radius: 14px; }
  .hx-feedback-btn { grid-column: 1 / -1; justify-content: center; }
}
