/* Lukas Blahuta — blahuta.com visual upgrade */
:root {
  --paper: #f4efe6;
  --paper-deep: #ebe3d4;
  --card: rgba(255, 251, 245, 0.86);
  --card-solid: #fffbf5;
  --ink: #171411;
  --muted: #6a635b;
  --soft: #8a8278;
  --line: rgba(226, 216, 200, 0.9);
  --accent: #8a5a2b;
  --accent-soft: #c4a27a;
  --shadow: 0 18px 40px rgba(23, 20, 17, 0.08);
  --shadow-deep: 0 28px 60px rgba(23, 20, 17, 0.16);
  --serif: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", system-ui, sans-serif;
  --wrap: 74rem;
  --glass: saturate(1.2) blur(18px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .hero-media img, .hero-slide, .hero-overlay, .hero-copy, .marquee-track,
  .ticker-track, .scroll-cue, .slide img, .about-photo img {
    transition: none !important;
    animation: none !important;
  }
  .hero-media > .hero-slide:not(.is-active) { display: none !important; }
  .marquee-track, .ticker-track { transform: none !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    url("texture.svg"),
    radial-gradient(1200px 560px at 12% -8%, rgba(196, 162, 122, 0.28), transparent 60%),
    radial-gradient(900px 520px at 100% 0%, rgba(235, 227, 212, 0.95), transparent 55%);
  background-attachment: fixed, scroll, scroll;
  background-size: 220px 220px, auto, auto;
  line-height: 1.65;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
a:focus-visible, .brand:focus-visible, .scroll-cue:focus-visible,
.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  z-index: 30;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  background: rgba(244, 239, 230, 0.72);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.35rem;
  gap: 1.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(255,251,245,0.7);
}
.brand-text {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.site-nav { display: flex; gap: 1.3rem; font-size: 0.92rem; font-weight: 500; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(calc(100vh - 4.35rem), 48rem);
  display: grid;
  align-items: stretch;
  overflow: hidden;
  color: #f4efe6;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media > .hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.08);
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  z-index: 0;
  pointer-events: none;
}
.hero-media > .hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.36;
  z-index: 2;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    linear-gradient(90deg, rgba(17,14,12,0.62) 0%, rgba(17,14,12,0.34) 38%, rgba(17,14,12,0.16) 70%, rgba(17,14,12,0.28) 100%),
    linear-gradient(180deg, rgba(17,14,12,0.16) 0%, transparent 32%, rgba(17,14,12,0.42) 100%);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15.5rem;
  gap: 1.5rem;
  align-items: end;
  padding: 6.5rem 0 3.2rem;
  min-height: inherit;
}

.hero-copy.glass {
  max-width: 38rem;
  padding: 1.8rem 1.7rem 1.6rem;
  border-radius: 1.4rem;
  background: rgba(23, 20, 17, 0.38);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(244, 239, 230, 0.18);
  box-shadow: var(--shadow-deep);
}

.eyebrow {
  margin: 0 0 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--accent-soft);
}
.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.2rem, 9vw, 7.2rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #f7f2ea;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.lede {
  max-width: 34rem;
  margin: 1.4rem 0 0;
  font-size: 1.15rem;
  color: rgba(244, 239, 230, 0.86);
  font-weight: 300;
}
.scroll-cue {
  display: inline-block;
  margin-top: 1.8rem;
  color: #f4efe6;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 0.15rem;
}
.scroll-cue:hover { color: #fff; border-bottom-color: #fff; }

/* Vertical marquee */
.marquee {
  justify-self: end;
  width: 15.5rem;
}
.marquee-viewport {
  height: min(34rem, 62vh);
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid rgba(244, 239, 230, 0.2);
  background: rgba(23, 20, 17, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-deep);
  mask-image: linear-gradient(180deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.7rem;
  animation: marquee-up 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-up {
  from { transform: translateY(0); }
  to { transform: translateY(-50%); }
}
.marquee-item, .ticker-item {
  margin: 0;
  position: relative;
  border-radius: 0.8rem;
  overflow: hidden;
  background: #1a1714;
}
.marquee-item img, .ticker-item img {
  width: 100%;
  height: 9.2rem;
  object-fit: cover;
  display: block;
}
.marquee-item figcaption, .ticker-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.4rem 0.6rem 0.45rem;
  background: linear-gradient(transparent, rgba(17,14,12,0.88));
  color: #f4efe6;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.ticker-mobile { display: none; overflow: hidden; padding: 0.8rem 0 0.2rem; }
.ticker-track {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  animation: ticker-x 60s linear infinite;
  padding-inline: 1.25rem;
}
.ticker-mobile:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item { flex: 0 0 11.5rem; }
.ticker-item img { height: 7.4rem; }

/* Sections */
.work { padding: 3.4rem 0 4.2rem; }
.gallery { padding: 0 0 4.8rem; }
.about { padding: 0 0 5rem; }
.contact { position: relative; padding: 4.2rem 0 5.5rem; overflow: hidden; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.85rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.section-head h2, .about h2, .contact h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.section-head p { margin: 0; color: var(--soft); font-size: 0.98rem; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17.2rem, 1fr));
  gap: 1.15rem;
}

.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 0 0 1.3rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-deep);
  border-color: #d5c7b1;
}
.card-media {
  margin: 0 0 1rem;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #e8dfd0;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.card:hover .card-media img { transform: scale(1.06); }
.card .kicker, .card h3, .card p { padding-inline: 1.25rem; }
.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--accent);
}
.card h3 {
  margin: 0.45rem 0 0.55rem;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card .path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86em;
  color: var(--ink);
}
.links {
  margin-top: auto !important;
  padding: 1.15rem 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 0.08rem;
}
.links a:hover { border-bottom-color: var(--ink); }
.badge {
  display: inline-block;
  padding: 0.2rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 500;
}

/* Gallery carousel */
.carousel {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
}
.carousel-viewport {
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-deep);
  background: #1a1714;
  aspect-ratio: 16 / 9;
}
.carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  height: 100%;
  transition: transform 0.55s ease;
}
.slide {
  position: relative;
  min-width: 100%;
  height: 100%;
  margin: 0;
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 2.2rem 1.2rem 0.9rem;
  background: linear-gradient(transparent, rgba(17,14,12,0.78));
  color: #f4efe6;
  font-family: var(--serif);
  font-size: 1.25rem;
}
.carousel-btn {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,251,245,0.9);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.carousel-btn:hover { background: #fff; }
.carousel-dots {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
}
.carousel-dots button {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cfc4b3;
  cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: var(--accent); width: 1.2rem; }

/* About */
.about-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 2rem 3.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
  align-items: start;
}
.about-photo {
  margin-top: 1.4rem;
  border-radius: 1.15rem;
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--line);
}
.about-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16 / 10;
}
.about-copy {
  padding: 1.5rem 1.4rem;
  border-radius: 1.2rem;
  background: var(--card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  align-self: center;
}
.about-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 300;
}
.about-copy p:last-child { margin-bottom: 0; }

/* Contact with photo backdrop */
.contact-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.contact-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.85);
}
.contact-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(244,239,230,0.82) 0%, rgba(244,239,230,0.55) 42%, rgba(244,239,230,0.78) 100%);
}
.contact .wrap, .contact .section-head, .contact .contact-list { position: relative; z-index: 1; }
.contact .section-head { border-top-color: rgba(23,20,17,0.12); }

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr));
  gap: 1.15rem;
}
.contact-list li {
  background: rgba(255, 251, 245, 0.82);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 1.2rem;
  padding: 1.4rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: var(--shadow-deep);
}
.contact-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  width: fit-content;
  padding-bottom: 0.08rem;
  font-weight: 500;
}
.contact-list a:hover { border-bottom-color: var(--ink); }
.placeholder {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--ink);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.2rem;
  color: var(--soft);
  font-size: 0.92rem;
  background: rgba(244,239,230,0.9);
}
.footer-inner p { margin: 0; }

@media (max-width: 960px) {
  .hero-layout { grid-template-columns: 1fr; padding: 5rem 0 2.4rem; }
  .marquee { display: none; }
  .ticker-mobile { display: block; }
  .hero { min-height: min(calc(100vh - 4.35rem), 36rem); }
}
@media (max-width: 800px) {
  .about-inner { grid-template-columns: 1fr; gap: 1.2rem; }
  .carousel { grid-template-columns: 1fr; }
  .carousel-btn {
    position: absolute;
    z-index: 2;
    top: 42%;
  }
  .carousel-btn.prev { left: 0.6rem; }
  .carousel-btn.next { right: 0.6rem; }
}
@media (max-width: 640px) {
  .header-inner { min-height: 3.8rem; }
  .site-nav { gap: 0.75rem; font-size: 0.85rem; }
  .hero-copy.glass { padding: 1.2rem 1.1rem; }
}
