:root {
  --dark:         #1C2833;
  --dark-mid:     #2E4057;
  --accent:       #E8751A;
  --accent-hover: #CF6616;
  --bg:           #F5F7FA;
  --white:        #FFFFFF;
  --text:         #2C3E50;
  --text-muted:   #7F8C8D;
  --border:       #DDE3EC;
  --shadow:       0 2px 8px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header / Nav ─────────────────────────────────────────── */
header {
  background: var(--dark);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.site-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  padding: 1rem 0;
  letter-spacing: 0.5px;
}
.site-title span { color: var(--accent); }

nav ul { list-style: none; display: flex; gap: 0.25rem; }

nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  padding: 0.45rem 0.8rem;
  border-radius: 5px;
  transition: background 0.18s, color 0.18s;
  font-size: 0.93rem;
}
nav a:hover, nav a.active {
  color: #fff;
  background: var(--accent);
}

/* ── Page hero (inner pages) ──────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  color: #fff;
  padding: 3rem 2rem;
  text-align: center;
}
.page-hero h1 { font-size: 2.1rem; margin-bottom: 0.4rem; }
.page-hero p  { color: rgba(255,255,255,0.72); font-size: 1.05rem; }

/* ── Home hero ────────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-mid) 100%);
  color: #fff;
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.home-hero img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  margin-bottom: 1.25rem;
}
.home-hero h1      { font-size: 2.4rem; margin-bottom: 0.35rem; }
.home-hero .tagline { font-size: 1.15rem; color: rgba(255,255,255,0.75); }

/* ── Main content wrapper ─────────────────────────────────── */
main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

/* ── Home nav cards ───────────────────────────────────────── */
.hero-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.hero-card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: transform 0.18s, box-shadow 0.18s;
}
.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.hero-card .icon  { font-size: 2.6rem; margin-bottom: 0.65rem; }
.hero-card h3     { margin-bottom: 0.35rem; color: var(--dark); font-size: 1.1rem; }
.hero-card p      { font-size: 0.88rem; color: var(--text-muted); }

/* ── Section headers ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.section-header h2 { font-size: 1.45rem; color: var(--dark); white-space: nowrap; }
.section-divider {
  height: 3px;
  background: linear-gradient(to right, var(--accent), transparent);
  border-radius: 2px;
  flex: 1;
}

/* ── Filter bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.filter-btn {
  padding: 0.35rem 1rem;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: var(--white);
  cursor: pointer;
  font-size: 0.86rem;
  font-family: inherit;
  transition: all 0.18s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ── Tables ───────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead th {
  background: var(--dark);
  color: #fff;
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
thead th:first-child { border-radius: 4px 0 0 0; }
thead th:last-child  { border-radius: 0 4px 0 0; }

tbody tr:nth-child(even) { background: #F8FAFC; }
tbody tr:hover           { background: #EDF2F7; }
tbody td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

/* ── Filament-specific ────────────────────────────────────── */
.filament-swatch {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.18);
  vertical-align: middle;
  margin-right: 6px;
  flex-shrink: 0;
}

.type-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.type-badge[data-type="PLA"]     { background: #E8F5E9; color: #2E7D32; }
.type-badge[data-type="PLA+"]    { background: #E3F2FD; color: #1565C0; }
.type-badge[data-type="PLA+2.0"] { background: #E1F5FE; color: #0277BD; }
.type-badge[data-type="PETG"]    { background: #FFF3E0; color: #E65100; }
.type-badge[data-type="TPU"]     { background: #F3E5F5; color: #6A1B9A; }

.desc-cell {
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: help;
}

.source-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 1rem;
}
.source-link:hover { color: var(--accent-hover); }

.type-table-wrapper { overflow-x: auto; }

/* ── Gallery ──────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.gallery-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.18s, box-shadow 0.18s;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.gallery-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--bg);
}
.gallery-card-body  { padding: 1rem; }
.gallery-card-body h3 { margin-bottom: 0.3rem; font-size: 1rem; }
.gallery-card-body p  { font-size: 0.87rem; color: var(--text-muted); }
.gallery-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

.gallery-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 2rem;
  color: var(--text-muted);
}
.gallery-placeholder .placeholder-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.gallery-placeholder h3 { margin-bottom: 0.4rem; color: var(--dark); }

.tags { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.tag {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ── Contact page ─────────────────────────────────────────── */
.contact-wrapper {
  max-width: 560px;
  margin: 0 auto;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--white);
  border-radius: 8px;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.contact-icon { font-size: 1.4rem; width: 2rem; text-align: center; flex-shrink: 0; }
.contact-item a { color: var(--accent); text-decoration: none; }
.contact-item a:hover { color: var(--accent-hover); text-decoration: underline; }

.print-request {
  margin-top: 1.75rem;
}
.print-request h3 { font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--dark); }
.print-request ul { padding-left: 1.4rem; line-height: 2; }
.print-request .note {
  margin-top: 1rem;
  font-size: 0.87rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── About page ───────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  border-radius: 8px;
  border: 3px solid var(--accent);
  box-shadow: var(--shadow);
  display: block;
}
.about-bio h2 { font-size: 1.75rem; margin-bottom: 0.5rem; color: var(--dark); }
.about-bio p  { margin-bottom: 1rem; line-height: 1.75; }

.spec-list { list-style: none; }
.spec-item {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.spec-item:last-child { border-bottom: none; }
.spec-label { font-weight: 600; color: var(--dark); min-width: 160px; flex-shrink: 0; }

.learning-list { padding-left: 1.4rem; line-height: 2.2; }
.learning-list li { margin-bottom: 0.1rem; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  text-align: center;
  padding: 1.4rem;
  font-size: 0.88rem;
  margin-top: auto;
}
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 700px) {
  header {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 1rem;
    gap: 0.25rem;
  }
  .site-title { padding: 0.4rem 0; }
  nav ul { flex-wrap: wrap; justify-content: center; gap: 0.2rem; padding-bottom: 0.4rem; }

  .home-hero { padding: 2.5rem 1rem 2rem; }
  .home-hero img { width: 120px; height: 120px; }
  .home-hero h1  { font-size: 1.8rem; }

  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 200px; margin: 0 auto; }

  .spec-item { flex-direction: column; gap: 0.2rem; }
  .spec-label { min-width: unset; }
}
