/* =========================================================
   Eliška Pechlatová — portfolio styles
   Palette:
     --bg:      #f5f0e8  cream
     --text:    #2d3d2e  dark forest
     --accent:  #619b5f  mossy green
     --light:   #a7c584  light moss
     --surface: #eee8da  surface
   Fonts: Cormorant Garamond (headings) + DM Sans (body)
   ========================================================= */

:root {
  --bg: #f5f0e8;
  --text: #2d3d2e;
  --accent: #619b5f;
  --light: #a7c584;
  --surface: #eee8da;
  --text-soft: #5a6b5b;
  --border: #d9d2c2;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 4px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: 140px 0;
  position: relative;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 72px;
  letter-spacing: -0.01em;
}

.subsection-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 72px 0 24px;
}

/* ===================== NAV ===================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 22px 0;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), padding 0.35s var(--ease);
}

.nav.scrolled {
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 rgba(45, 61, 46, 0.06);
  padding: 14px 0;
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  transition: color 0.3s var(--ease);
}
.nav.scrolled .nav-name { color: var(--text); }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #fff;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.nav.scrolled .nav-links a { color: var(--text); }

.nav-links a:hover,
.nav-links a.active {
  border-bottom-color: currentColor;
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  padding: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: #fff;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled .nav-toggle span { background: var(--text); }

.nav-toggle.open span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* ===================== HERO ===================== */

.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: var(--text);
}

.hero-contours {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-contours svg { width: 100%; height: 100%; }

.hero-ticker {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
}

.ticker-track {
  display: flex;
  height: 100%;
  width: max-content;
  animation: ticker 40s linear infinite;
  will-change: transform;
}

@keyframes ticker {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.ticker-slide {
  flex: 0 0 auto;
  width: 600px;
  height: 100%;
  object-fit: cover;
  display: block;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(45, 61, 46, 0.55);
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
  color: #fff;
}

.hero-sub {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.92);
  margin: 0;
}

.hero-arrow {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 5;
  color: rgba(255,255,255,0.85);
  display: inline-flex;
  padding: 10px;
  animation: bounce 2.4s ease-in-out infinite;
}
.hero-arrow:hover { color: #fff; }

@keyframes bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 8px); }
}

/* ===================== ABOUT ===================== */

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 96px;
  align-items: start;
}

.photo-frame {
  width: 100%;
  aspect-ratio: 4 / 5;
  background-color: #cfc8b7;
  background-image: linear-gradient(135deg, #cfc8b7, #b8b0a0);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin: 0 0 20px;
  max-width: 56ch;
}
.about-text p:last-child { margin-bottom: 0; }

/* ===================== PROJECTS ===================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.project-card {
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background-color: var(--accent);
  background-image: linear-gradient(135deg, #4d8b4b 0%, #7cae79 60%, #a7c584 100%);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 0.5s var(--ease);
}
.project-card:hover .project-image { transform: translateY(-4px); }

.project-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.project-teaser {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
  max-width: 40ch;
}

.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* ===================== EXPERIENCE ===================== */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  border-left: 1px solid var(--border);
  margin-left: 12px;
}

.timeline-item {
  position: relative;
  padding: 10px 0 36px 40px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-year {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 6px;
}

.timeline-role {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 2px;
  line-height: 1.25;
}

.timeline-org {
  font-size: 0.98rem;
  color: var(--text-soft);
  margin: 0 0 10px;
}

.timeline-item .tags { margin-top: 4px; }

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text);
  background: var(--surface);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.awards-list .pill {
  font-family: var(--serif);
  font-size: 0.98rem;
  font-style: italic;
  font-weight: 500;
}

/* ===================== CONTACT ===================== */

.contact-inner {
  max-width: 640px;
  text-align: center;
}

.contact .section-title { margin-bottom: 40px; }

.contact-email {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin: 0 0 28px;
  font-weight: 500;
}
.contact-email a { border-bottom: 1px solid var(--border); padding-bottom: 2px; transition: border-color 0.25s var(--ease); }
.contact-email a:hover { border-bottom-color: var(--accent); }

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 56px;
}

.icon-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.icon-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.contact-form {
  display: grid;
  gap: 18px;
  text-align: left;
  margin-top: 8px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 500;
}

.field input,
.field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 10px 2px;
  resize: vertical;
  transition: border-color 0.25s var(--ease);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  justify-self: start;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:hover { background: #4d8b4b; transform: translateY(-1px); }

/* ===================== FOOTER ===================== */

.footer {
  padding: 40px 0 50px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer p {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

/* ===================== MODAL ===================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 61, 46, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: fade 0.25s var(--ease);
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-radius: 6px;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 60px rgba(45, 61, 46, 0.25);
  animation: rise 0.35s var(--ease);
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: rgba(255,255,255,0.85);
  color: var(--text);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s var(--ease);
}
.modal-close:hover { background: #fff; }

.modal-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--accent);
  background-image: linear-gradient(135deg, #4d8b4b, #7cae79, #a7c584);
  background-size: cover;
  background-position: center;
}

.modal-body {
  padding: 36px 40px 40px;
}

.modal-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.15;
  margin: 0 0 14px;
}

.modal-desc {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  margin: 18px 0 26px;
}

.modal-visit { justify-self: start; }
.modal-visit.hidden { display: none; }

/* ===================== REVEAL ANIMATION ===================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 300ms var(--ease), transform 300ms var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ticker-track { animation: none; }
  .hero-arrow { animation: none; }
  html { scroll-behavior: auto; }
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
  .section { padding: 96px 0; }
  .section-title { margin-bottom: 48px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .photo-frame { max-width: 420px; }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 24px;
  }

  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 82vw);
    background: var(--bg);
    flex-direction: column;
    gap: 8px;
    padding: 96px 32px 40px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    box-shadow: -6px 0 30px rgba(45, 61, 46, 0.1);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    color: var(--text);
    font-size: 1.1rem;
    padding: 10px 0;
  }

  .ticker-slide { width: 420px; }

  .modal-body { padding: 28px 24px 32px; }
  .modal-title { font-size: 1.6rem; }

  .container { padding: 0 24px; }
}

@media (max-width: 560px) {
  .section { padding: 80px 0; }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .ticker-slide { width: 300px; }

  .contact-form .btn { width: 100%; justify-self: stretch; text-align: center; }

  .timeline { margin-left: 6px; }
  .timeline-item { padding-left: 28px; }
}
