/* ===========================================================
   josefhornak.cz - portfolio, apploud-inspired restraint
   Onest (display + body), no italics.
   Deep burgundy accent. No decorative gradients.
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.55;
  color: #141414;
  background: #f5f0ea;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2, h3, h4 {
  font-family: 'Onest', sans-serif;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  margin: 0;
}
em {
  font-style: normal;
  color: var(--accent);
}
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: #722530; color: #f5f0ea; }

:root {
  --max: 1280px;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --ink: #141414;
  --ink-soft: rgba(20,20,20,0.7);
  --ink-muted: rgba(20,20,20,0.5);
  --paper: #f5f0ea;
  --paper-warm: #ece5db;
  --line: rgba(20,20,20,0.12);
  --accent: #722530;
  --accent-hover: #8d333f;
  --accent-soft: #e6c8cd;
  --accent-deep: #45171f;
  --dark: #14080a;
}

main { display: block; overflow-x: hidden; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  background: rgba(245,240,234,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.brand-mark {
  width: 52px; height: 52px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(69,23,31,0.28));
  transition: transform .25s ease;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.brand:hover .brand-mark { transform: translateY(-1px); }
.brand-name {
  font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft);
}

.nav-links { display: flex; gap: 2.25rem; align-items: center; }
.nav-links a {
  font-size: 0.93rem; font-weight: 500;
  color: var(--ink-soft);
  transition: color .15s ease;
}
.nav-links a:not(.cta):hover { color: var(--accent); }
.nav-links a.cta {
  background: var(--ink); color: var(--paper);
  padding: 0.65rem 1.3rem; border-radius: 999px;
  font-weight: 500;
  transition: background .25s ease, transform .25s ease;
}
.nav-links a.cta:hover { background: var(--accent); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none; border: 0; width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  padding: clamp(3.5rem, 9vw, 8rem) var(--pad) clamp(3rem, 6vw, 5rem);
  max-width: var(--max);
  margin: 0 auto;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.hero-text { display: flex; flex-direction: column; }
.hero-photo {
  position: relative;
  margin: 0 0 0 auto;
  width: clamp(280px, 40vw, 440px);
  aspect-ratio: 3 / 5;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 38px 80px rgba(20,8,10,0.24);
}
.hero-photo::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(20,8,10,0.10);
  z-index: 2;
}
.hero-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 16%;
  z-index: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.9rem;
  font-size: 1.05rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 2.5rem; font-weight: 600;
}
.eyebrow::before,
.eyebrow::after {
  content: ""; width: 42px; height: 1px; background: var(--accent);
}

.hero-title {
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin-bottom: 2rem;
}

.hero-lead {
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  font-weight: 400;
  max-width: 620px;
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  line-height: 1.5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 1rem 1.8rem;
  font-weight: 600; font-size: 0.98rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .2s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn::after { content: "→"; font-size: 1.1rem; transition: transform .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:hover::after { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Email pill (replaces arrow CTA) */
.email-pill {
  display: inline-flex; align-items: center; gap: 0.75rem;
  align-self: flex-start;
  padding: 0.85rem 1.4rem 0.85rem 0.85rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  transition: background .25s ease, transform .25s ease;
  margin-top: 1rem;
}
.email-pill:hover { background: var(--accent); transform: translateY(-1px); }
.email-pill-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: rgba(245,240,234,0.12);
  border-radius: 50%;
  color: var(--paper);
  flex-shrink: 0;
}
.email-pill-text { padding-right: 0.4rem; }

/* Hero tag strip */
.hero-tags {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 2.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.hero-tag::before,
.hero-tag::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.hero-tag strong {
  color: var(--accent);
  font-weight: 800;
}

/* ============ SECTIONS ============ */
.section {
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); max-width: 920px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.section-tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.section-tag.light { color: var(--accent-soft); }
.section-tag.light::before { background: var(--accent-soft); }
.section h2 {
  font-size: clamp(2.5rem, 6.75vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

/* ============ PROJECTS GRID ============ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.project { margin: 0; }

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  color: inherit;
  transition: transform .4s ease, box-shadow .4s ease, border-color .4s ease;
  height: 100%;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px -22px rgba(20,8,10,0.2);
  border-color: var(--ink);
}

.project-visual {
  position: relative;
  overflow: hidden;
  background: var(--paper-warm);
  aspect-ratio: 16 / 10;
}
.project-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform .6s ease;
  display: block;
}
.project-card:hover .project-visual img { transform: scale(1.03); }

.project-info {
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  display: flex; flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.project-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.project-num {
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.project-year { letter-spacing: 0.01em; }

.project-title {
  font-size: clamp(1.75rem, 2.6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
}
.project-tagline {
  font-size: clamp(1.1rem, 1.3vw, 1.25rem);
  color: var(--accent);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.project-desc {
  font-size: 0.98rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0.25rem 0 0.5rem;
}
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.project-tags li {
  font-size: 0.78rem; padding: 0.3rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 500;
}
.project-link {
  display: inline-flex; align-items: center; gap: 0.6rem;
  align-self: center;
  margin-top: auto;
  padding: 0.45rem 1.1rem 0.45rem 0.45rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: -0.01em;
  transition: background .25s ease, transform .25s ease;
}
.project-link-icon {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: rgba(245,240,234,0.14);
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform .25s ease;
}
.project-card:hover .project-link { background: var(--accent); transform: translateY(-1px); }
.project-card:hover .project-link-icon { transform: translate(2px, -2px); }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem var(--pad);
  background: var(--paper);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: 0.9rem; color: var(--ink-muted);
  font-weight: 500;
}
.footer-social { display: flex; gap: 0.5rem; }
.footer-social a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.footer-social a:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-1px);
}

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.is-open {
    display: flex; flex-direction: column; gap: 1rem; align-items: flex-start;
    position: absolute; top: 100%; right: 0; left: 0;
    padding: 1.5rem var(--pad) 2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open a { font-size: 1.15rem; color: var(--ink); }
  .nav-toggle { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-photo { order: -1; width: clamp(220px, 70vw, 300px); margin: 0 auto; }
  .hero-tags { justify-content: flex-start; flex-wrap: wrap; gap: 1.4rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
