:root {
  color-scheme: light;
  --ink: #132033;
  --muted: #64748b;
  --line: #d6dee8;
  --paper: #f7fafc;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.92);
  --header-bg: rgba(255, 255, 255, 0.94);
  --nav-ink: #334155;
  --nav-hover-bg: #e8eef5;
  --nav-hover-ink: #0f172a;
  --dark-button-bg: #111827;
  --dark-button-ink: #ffffff;
  --soft-button-bg: #eaf1f7;
  --soft-button-border: #d7e1eb;
  --soft-button-ink: #213047;
  --chip-bg: #eef7fb;
  --chip-border: #b9dcea;
  --chip-ink: #132033;
  --hero-overlay: linear-gradient(90deg, rgba(247, 250, 252, 0.96) 0 43%, rgba(247, 250, 252, 0.78));
  --album-bg: #10151d;
  --album-border: #243244;
  --album-ink: #f8fafc;
  --album-muted: #b9c3cf;
  --modal-bg: #ffffff;
  --blue: #0f7bbd;
  --teal: #0f9b8e;
  --amber: #c98211;
  --rose: #c23b61;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6edf7;
  --muted: #a7b4c7;
  --line: #263447;
  --paper: #0c1118;
  --panel: #121b26;
  --panel-soft: rgba(18, 27, 38, 0.9);
  --header-bg: rgba(12, 17, 24, 0.94);
  --nav-ink: #c7d2e2;
  --nav-hover-bg: #1f2b3b;
  --nav-hover-ink: #ffffff;
  --dark-button-bg: #e6edf7;
  --dark-button-ink: #0c1118;
  --soft-button-bg: #1d2a3a;
  --soft-button-border: #314358;
  --soft-button-ink: #e6edf7;
  --chip-bg: #172637;
  --chip-border: #35536c;
  --chip-ink: #e6edf7;
  --hero-overlay: linear-gradient(90deg, rgba(12, 17, 24, 0.97) 0 45%, rgba(12, 17, 24, 0.75));
  --album-bg: #0f1722;
  --album-border: #2c3d52;
  --album-ink: #f8fafc;
  --album-muted: #b7c4d4;
  --modal-bg: #121b26;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  margin: 0;
  min-width: 1440px;
  overflow-x: hidden;
}

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

.site-header {
  align-items: center;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 60;
}

.brand {
  align-items: center;
  display: flex;
  gap: 10px;
  font-weight: 800;
}

.brand span {
  align-items: center;
  background: var(--dark-button-bg);
  border-radius: 8px;
  color: var(--dark-button-ink);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.top-nav {
  align-items: center;
  display: flex;
  gap: 6px;
}

.top-nav a,
.top-nav button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: var(--nav-ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  padding: 10px 13px;
}

.top-nav a:hover,
.top-nav button:hover,
.about-nav-toggle[aria-expanded="true"] {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-ink);
}

body.about-panel-open::after,
body.albums-panel-open::after {
  background: rgba(15, 23, 42, 0.18);
  content: "";
  inset: 68px 0 0;
  pointer-events: none;
  position: fixed;
  z-index: 45;
}

body[data-theme="dark"].about-panel-open::after,
body[data-theme="dark"].albums-panel-open::after {
  background: rgba(0, 0, 0, 0.28);
}

.theme-toggle {
  background: var(--soft-button-bg);
  border: 1px solid var(--soft-button-border);
  border-radius: 999px;
  color: var(--soft-button-ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  min-height: 36px;
  padding: 0 16px;
}

.theme-toggle:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-ink);
}

main {
  display: grid;
  gap: 20px;
  padding: 20px;
}

.hero-section,
.section-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-section {
  align-items: stretch;
  background:
    var(--hero-overlay),
    url("./assets/se229-reference.svg") right center / min(980px, 76vw) auto no-repeat,
    var(--panel);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.75fr);
  min-height: 520px;
  overflow: hidden;
}

.hero-copy {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 760px;
  min-height: 520px;
  padding: 230px 56px 54px;
  position: relative;
  isolation: isolate;
}

.hero-album-slideshow {
  aspect-ratio: var(--hero-slide-ratio, 16 / 9);
  background: transparent;
  border-radius: 8px;
  display: block;
  height: auto;
  left: 56px;
  mask-image:
    linear-gradient(180deg, #000 0%, #000 44%, rgba(0, 0, 0, 0.74) 62%, rgba(0, 0, 0, 0.2) 82%, transparent 100%),
    linear-gradient(90deg, #000 0%, #000 91%, rgba(0, 0, 0, 0.72) 96%, transparent 100%);
  mask-composite: intersect;
  max-height: calc(100% - 72px);
  opacity: 0.34;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 34px;
  transition: opacity 420ms ease, filter 420ms ease, transform 520ms ease;
  -webkit-mask-image:
    linear-gradient(180deg, #000 0%, #000 44%, rgba(0, 0, 0, 0.74) 62%, rgba(0, 0, 0, 0.2) 82%, transparent 100%),
    linear-gradient(90deg, #000 0%, #000 91%, rgba(0, 0, 0, 0.72) 96%, transparent 100%);
  -webkit-mask-composite: source-in;
  width: min(820px, calc(100vw - 72px));
  z-index: 0;
}

.hero-copy > :not(.hero-album-slideshow) {
  position: relative;
  z-index: 1;
}

.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy .hero-lead {
  text-shadow:
    0 0 2px var(--panel),
    0 0 7px var(--panel),
    0 3px 16px rgba(15, 23, 42, 0.32),
    0 14px 34px rgba(15, 23, 42, 0.22);
}

.hero-copy h1 {
  -webkit-text-stroke: 1px rgba(15, 23, 42, 0.18);
}

.hero-copy .eyebrow,
.hero-copy .hero-lead {
  -webkit-text-stroke: 0.35px rgba(15, 23, 42, 0.14);
}

body[data-theme="dark"] .hero-copy .eyebrow,
body[data-theme="dark"] .hero-copy h1,
body[data-theme="dark"] .hero-copy .hero-lead {
  text-shadow:
    0 0 2px #020617,
    0 0 8px #020617,
    0 4px 18px rgba(0, 0, 0, 0.72),
    0 16px 40px rgba(0, 0, 0, 0.58);
}

body[data-theme="dark"] .hero-copy h1 {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .hero-copy .eyebrow,
body[data-theme="dark"] .hero-copy .hero-lead {
  -webkit-text-stroke: 0.35px rgba(255, 255, 255, 0.1);
}

.hero-copy:hover .hero-album-slideshow,
.hero-copy:focus-within .hero-album-slideshow,
.hero-copy.is-previewing-slideshow .hero-album-slideshow {
  filter: saturate(1.06) brightness(1.02);
  opacity: 1;
  transform: scale(1.012);
}

.hero-slide-stage,
.hero-slide-backdrop,
.hero-slide-media {
  display: block;
  inset: 0;
  position: absolute;
}

.hero-slide-stage {
  overflow: hidden;
}

.hero-slide-backdrop {
  display: none;
}

.hero-slide-media {
  display: block;
  height: 100%;
  margin: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 260ms ease, transform 520ms ease;
  width: 100%;
}

.hero-slide-video {
  background: rgba(0, 0, 0, 0.18);
}

.hero-album-slideshow::after {
  background:
    linear-gradient(180deg, transparent 0 48%, rgba(247, 250, 252, 0.42) 78%, rgba(247, 250, 252, 0.9) 100%),
    linear-gradient(90deg, rgba(247, 250, 252, 0.18), transparent 42%, rgba(247, 250, 252, 0.26));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

body[data-theme="dark"] .hero-album-slideshow::after {
  background:
    linear-gradient(180deg, transparent 0 48%, rgba(12, 17, 24, 0.42) 78%, rgba(12, 17, 24, 0.92) 100%),
    linear-gradient(90deg, rgba(12, 17, 24, 0.2), transparent 42%, rgba(12, 17, 24, 0.28));
}

.hero-album-slideshow.is-changing .hero-slide-media {
  opacity: 0.54;
  transform: scale(0.985);
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 0.95;
  margin: 0;
  max-width: 780px;
}

h2 {
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.02;
  margin: 0;
}

h3 {
  font-size: 22px;
  line-height: 1.15;
  margin: 8px 0 10px;
}

.hero-lead,
.section-heading p,
.about-copy p,
.hero-board article p,
.work-card p,
.modal-copy p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  hyphens: auto;
  text-align: justify;
  text-justify: inter-word;
}

.hero-lead {
  max-width: 690px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.primary-action,
.secondary-action,
.work-card a,
.contact-actions a,
.contact-actions span {
  align-items: center;
  border-radius: 7px;
  display: inline-flex;
  font-weight: 850;
  min-height: 42px;
  padding: 0 16px;
}

.primary-action,
.work-card a {
  background: var(--dark-button-bg);
  color: var(--dark-button-ink);
}

.secondary-action,
.contact-actions a,
.contact-actions span {
  background: var(--soft-button-bg);
  border: 1px solid var(--soft-button-border);
  color: var(--soft-button-ink);
}

.hero-board {
  align-content: end;
  display: grid;
  gap: 12px;
  padding: 28px;
}

.hero-board article {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.profile-card {
  display: grid;
  gap: 10px;
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.profile-card::before,
.profile-card::after {
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  opacity: 0.075;
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

.profile-card::before {
  color: #e10600;
  content: "Ferrari";
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 4.8vw, 78px);
  right: -8px;
  top: 22px;
  transform: rotate(-8deg);
}

.profile-card::after {
  color: #cc0000;
  content: "DUCATI";
  font-size: clamp(34px, 3.8vw, 60px);
  left: 18px;
  bottom: 18px;
  transform: rotate(7deg);
}

.profile-card > * {
  position: relative;
  z-index: 1;
}

body[data-theme="dark"] .profile-card::before,
body[data-theme="dark"] .profile-card::after {
  opacity: 0.055;
}

.profile-photo {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: block;
  height: clamp(110px, 12vw, 150px);
  margin: 0 0 12px;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.hero-board span,
.work-card span,
.album-card span,
.modal-copy span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.hero-board strong {
  display: block;
  font-size: 19px;
  line-height: 1.25;
  margin-top: 6px;
}

.hero-board article p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 10px 0 0;
}

.motorsport-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero-board .brand-badge {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 950;
  justify-content: center;
  letter-spacing: 0;
  min-height: 30px;
  padding: 0 12px;
  text-transform: none;
}

.ferrari-badge {
  background: linear-gradient(135deg, #fff200 0 24%, #e10600 24% 100%);
  border: 1px solid rgba(0, 0, 0, 0.18);
  color: #111111;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.36);
}

.ducati-badge {
  background: linear-gradient(135deg, #d40000, #7a0000);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.experience-tags,
.tool-highlights {
  gap: 7px;
  margin-top: 12px;
}

.experience-tags {
  display: flex;
  flex-wrap: wrap;
}

.tool-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  width: 100%;
}

.experience-tags mark,
.tool-highlights mark {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  color: var(--chip-ink);
  font-weight: 850;
}

.experience-tags mark {
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 7px 9px;
}

.tool-highlights mark {
  align-items: center;
  border-radius: 6px;
  display: inline-flex;
  font-size: 10.5px;
  justify-content: center;
  line-height: 1.18;
  min-height: 30px;
  overflow-wrap: anywhere;
  padding: 7px 8px;
  text-align: center;
  white-space: normal;
}

.tool-highlights {
  margin-top: 8px;
}

.section-block {
  background: var(--panel);
  padding: 34px;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
  max-width: 900px;
}

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

.work-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: 210px 1fr;
  overflow: hidden;
}

.work-card img,
.project-visual {
  background: #e7eef5;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.work-card div:last-child {
  padding: 20px;
}

.project-visual {
  position: relative;
}

.project-visual::before,
.project-visual::after {
  content: "";
  position: absolute;
}

.visual-skid {
  background:
    linear-gradient(90deg, transparent 0 18%, rgba(255, 255, 255, 0.45) 18% 20%, transparent 20% 100%),
    repeating-linear-gradient(0deg, rgba(19, 32, 51, 0.12) 0 2px, transparent 2px 36px),
    linear-gradient(135deg, #d7e6ef, #f7fbff 50%, #d3dce6);
}

.visual-skid::before {
  border: 8px solid #60758a;
  height: 74px;
  left: 13%;
  top: 34%;
  width: 72%;
}

.visual-skid::after {
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--amber));
  border-radius: 999px;
  height: 12px;
  left: 10%;
  top: 52%;
  width: 78%;
}

.visual-controls {
  background:
    radial-gradient(circle at 22% 32%, #ef4444 0 13px, transparent 14px),
    radial-gradient(circle at 39% 32%, #22c55e 0 13px, transparent 14px),
    radial-gradient(circle at 56% 32%, #38bdf8 0 13px, transparent 14px),
    repeating-linear-gradient(90deg, rgba(15, 23, 42, 0.08) 0 1px, transparent 1px 52px),
    linear-gradient(135deg, #f8fafc, #dce8f1);
}

.visual-controls::before {
  background: #111827;
  border-radius: 6px;
  box-shadow: 0 42px 0 #111827, 0 84px 0 #111827;
  height: 20px;
  left: 16%;
  top: 49%;
  width: 68%;
}

.f1-highlight-section {
  background:
    linear-gradient(115deg, rgba(16, 21, 29, 0.96), rgba(17, 24, 39, 0.9)),
    radial-gradient(circle at 12% 10%, rgba(225, 6, 0, 0.28), transparent 28%),
    radial-gradient(circle at 84% 0%, rgba(255, 242, 0, 0.18), transparent 24%),
    #10151d;
  color: #f8fafc;
  overflow: hidden;
  position: relative;
}

.f1-highlight-section::before {
  background: linear-gradient(90deg, #e10600, #fff200, #0f7bbd);
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.f1-highlight-section .section-heading p,
.f1-highlight-card p {
  color: #cbd5e1;
}

.f1-highlight-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: repeat(3, 270px);
  align-items: stretch;
}

.f1-highlight-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  overflow: hidden;
  padding: 13px;
  min-height: unset;
}

/* ── Text body wrapper (all cards) ───────────────────────────── */
.hl-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ── Side card: vertical layout (photo top, text bottom) ────── */
.f1-highlight-card:not(.f1-highlight-main) {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
}

.f1-highlight-card:not(.f1-highlight-main) .f1-highlight-visual {
  width: 100%;
  flex: 1 1 0%;
  min-height: 0;
  border-radius: 0;
  margin: 0;
}

.f1-highlight-card:not(.f1-highlight-main) .hl-body {
  flex: 0 0 auto;
  padding: 10px 13px 13px;
}

.f1-highlight-card:not(.f1-highlight-main) h3 {
  font-size: 13px !important;
  line-height: 1.25 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.f1-highlight-card:not(.f1-highlight-main) p {
  font-size: 0.73rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.f1-highlight-card:not(.f1-highlight-main) .hl-meta {
  margin: 0;
}

.f1-highlight-card:not(.f1-highlight-main) a {
  font-size: 11px;
  min-height: unset;
  padding: 4px 10px;
  margin-top: 2px;
}

/* ── Broken image fallback ────────────────────────────────────── */
.f1-highlight-visual.img-error {
  background: linear-gradient(135deg, #1a2035 0%, #0f172a 100%);
}
.f1-highlight-visual.img-error::after {
  opacity: 0;
}

.f1-highlight-visual {
  border-radius: 0;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.f1-highlight-visual::before,
.f1-highlight-visual::after {
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.f1-highlight-visual::before {
  background:
    linear-gradient(180deg, transparent 0 52%, rgba(15, 23, 42, 0.62) 82%, rgba(15, 23, 42, 0.96) 100%),
    linear-gradient(90deg, transparent 0 72%, rgba(15, 23, 42, 0.36) 100%);
}

.f1-highlight-visual::after {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 242, 0, 0.14), transparent 32%),
    radial-gradient(circle at 100% 22%, rgba(225, 6, 0, 0.16), transparent 28%);
  mix-blend-mode: screen;
  opacity: 0.58;
}

.f1-highlight-photo {
  display: block;
  filter: saturate(1.08) contrast(1.04) brightness(0.78);
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.18);
  transform-origin: center center;
  width: 100%;
}

.f1-highlight-visual figcaption {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.78), transparent);
  bottom: 0;
  color: rgba(226, 232, 240, 0.84);
  font-size: 10px;
  font-weight: 800;
  left: 0;
  line-height: 1.3;
  padding: 10px 12px;
  position: absolute;
  right: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
  z-index: 2;
}

.f1-highlight-main {
  background:
    linear-gradient(180deg, rgba(225, 6, 0, 0.18), rgba(15, 23, 42, 0.72)),
    rgba(15, 23, 42, 0.76);
  border-color: rgba(225, 6, 0, 0.48);
  grid-column: 1;
  grid-row: 1 / 4;
  flex-direction: column;
  padding: 0;
  gap: 0;
}

.f1-highlight-main .f1-highlight-visual {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  border-radius: 0;
  margin: 0;
}

.f1-highlight-main .hl-body {
  flex: 0 0 auto;
  padding: 16px 18px 18px;
  gap: 8px;
}

.f1-highlight-main h3 {
  font-size: clamp(16px, 1.4vw, 21px) !important;
  line-height: 1.12 !important;
}

.f1-highlight-main p {
  font-size: 0.84rem !important;
  -webkit-line-clamp: unset !important;
  display: block !important;
}

.f1-highlight-main .hl-meta {
  margin: 0;
}

.f1-highlight-card span {
  color: #60a5fa;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.f1-highlight-card h3 {
  color: #f8fafc;
  font-size: clamp(19px, 1.55vw, 25px);
  line-height: 1.08;
  margin: 0;
}

.f1-highlight-card a,
.f1-highlight-link {
  align-items: center;
  background: #f8fafc;
  border-radius: 7px;
  color: #0f172a;
  display: inline-flex;
  font-weight: 950;
  justify-content: center;
  margin-top: auto;
  min-height: 42px;
  padding: 0 16px;
  width: fit-content;
}

.f1-highlight-link {
  margin-top: 18px;
}

.f1-highlight-card a:hover,
.f1-highlight-link:hover {
  background: #fff200;
}

.motogp-highlight-section {
  background:
    linear-gradient(115deg, rgba(16, 18, 24, 0.96), rgba(28, 18, 18, 0.91)),
    radial-gradient(circle at 14% 6%, rgba(200, 5, 2, 0.32), transparent 28%),
    radial-gradient(circle at 88% 0%, rgba(255, 116, 36, 0.2), transparent 26%),
    radial-gradient(circle at 80% 92%, rgba(56, 189, 248, 0.12), transparent 26%),
    #101318;
}

.motogp-highlight-section::before {
  background: linear-gradient(90deg, #c80502, #ff7a1a, #38bdf8);
}


.motogp-highlight-section .f1-highlight-main {
  background:
    linear-gradient(180deg, rgba(200, 5, 2, 0.2), rgba(15, 23, 42, 0.72)),
    rgba(15, 23, 42, 0.76);
  border-color: rgba(255, 116, 36, 0.5);
}

.motogp-highlight-section .f1-highlight-card span {
  color: #fb923c;
}

.motogp-highlight-section .f1-highlight-card a:hover,
.motogp-highlight-section .f1-highlight-link:hover {
  background: #ff7a1a;
  color: #111111;
}

/* ── CeritaF1 highlight nav arrows ─────────────────────────────────────────── */
.f1-highlight-nav {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 8px;
  margin-top: -18px;
}

.f1-nav-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  letter-spacing: 0.03em;
  padding: 8px 16px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.f1-nav-btn:hover {
  background: #e10600;
  border-color: #e10600;
  color: #fff;
}

.f1-nav-btn[hidden] {
  display: none !important;
}

/* ── Article card meta (date + author badge) ────────────────────────────────── */
.hl-meta {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
}

.hl-meta time {
  color: #94a3b8;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}

.hl-author {
  color: #64748b;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── Formula One Archive Gallery ─────────────────────────────────────────── */
.f1-archive-section {
  padding: 48px 40px 40px;
}

.archive-lead {
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px;
}

.archive-year-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  margin-top: 28px;
}

.archive-tab {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 8px 22px;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.archive-tab:hover {
  background: rgba(225, 6, 0, 0.12);
  border-color: rgba(225, 6, 0, 0.45);
  color: #f87171;
}

.archive-tab.active {
  background: #e10600;
  border-color: #e10600;
  color: #fff;
}

.archive-collage-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 28px;
}

.archive-collage-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.22s, transform 0.22s, box-shadow 0.22s;
}

.archive-collage-card:hover {
  border-color: rgba(225, 6, 0, 0.45);
  box-shadow: 0 8px 32px rgba(225, 6, 0, 0.12);
  transform: translateY(-2px);
}

.archive-collage-mosaic {
  display: grid;
  gap: 2px;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: repeat(3, 86px);
}

/* First photo spans all 3 rows (big hero left) */
.archive-collage-mosaic img:first-child,
.archive-collage-mosaic > *:first-child {
  grid-row: 1 / 4;
}

.archive-collage-mosaic img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

/* Single-cover variant for MotoGP album cards */
.archive-collage-mosaic--single {
  grid-template-columns: 1fr;
  grid-template-rows: 260px;
}

.archive-collage-mosaic--single img:first-child {
  grid-row: auto;
}

.archive-collage-mosaic-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, #1e2330 0%, #0f172a 100%);
}

.archive-card-info {
  padding: 16px 18px 18px;
}

.archive-card-eyebrow {
  color: #e10600;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.archive-card-title {
  color: #f1f5f9;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.archive-card-count {
  color: #64748b;
  font-size: 12px;
  margin: 0 0 14px;
}

.archive-card-link {
  background: #e10600;
  border-radius: 5px;
  color: #fff;
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 14px;
  text-decoration: none;
  transition: background 0.18s;
}

.archive-card-link:hover {
  background: #c50500;
  color: #fff;
}

/* Team badge strip under card title */
.archive-team-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 8px 0 12px;
}
.archive-team-badge {
  border: 1px solid #64748b;
  border-radius: 4px;
  color: #94a3b8;
  font-size: .68rem;
  letter-spacing: .02em;
  padding: 2px 6px;
  white-space: nowrap;
}

/* ── F1 Archive Viewer Page ──────────────────────────────────────────────── */
.archive-viewer-body {
  background: #080b13;
  color: #e2e8f0;
  margin: 0;
  min-height: 100vh;
}

.archive-viewer-nav {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(8, 11, 19, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  gap: 14px;
  padding: 14px 32px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.archive-back-link {
  align-items: center;
  color: #94a3b8;
  display: flex;
  font-size: 13px;
  font-weight: 600;
  gap: 6px;
  text-decoration: none;
  transition: color 0.18s;
  white-space: nowrap;
}

.archive-back-link:hover {
  color: #f1f5f9;
}

.archive-viewer-breadcrumb {
  color: #334155;
  font-size: 12px;
}

.archive-viewer-breadcrumb span {
  color: #64748b;
}

.archive-viewer-header {
  padding: 36px 32px 8px;
}

.archive-viewer-eyebrow {
  color: #e10600;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.archive-viewer-title {
  color: #f8fafc;
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
}

.archive-viewer-count {
  color: #64748b;
  font-size: 13px;
  margin: 0;
}

.archive-viewer-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 32px;
}

.archive-photo-grid {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0 32px 52px;
}

.archive-photo-thumb {
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.archive-photo-thumb img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.24s;
  width: 100%;
}

.archive-photo-thumb:hover img {
  transform: scale(1.06);
}

.archive-photo-thumb::after {
  background: transparent;
  content: "";
  inset: 0;
  position: absolute;
  transition: background 0.2s;
}

.archive-photo-thumb:hover::after {
  background: rgba(225, 6, 0, 0.15);
}

/* Lightbox */
.archive-lightbox {
  align-items: center;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
  z-index: 1000;
}

.archive-lightbox[hidden] {
  display: none !important;
}

.archive-lightbox figure {
  margin: 0;
  text-align: center;
}

.archive-lightbox figure img {
  border-radius: 4px;
  max-height: 84vh;
  max-width: 86vw;
  object-fit: contain;
}

.archive-lightbox figcaption {
  color: #64748b;
  font-size: 12px;
  margin-top: 10px;
}

.lb-btn {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #e2e8f0;
  cursor: pointer;
  display: flex;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  position: fixed;
  transition: background 0.18s;
  width: 48px;
}

.lb-btn:hover {
  background: rgba(225, 6, 0, 0.7);
  border-color: #e10600;
}

.lb-close {
  font-size: 16px;
  right: 20px;
  top: 20px;
}

.lb-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-counter {
  bottom: 18px;
  color: #475569;
  font-size: 12px;
  left: 50%;
  position: fixed;
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .archive-collage-grid {
    grid-template-columns: 1fr;
  }
  .archive-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 12px 36px;
  }
  .archive-viewer-nav {
    padding: 12px 16px;
  }
  .archive-viewer-header {
    padding: 24px 16px 8px;
  }
  .archive-viewer-cat-tabs {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .archive-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.about-layout {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.65fr);
}

.about-section {
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
  isolation: isolate;
  left: 50%;
  margin: 0;
  max-height: calc(100vh - 92px);
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: none;
  position: fixed;
  top: 78px;
  transform: translate(-50%, -12px) scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
  width: min(1240px, calc(100vw - 64px));
  z-index: 50;
}

body.about-panel-open .about-section {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  visibility: visible;
}

.about-heading-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  position: relative;
  z-index: 3;
}

.about-close {
  background: var(--soft-button-bg);
  border: 1px solid var(--soft-button-border);
  border-radius: 999px;
  color: var(--soft-button-ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  min-height: 32px;
  padding: 0 13px;
}

.about-close:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-ink);
}

.about-section::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0 58%, rgba(255, 255, 255, 0.84) 82%, rgba(255, 255, 255, 0.68)),
    linear-gradient(180deg, var(--panel), rgba(255, 255, 255, 0.64) 42%, var(--panel) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

body[data-theme="dark"] .about-section::before {
  background:
    linear-gradient(90deg, rgba(18, 27, 38, 0.96) 0 58%, rgba(18, 27, 38, 0.84) 82%, rgba(18, 27, 38, 0.68)),
    linear-gradient(180deg, var(--panel), rgba(18, 27, 38, 0.64) 42%, var(--panel) 100%);
}

.about-section > :not(.about-photo-collage) {
  position: relative;
  z-index: 2;
}

.about-photo-collage {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-auto-rows: 118px;
  inset: 16px;
  opacity: 0.42;
  pointer-events: none;
  position: absolute;
  transform: rotate(-0.8deg) scale(1.03);
  z-index: 0;
}

.about-photo-collage img {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 8px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  filter: saturate(1.02) contrast(1);
  height: 100%;
  object-fit: cover;
  transition: opacity 260ms ease, transform 420ms ease;
  width: 100%;
}

.about-photo-collage.is-changing img {
  opacity: 0.38;
  transform: scale(0.985);
}

.about-photo-collage img:nth-child(1) {
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}

.about-photo-collage img:nth-child(2) {
  grid-column: 3 / span 3;
  grid-row: 1 / span 2;
}

.about-photo-collage img:nth-child(3) {
  grid-column: 6 / span 3;
  grid-row: 1 / span 2;
}

.about-photo-collage img:nth-child(4) {
  grid-column: 1 / span 3;
  grid-row: 3 / span 2;
}

.about-photo-collage img:nth-child(5) {
  grid-column: 4 / span 2;
  grid-row: 3 / span 2;
}

.about-photo-collage img:nth-child(6) {
  grid-column: 6 / span 3;
  grid-row: 3 / span 2;
}

.about-photo-collage img:nth-child(7) {
  grid-column: 1 / span 2;
  grid-row: 5 / span 2;
}

.about-photo-collage img:nth-child(8) {
  grid-column: 3 / span 2;
  grid-row: 5 / span 2;
}

.about-photo-collage img:nth-child(9) {
  grid-column: 5 / span 2;
  grid-row: 5 / span 2;
}

.about-photo-collage img:nth-child(10) {
  grid-column: 7 / span 2;
  grid-row: 5 / span 2;
}

.about-photo-collage img:nth-child(11) {
  grid-column: 1 / span 4;
  grid-row: 7 / span 2;
}

.about-photo-collage img:nth-child(12) {
  grid-column: 5 / span 4;
  grid-row: 7 / span 2;
}

body[data-theme="dark"] .about-photo-collage {
  opacity: 0.34;
}

body[data-theme="dark"] .about-photo-collage img {
  border-color: rgba(255, 255, 255, 0.14);
  filter: saturate(0.96) contrast(0.96) brightness(0.9);
}

.about-copy {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  max-width: 900px;
  padding: 20px;
}

body[data-theme="dark"] .about-copy {
  background: rgba(18, 27, 38, 0.86);
  border-color: rgba(255, 255, 255, 0.08);
}

.about-copy p + p {
  margin-top: 18px;
}

.about-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.about-list li {
  background: rgba(255, 255, 255, 0.88);
  border: 1.5px solid rgba(15, 123, 189, 0.34);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  padding: 16px 16px 16px 18px;
  position: relative;
}

.about-list li::before {
  background: linear-gradient(180deg, var(--blue), var(--teal));
  bottom: 14px;
  content: "";
  left: 0;
  position: absolute;
  top: 14px;
  width: 4px;
}

.about-list strong,
.about-list span {
  display: block;
}

.about-list strong {
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.about-list span {
  color: var(--muted);
  line-height: 1.5;
  margin-top: 5px;
}

body[data-theme="dark"] .about-list li {
  background: rgba(18, 27, 38, 0.82);
  border-color: rgba(80, 190, 228, 0.38);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.album-section {
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
  isolation: isolate;
  left: 50%;
  margin: 0;
  max-height: calc(100vh - 92px);
  opacity: 0;
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: none;
  position: fixed;
  top: 78px;
  transform: translate(-50%, -12px) scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  visibility: hidden;
  width: min(1240px, calc(100vw - 64px));
  z-index: 50;
}

body.albums-panel-open .album-section {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  visibility: visible;
}

.albums-close {
  background: var(--soft-button-bg);
  border: 1px solid var(--soft-button-border);
  border-radius: 999px;
  color: var(--soft-button-ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  min-height: 32px;
  padding: 0 13px;
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 3;
}

.albums-close:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-ink);
}

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

.album-card {
  background: var(--album-bg);
  border: 1px solid var(--album-border);
  border-radius: 8px;
  color: var(--album-ink);
  cursor: pointer;
  display: grid;
  grid-template-rows: 170px auto;
  min-height: 286px;
  overflow: hidden;
  padding: 0;
  text-align: left;
}

.category-card {
  grid-template-rows: 260px auto;
  min-height: 430px;
}

.category-card-motorsport {
  border-color: #e10600;
  box-shadow: 0 18px 42px rgba(225, 6, 0, 0.14);
}

.category-card-work {
  border-color: #0f7bbd;
  box-shadow: 0 18px 42px rgba(15, 123, 189, 0.12);
}

.category-card-family {
  border-color: #c23b61;
  box-shadow: 0 18px 42px rgba(194, 59, 97, 0.12);
}

.category-cover,
.category-modal-collage {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  overflow: hidden;
}

.category-cover img,
.category-modal-collage img,
.category-album-thumb {
  display: block;
  filter: saturate(0.96) contrast(0.98);
  height: 100%;
  min-height: 0;
  min-width: 0;
  object-fit: cover;
  width: 100%;
}

.category-cover img:first-child,
.category-modal-collage img:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.album-card-featured {
  border-color: #e10600;
  box-shadow: 0 18px 42px rgba(225, 6, 0, 0.18);
  grid-column: span 2;
  grid-template-rows: 250px auto;
  position: relative;
}

.album-card-featured::after {
  background: linear-gradient(90deg, #e10600, #fff200);
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.album-cover {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.2)),
    var(--cover-image),
    var(--cover-fallback);
  background-position: center;
  background-size: cover;
  overflow: hidden;
  position: relative;
}

.album-cover::after {
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.24));
  bottom: 0;
  content: "";
  height: 34%;
  left: 0;
  position: absolute;
  right: 0;
}

.album-card-content {
  padding: 16px;
}

.album-card h3 {
  color: var(--album-ink);
  font-size: 17px;
  margin: 6px 0 8px;
}

.album-card-featured h3 {
  font-size: 24px;
}

.album-feature-badge {
  background: #fff200;
  border-radius: 999px;
  color: #111111;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  margin-bottom: 8px;
  padding: 7px 10px;
}

.category-card-work .album-feature-badge {
  background: #dff3ff;
}

.category-card-family .album-feature-badge {
  background: #ffe2eb;
}

.album-card p {
  color: var(--album-muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  hyphens: auto;
  text-align: justify;
  text-justify: inter-word;
}

.album-card small {
  color: var(--album-muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 12px;
}

.contact-section {
  align-items: center;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.site-footer {
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
  padding: 6px 20px 26px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.album-modal {
  background: rgba(15, 23, 42, 0.68);
  inset: 0;
  padding: 24px;
  position: fixed;
  z-index: 50;
}

.album-modal[hidden] {
  display: none;
}

.modal-panel {
  background: var(--modal-bg);
  border-radius: 8px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.8fr);
  margin: min(8vh, 80px) auto 0;
  max-width: 920px;
  overflow: hidden;
  position: relative;
}

.modal-close {
  background: var(--dark-button-bg);
  border: 0;
  border-radius: 999px;
  color: var(--dark-button-ink);
  cursor: pointer;
  font-size: 28px;
  height: 42px;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  z-index: 2;
}

.modal-visual {
  background: var(--cover-fallback, linear-gradient(135deg, #111827, #334155));
  min-height: 360px;
  overflow: hidden;
  position: relative;
  transition: opacity 260ms ease, filter 260ms ease;
}

.modal-visual-photo {
  display: block;
  height: 100%;
  inset: 0;
  min-height: 360px;
  object-fit: cover;
  position: absolute;
  width: 100%;
  z-index: 0;
}

.modal-visual::after {
  background:
    linear-gradient(180deg, transparent 0 58%, rgba(0, 0, 0, 0.58)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.16), transparent 48%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.modal-visual.modal-slideshow::before {
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  bottom: 18px;
  color: #ffffff;
  content: "Auto slideshow";
  font-size: 12px;
  font-weight: 900;
  left: 18px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1;
}

.modal-visual.is-changing {
  filter: brightness(0.9);
  opacity: 0.72;
}

.category-modal-collage {
  height: 100%;
  min-height: 360px;
}

.modal-copy {
  align-content: center;
  display: grid;
  gap: 12px;
  padding: 34px;
}

.category-album-list {
  display: grid;
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding-right: 4px;
}

.category-album-list:empty {
  display: none;
}

.category-album-item {
  align-items: center;
  background: var(--soft-button-bg);
  border: 1px solid var(--soft-button-border);
  border-radius: 8px;
  color: var(--soft-button-ink);
  display: grid;
  gap: 12px;
  grid-template-columns: 92px 1fr;
  min-height: 76px;
  overflow: hidden;
  padding: 8px;
}

.category-album-item:hover {
  border-color: var(--blue);
}

.category-album-thumb {
  border-radius: 6px;
  height: 60px;
}

.category-album-copy {
  display: grid;
  gap: 5px;
}

.category-album-copy strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.category-album-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

/* ── Photo Gallery login gate ───────────────────────────────────────────────── */

.album-login-modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.54);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 55;
}

.album-login-modal[hidden] {
  display: none;
}

.album-login-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
  max-width: 400px;
  padding: 42px 36px 36px;
  position: relative;
  width: 100%;
}

.album-login-card .eyebrow {
  margin-bottom: 8px;
}

.album-login-card h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin: 0 0 8px;
}

.album-login-lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 26px;
}

.album-login-close {
  align-items: center;
  background: var(--soft-button-bg);
  border: 1px solid var(--soft-button-border);
  border-radius: 999px;
  color: var(--soft-button-ink);
  cursor: pointer;
  display: flex;
  font-size: 17px;
  height: 32px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
}

.album-login-close:hover {
  background: var(--nav-hover-bg);
  color: var(--nav-hover-ink);
}

.album-login-form {
  display: grid;
  gap: 6px;
}

.album-login-form label {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: 0.06em;
  margin-top: 10px;
  text-transform: uppercase;
}

.album-login-form label:first-child {
  margin-top: 0;
}

.album-login-form input {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  min-height: 44px;
  outline: none;
  padding: 0 13px;
  transition: border-color 140ms;
  width: 100%;
}

.album-login-form input:focus {
  border-color: var(--blue);
}

.album-login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  margin: 6px 0 0;
  padding: 10px 13px;
}

.album-login-error[hidden] {
  display: none;
}

body[data-theme="dark"] .album-login-error {
  background: rgba(185, 28, 28, 0.14);
  border-color: rgba(252, 165, 165, 0.28);
  color: #fca5a5;
}

.album-login-submit {
  justify-content: center;
  margin-top: 18px;
  min-height: 44px;
  width: 100%;
}

@media (max-width: 1120px) {
  .hero-section,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-copy {
    max-width: 880px;
    padding-bottom: 22px;
  }

  .hero-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 0;
  }

  .contact-section {
    align-items: flex-start;
    flex-direction: column;
  }

  .about-photo-collage {
    opacity: 0.32;
  }

  .work-grid,
  .album-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .f1-highlight-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* keep main card spanning full left col on tablet */
  .f1-highlight-main {
    grid-column: 1;
    grid-row: 1 / 4;
  }

  .category-card {
    grid-template-rows: 220px auto;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr auto;
    padding: 12px 14px;
  }

  .top-nav {
    display: grid;
    gap: 8px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .top-nav a,
  .top-nav button {
    align-items: center;
    background: var(--soft-button-bg);
    border: 1px solid var(--soft-button-border);
    display: inline-flex;
    justify-content: center;
    min-height: 38px;
    padding: 8px 9px;
    text-align: center;
  }

  .theme-toggle {
    justify-self: end;
    min-height: 34px;
    padding: 0 13px;
  }

  main {
    gap: 12px;
    padding: 10px;
  }

  .hero-section {
    background: var(--panel);
    display: grid;
    min-height: auto;
  }

  h1 {
    font-size: clamp(36px, 12vw, 52px);
    line-height: 1;
  }

  h2 {
    font-size: clamp(25px, 8vw, 34px);
    line-height: 1.08;
  }

  h3 {
    font-size: 20px;
  }

  .eyebrow {
    font-size: 11px;
    line-height: 1.4;
  }

  .hero-copy,
  .section-block {
    padding: 22px 18px;
  }

  .hero-album-slideshow {
    left: 18px;
    width: calc(100vw - 36px);
  }

  .about-section,
  .album-section {
    max-height: calc(100vh - 164px);
    top: 154px;
    width: calc(100vw - 24px);
  }

  .about-section::before {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.12), var(--panel) 250px),
      linear-gradient(180deg, transparent, var(--panel) 260px);
  }

  body[data-theme="dark"] .about-section::before {
    background:
      linear-gradient(180deg, rgba(18, 27, 38, 0.18), var(--panel) 250px),
      linear-gradient(180deg, transparent, var(--panel) 260px);
  }

  .about-photo-collage {
    gap: 8px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: 78px;
    inset: auto;
    margin: -4px 0 20px;
    opacity: 0.28;
    position: relative;
    transform: none;
    width: 100%;
    z-index: 1;
  }

  .about-photo-collage img {
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  }

  .about-photo-collage img:nth-child(1) {
    grid-column: 1 / span 3;
    grid-row: 1 / span 1;
  }

  .about-photo-collage img:nth-child(2) {
    grid-column: 4 / span 3;
    grid-row: 1 / span 1;
  }

  .about-photo-collage img:nth-child(3) {
    grid-column: 1 / span 2;
    grid-row: 2 / span 1;
  }

  .about-photo-collage img:nth-child(4) {
    grid-column: 3 / span 2;
    grid-row: 2 / span 1;
  }

  .about-photo-collage img:nth-child(5) {
    grid-column: 5 / span 2;
    grid-row: 2 / span 1;
  }

  .about-photo-collage img:nth-child(n + 6) {
    display: none;
  }

  body[data-theme="dark"] .about-photo-collage {
    opacity: 0.24;
  }

  .hero-lead,
  .section-heading p,
  .about-copy p,
  .hero-board article p,
  .work-card p,
  .modal-copy p {
    font-size: 15px;
    line-height: 1.62;
  }

  .about-copy p + p {
    margin-top: 14px;
  }

  .hero-actions {
    gap: 8px;
    margin-top: 20px;
  }

  .hero-actions a {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    min-width: 0;
  }

  .hero-board,
  .work-grid,
  .album-grid,
  .f1-highlight-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .f1-highlight-main {
    grid-column: auto;
    grid-row: auto;
  }

  .f1-highlight-main .f1-highlight-visual {
    height: 180px;
  }

  .f1-highlight-card:not(.f1-highlight-main) {
    flex-direction: row;
  }

  .hero-board {
    gap: 10px;
    padding: 0 14px 16px;
  }

  .hero-board article,
  .about-list li {
    padding: 14px;
  }

  .profile-photo {
    height: 138px;
    margin-bottom: 8px;
  }

  .motorsport-badges {
    margin-top: 8px;
  }

  .hero-board .brand-badge {
    flex: 1 1 110px;
  }

  .experience-tags mark,
  .tool-highlights mark {
    font-size: 10px;
    padding: 7px 8px;
  }

  .experience-tags,
  .tool-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-card {
    grid-template-rows: 170px 1fr;
  }

  .work-card div:last-child,
  .album-card-content {
    padding: 16px;
  }

  .album-card {
    grid-template-rows: 145px auto;
    min-height: 0;
  }

  .category-card {
    grid-template-rows: 170px auto;
  }

  .album-card-featured {
    grid-column: span 1;
    grid-template-rows: 170px auto;
  }

  .album-card-featured h3 {
    font-size: 20px;
  }

  .contact-actions {
    width: 100%;
  }

  .contact-actions a,
  .contact-actions span {
    justify-content: center;
    overflow-wrap: anywhere;
    width: 100%;
  }

  .album-modal {
    overflow-y: auto;
    padding: 10px;
  }

  .modal-panel {
    grid-template-columns: 1fr;
    margin-top: 0;
    max-width: 100%;
  }

  .modal-visual {
    min-height: 220px;
  }

  .modal-visual-photo {
    min-height: 220px;
  }

  .category-modal-collage {
    min-height: 220px;
  }

  .modal-copy {
    padding: 22px 18px;
  }

  .category-album-list {
    max-height: 360px;
  }
}

@media (max-width: 430px) {
  .brand strong {
    font-size: 14px;
  }

  .brand span {
    height: 30px;
    width: 30px;
  }

  .top-nav {
    gap: 7px;
  }

  .top-nav a,
  .top-nav button {
    font-size: 12px;
    font-weight: 850;
  }

  .hero-copy,
  .section-block {
    padding: 20px 15px;
  }

  .hero-album-slideshow {
    left: 15px;
    width: calc(100vw - 30px);
  }

  .about-section,
  .album-section {
    top: 148px;
    width: calc(100vw - 18px);
  }

  .hero-actions a {
    flex-basis: 100%;
  }

  .profile-photo {
    height: 126px;
  }

  .about-photo-collage {
    grid-auto-rows: 64px;
  }

  .album-card {
    grid-template-rows: 132px auto;
  }

  .primary-action,
  .secondary-action,
  .work-card a,
  .contact-actions a,
  .contact-actions span {
    min-height: 40px;
  }
}
