/* ==========================================================================
   styles.css — Single stylesheet for the portfolio
   ==========================================================================
   Sections:
     1. Variables & reset
     2. Base / typography
     3. Buttons
     4. Header + navigation
     5. Hero banners (section headers)
     6. Generic sections
     7. Home page
     8. Projects
     9. Contact
    10. Footer
    11. Responsive
   ========================================================================== */

/* ── 1. Variables & reset ─────────────────────────────────────────────── */
:root {
  --page-bg:     #BFC1B3;   /* sage page background (original theme) */
  --surface:     #ffffff;
  --border:      #e2dfd8;
  --text-dark:   #1a1917;
  --text-mid:    #5a5854;
  --text-light:  #9b9791;
  --navy:        darkblue;   /* name / headings accent */
  --red:         rgb(255, 45, 0); /* contact + demo accent */
  --accent:      #1d6b4e;    /* project green */
  --accent-bg:   #e8f4ef;
  --accent-text: #0f3d2b;
  --tag-bg:      #edeae4;
  --tag-text:    #4a4844;
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --shadow:       0 1px 3px rgba(0,0,0,0.07), 0 4px 16px rgba(0,0,0,0.05);
  --shadow-hover: 0 2px 6px rgba(0,0,0,0.09), 0 8px 28px rgba(0,0,0,0.09);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --transition:   0.22s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── 2. Base / typography ─────────────────────────────────────────────── */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--page-bg);
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.6;
}

main { flex: 1; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ── 3. Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-text); }

.btn-demo { background: var(--red); color: #fff; border-radius: 10px; }
.btn-demo:hover { transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: #fff; }

/* ── 4. Header + navigation ───────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 10px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background-color: rgba(245, 245, 245, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: 10px 18px;
}

.pic-home { display: inline-flex; }
.pic-home img { height: 40px; width: 40px; border-radius: 50%; object-fit: cover; }

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.navig {
  display: inline-block;
  font-size: 1rem;
  font-family: var(--font-body);
  color: black;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  transition: transform var(--transition), color var(--transition), background var(--transition);
}
.navig:hover { background: rgba(0,0,0,0.05); }

.navig.cont { color: var(--red); }   /* Contact link keeps the red accent */

.navig.active { font-weight: 800; color: var(--navy); transform: scale(1.1); }
.navig.cont.active { color: var(--red); }

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: #1a1917;
  border-radius: 2px;
  transition: var(--transition);
}

/* ── 5. Hero banners (section headers) ────────────────────────────────── */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  padding: 4rem 1.5rem;
  border-radius: 20px;
  margin: 0 10px 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.hero--home {
  min-height: 62vh;
  background-image: url('/assets/lukas-blazek-mcSDtbWXUZU-unsplash.jpg');
}
.hero--contact {
  min-height: 38vh;
  background-image: url('/assets/melinda-gimpel-5Ne6mMQtIdo-unsplash.jpg');
}
.hero--projects {
  min-height: 32vh;
  background-image: linear-gradient(135deg, #1d6b4e 0%, #0f3d2b 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content { position: relative; z-index: 1; max-width: 720px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  color: #ffd9d0;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); color: #fff; }

.hero-lead { margin-top: 0.75rem; font-size: 1.05rem; max-width: 46ch; }

/* ── 6. Generic sections ──────────────────────────────────────────────── */
.section { padding: 3rem 1.5rem; max-width: 960px; margin: 0 auto; width: 100%; }

.section-title { font-size: 1.9rem; margin-bottom: 0.5rem; color: var(--navy); }
.section-subtitle { color: var(--text-mid); margin-bottom: 1.25rem; max-width: 55ch; }

.home-links { text-align: center; }
.home-links .section-subtitle { margin-left: auto; margin-right: auto; }

.section-404 { text-align: center; }
.section-404 h1 { font-size: 2.5rem; margin: 0.5rem 0; color: var(--navy); }
.section-404 p { color: var(--text-mid); margin-bottom: 1.5rem; }
.section-404 .eyebrow { color: var(--red); }

/* ── 7. Home page ─────────────────────────────────────────────────────── */
.home-content .eyebrow { color: #fff; }
.home-name { font-size: clamp(2.4rem, 6vw, 3.75rem); color: #fff; margin-bottom: 1.25rem; }

.intro-descr {
  background-color: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(2px);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  max-width: 40rem;
}
.intro-descr p { margin-bottom: 0.75rem; }
.intro-descr .btn-demo { margin-top: 0.5rem; }

/* ── 8. Projects ──────────────────────────────────────────────────────── */
.projects-section { max-width: 860px; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}
.filter-wrap { display: flex; align-items: center; gap: 8px; }
.filter-wrap label { font-size: 13px; color: var(--text-mid); }

.filter-select {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dark);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 28px 6px 10px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5854' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--accent); }

.project-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: var(--radius-lg);
  animation: listFadeIn 0.4s ease both;
}
@keyframes listFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.project-card {
  background: var(--surface);
  cursor: pointer;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.project-card:hover { box-shadow: var(--shadow-hover); }

.card-header {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.25rem;
  background-color: whitesmoke;
}

.card-thumb {
  width: 150px;
  height: 84px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: var(--tag-bg);
  padding: 6px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.project-card:hover .card-thumb { transform: scale(1.03); }

.card-info { min-width: 0; }
.card-info h3 {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-info p {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tag {
  display: inline-block;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--accent-bg);
  color: var(--accent-text);
}

.card-chevron {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--text-light);
  transition: transform 0.28s ease, color 0.2s ease;
}
.project-card.open .card-chevron { transform: rotate(180deg); color: var(--accent); }

.card-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-card.open .card-expand { max-height: 800px; }

.expand-inner {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.25rem 1.5rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease 0.15s, transform 0.2s ease 0.15s;
}
.project-card.open .expand-inner { opacity: 1; transform: translateY(0); }

.expand-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.expand-body { font-size: 14px; color: var(--text-mid); line-height: 1.75; margin-bottom: 1rem; }

.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.25rem; }
.pill { font-size: 12px; color: var(--tag-text); background: var(--tag-bg); border-radius: 20px; padding: 3px 11px; }

.expand-links { display: flex; gap: 8px; flex-wrap: wrap; }
.expand-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.expand-link:hover { background: var(--accent); color: #fff; }

/* "coming soon" demo button — looks like a button but isn't a link yet */
.expand-link--soon { color: var(--text-light); cursor: not-allowed; }
.expand-link--soon:hover { background: transparent; color: var(--text-light); }

/* ── 9. Contact ───────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.contact-info h2 { font-size: 1.6rem; color: var(--navy); margin-bottom: 0.5rem; }
.contact-info-lead { color: var(--text-mid); margin-bottom: 1.75rem; }

.info-item { display: flex; align-items: center; gap: 14px; margin-bottom: 1.1rem; }
.info-icon { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; }
.info-item > div { display: flex; flex-direction: column; }
.info-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
}
.info-item a, .info-item span:not(.info-label):not(.info-hint) { color: var(--text-dark); text-decoration: none; font-size: 0.95rem; }
.info-item a:hover { color: var(--accent); }
.info-hint { font-size: 0.72rem; color: var(--text-light); margin-top: 2px; }

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}
.contact-form-wrap h2 { font-size: 1.5rem; color: var(--navy); margin-bottom: 1.25rem; }

/* hide the honeypot from real users */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: #fafaf8;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.field textarea { resize: vertical; }

.form-error {
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f5c6c2;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.form-success { text-align: center; padding: 1.5rem 0.5rem; }
.success-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 1.6rem;
  margin-bottom: 1rem;
}
.form-success h2 { color: var(--navy); margin-bottom: 0.5rem; }
.form-success p { color: var(--text-mid); margin-bottom: 1.25rem; }

/* ── 10. Footer ───────────────────────────────────────────────────────── */
.site-footer {
  padding: 12px 18px;
  margin: 0 10px 10px;
  display: flex;
  justify-content: flex-end;
  background-color: rgba(245, 245, 245, 0.45);
  border-radius: 20px;
  font-size: 0.8rem;
}
.site-footer p { color: #1a1917; }

/* ── 11. Responsive ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .main-nav {
    position: absolute;
    top: calc(100% + 6px);
    right: 10px;
    left: 10px;
    background: rgba(245, 245, 245, 0.97);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .navig { display: block; }

  .contact-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 560px) {
  .card-header { grid-template-columns: 90px 1fr auto; gap: 0.9rem; padding: 0.9rem 1rem; }
  .card-thumb { width: 90px; height: 60px; }
  .hero { padding: 3rem 1.25rem; }
}
