:root {
  color-scheme: dark;
  --surface: #130e12;
  --ink: #fff5ef;
  --muted: #d1bdc5;
  --line: #f9dce926;
  --glass: #281923dc;
  --hover: #ffe9f315;
  --selected: #da1b5b32;
  --accent: #ff8ab1;
  --brand: #da1b5b;
  --brand-hover: #b9134b;
  --rail: 13.5rem;
  --speed: 300ms;
  font-family: "Segoe UI", system-ui, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --surface: #f8eef2;
  --ink: #321923;
  --muted: #634954;
  --line: #54263a30;
  --glass: #fff6f9e0;
  --hover: #79224414;
  --selected: #da1b5b1d;
  --accent: #a21646;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--surface); color: var(--ink); }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 0 22%, #91345450, transparent 34rem),
    repeating-linear-gradient(126deg, transparent 0 38px, var(--line) 39px, transparent 40px 72px);
  mask-image: linear-gradient(90deg, #000, transparent 75%);
  opacity: .65;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.skip-link {
  position: fixed;
  z-index: 5;
  inset: 1rem auto auto 1rem;
  padding: .65rem 1rem;
  background: var(--surface);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.layout {
  max-width: 100rem;
  margin-inline: auto;
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.sidebar {
  position: sticky;
  top: 1.25rem;
  z-index: 2;
  flex: none;
  width: var(--rail);
  transition: width var(--speed) cubic-bezier(.22, .8, .22, 1);
}
[data-collapsed="true"] { --rail: 4.25rem; }
.glass {
  position: relative;
  display: flex;
  min-height: min(31rem, calc(100svh - 2.5rem));
  flex-direction: column;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, var(--hover), transparent 65%), var(--glass);
  backdrop-filter: blur(18px) saturate(145%);
  box-shadow: inset 0 1px 0 var(--line), 0 16px 38px #0003;
}
.menu-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  min-height: 2.85rem;
  padding: .55rem .85rem;
  overflow: hidden;
  border: 0;
  border-radius: .65rem;
  background: transparent;
  color: var(--muted);
  font-size: .95rem;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}
.menu-row:hover { background: var(--hover); color: var(--ink); }
.menu-row[aria-current] { background: var(--selected); color: var(--accent); }
.menu-text {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 150ms ease, transform var(--speed) ease;
}
[data-collapsed="true"] .menu-text { opacity: 0; transform: translateX(-.35rem); }
.brand { position: relative; justify-content: center; margin-bottom: .95rem; min-height: 3.4rem; padding-inline: 0; }
.brand-wordmark {
  flex: none;
  width: 8.75rem;
  height: auto;
  transition: opacity 150ms ease;
}
.brand-on-light { display: none; }
[data-theme="light"] .brand-on-dark { display: none; }
[data-theme="light"] .brand-on-light { display: block; }
.brand-emblem {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 2.1rem;
  height: 2.25rem;
  padding: .24rem;
  object-fit: contain;
  background: #341c29;
  border-radius: .55rem;
  opacity: 0;
  transition: opacity 150ms ease;
}
[data-collapsed="true"] .brand-wordmark { opacity: 0; }
[data-collapsed="true"] .brand-emblem { opacity: 1; }
.collapse {
  position: absolute;
  right: -.65rem;
  bottom: 1.15rem;
  display: grid;
  place-items: center;
  inline-size: 1.85rem;
  block-size: 1.85rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}
.collapse .icon { width: .9rem; height: .9rem; transition: transform var(--speed) ease; }
[data-collapsed="true"] .collapse .icon { transform: rotate(180deg); }
nav { display: grid; gap: .2rem; }
.menu-bottom { margin-top: auto; padding-top: .65rem; }
.theme { cursor: pointer; }
main { flex: 1; min-width: 0; }
.hero {
  display: grid;
  align-items: end;
  min-height: min(41rem, 90svh);
  padding: clamp(1.5rem, 6vw, 6rem);
  border: 1px solid #ffe4d52d;
  border-radius: 1.25rem;
  overflow: hidden;
  color: #fff5ef;
  background: linear-gradient(90deg, #110e10ed, #1c1317a3 45%, #1c131712 85%),
    url("materials.webp") center / cover,
    radial-gradient(ellipse at 90% 24%, #8e4c35, #252021 60%, #161215 90%);
}
.hero h1 { margin: 0; }
.hero h1 img { display: block; width: clamp(10rem, 27vw, 21rem); max-width: 100%; height: auto; }
.hero p { max-width: 26ch; margin: 1.65rem 0 1.35rem; font-size: clamp(1rem, 2vw, 1.35rem); }
.button {
  display: inline-block;
  padding: .78rem 1rem;
  border-radius: .55rem;
  background: var(--brand);
  color: white;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--brand-hover); }
.section {
  padding: clamp(2.25rem, 6vw, 5rem) clamp(.25rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 1rem;
}
.section h2 { margin: 0 0 1.25rem; font-size: clamp(1.65rem, 4vw, 3.15rem); line-height: 1.05; letter-spacing: -.055em; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--glass);
  text-decoration: none;
  transition: background-color var(--speed), border-color var(--speed);
}
.project:hover { border-color: var(--accent); background-color: var(--hover); }
.project-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.25fr 1fr; align-items: stretch; }
.project-art {
  display: grid;
  place-items: center;
  min-height: 7.8rem;
  padding: 1rem;
  color: var(--art-ink);
  background: radial-gradient(ellipse at 50% 75%, var(--art-bg), #14161a 85%);
}
.project-art svg { width: 4.85rem; max-width: 100%; stroke: currentColor; stroke-width: 1.4; }
.project-featured .project-art { min-height: 13rem; }
.project-featured svg { width: 8rem; }
.busola-art { --art-ink: #ff9fbe; --art-bg: #6a2748; }
.deckmate-art { --art-ink: #b9c5fb; --art-bg: #383660; }
.mopar-art { --art-ink: #ff9481; --art-bg: #69292c; }
.recipes-art { --art-ink: #dce2a7; --art-bg: #3b4b32; }
.project-content { display: grid; flex: 1; grid-template-rows: auto 1fr auto; gap: .5rem; padding: clamp(.8rem, 2vw, 1.5rem); overflow-wrap: anywhere; }
.project-name { font-size: 1.15rem; font-weight: 680; }
.project-featured .project-content { grid-template-rows: auto; align-content: center; }
.project-featured .project-name { font-size: clamp(1.4rem, 3vw, 2.6rem); line-height: 1.05; }
.project-description { color: var(--muted); font-size: 1rem; line-height: 1.5; }
.project-domain { font-size: .9rem; color: var(--muted); }
.services { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.services li + li { margin-top: .55rem; }
.services li::marker { color: var(--accent); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
.contact-form, .contact-direct { min-width: 0; padding: clamp(.9rem, 2vw, 1.4rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--glass); }
.contact-form { display: grid; gap: .9rem; }
.contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.contact-form label { display: grid; min-width: 0; gap: .35rem; font-weight: 600; }
.contact-form :is(input, select, textarea) { width: 100%; min-width: 0; min-height: 2.75rem; padding: .55rem .7rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: .55rem; font: inherit; font-weight: 400; }
.contact-form textarea { resize: vertical; }
.contact-form .button { justify-self: start; border: 0; cursor: pointer; }
.contact-form .button:disabled { cursor: wait; opacity: .75; }
.contact-note, .contact-status { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.45; }
.contact-status:empty { display: none; }
.contact-status[data-error="true"] { color: var(--accent); }
.contact-direct h3 { margin: 0; font-size: 1.15rem; }
.contact-direct p { margin: .55rem 0 1rem; overflow-wrap: anywhere; }
@media (max-width: 65rem) { .contact-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 30rem) { .contact-fields { grid-template-columns: minmax(0, 1fr); } }
.gallery-intro { max-width: 56ch; margin: 0 0 1.5rem; color: var(--muted); }
.work-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-bottom: 1.25rem;
}
.work-gallery figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: .9rem; background: var(--glass); }
.work-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.work-gallery figcaption { padding: .65rem .75rem; font-size: .95rem; }
.gallery-layout { display: grid; align-items: start; gap: 1rem; }
.gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--glass);
}
.gallery-card:has(.instagram-feed) { border-top-color: var(--accent); }
.gallery-card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .9rem; }
.gallery-card-header h3 { margin: 0; font-size: 1.15rem; }
.gallery-card-header .social-link { padding: .4rem .65rem; font-size: .9rem; background: transparent; }
.gallery-feed { width: min(100%, 31.25rem); margin-inline: auto; }
.gallery-feed iframe { display: block; width: 100%; height: 35rem; border: 0; }
.instagram-feed { width: 100%; }
.instagram-feed iframe { height: clamp(27rem, 48vw, 35rem); }
.social-links { display: flex; flex-wrap: wrap; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.social-link {
  display: inline-flex;
  padding: .65rem .9rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--glass);
  text-decoration: none;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); }
.media-settings {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: .9rem;
  background: var(--glass);
}
.media-settings p { margin: 0 0 .75rem; color: var(--muted); line-height: 1.5; }
.media-actions, .footer-legal { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.media-actions button { cursor: pointer; color: var(--ink); }
.media-actions button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.media-settings .consent-status { margin: .75rem 0 0; font-size: .9rem; }
.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 1rem;
  padding: 1.75rem clamp(.25rem, 4vw, 3rem);
  color: var(--muted);
  font-size: .9rem;
}
.footer-company { display: grid; gap: .3rem; }
.footer-company strong { color: var(--ink); }
.footer-company a { justify-self: start; }
.footer-legal { align-content: start; }
.site-footer a:hover, .legal-content a:hover { color: var(--accent); }
.site-footer small { grid-column: 1 / -1; font-size: inherit; }
.legal-frame { max-width: 58rem; margin-inline: auto; padding: 1rem; }
.legal-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: .75rem 0 1rem; }
.legal-header img { display: block; width: 9rem; height: auto; }
.legal-header nav { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.legal-content { padding: clamp(1rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--glass); line-height: 1.65; }
.legal-content h1 { margin: 0; font-size: clamp(1.9rem, 5vw, 3rem); line-height: 1.1; }
.legal-content h2 { margin-top: 1.6rem; font-size: 1.25rem; line-height: 1.25; }
.legal-content p, .legal-content li { color: var(--muted); }
.legal-content li + li { margin-top: .4rem; }

@media (min-width: 66rem) {
  .gallery-layout { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

@media (max-width: 66rem) {
  .work-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 44rem) {
  .layout { display: block; padding: .75rem; }
  .sidebar { top: .5rem; width: 100%; margin-bottom: .75rem; transition: none; }
  .glass { min-height: 0; }
  .brand { min-height: 3rem; margin-bottom: 0; margin-inline: 2.75rem; width: auto; }
  [data-collapsed="true"] .brand-wordmark { opacity: 1; }
  [data-collapsed="true"] .brand-emblem { opacity: 0; }
  .collapse { top: .75rem; right: .65rem; bottom: auto; inline-size: 2.75rem; block-size: 2.75rem; border-radius: .7rem; }
  .collapse .icon { transform: rotate(90deg); }
  [data-collapsed="true"] .collapse .icon { transform: rotate(-90deg); }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .35rem; }
  [data-collapsed="true"] :is(nav, .menu-bottom) { display: none; }
  .hero { min-height: min(34rem, 74svh); padding: 1.25rem; background-position: 50%, 62%, 50%; }
  .section { scroll-margin-top: 6rem; }
  .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 32rem) {
  .projects { grid-template-columns: 1fr; }
  .project-featured { display: flex; }
  .project-featured .project-art { min-height: 10rem; }
  .site-footer { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0ms !important; }
}
