/* FGC Basel — simple, theme-aware stylesheet. */

:root,
:root[data-theme="dark"] {
  --bg: #1f2937;
  --surface: #111827;
  --surface-2: #263241;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #374151;
  --accent: #ec4899;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f9fafb;
  --surface-2: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #db2777;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a:hover {
  color: var(--accent);
}

.theme-toggle,
.to-top {
  background: none;
  border: 1px solid var(--border);
  color: inherit;
  border-radius: 0.5rem;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover,
.to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Hero ---- */
.hero {
  padding: 3rem 0 1rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-text h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.hero-text p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0;
}

.hero-banner {
  border-radius: 1rem;
  box-shadow: var(--shadow);
  width: 100%;
}

/* ---- Card grid ---- */
.section-block {
  padding: 2rem 1.5rem 3rem;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card-media {
  position: relative;
  background: var(--surface-2);
}

.card-media img {
  display: block;
  width: 100%;
  height: 13rem;
  object-fit: contain;
}

.card-date {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  padding: 0.15rem 0.5rem;
  border-radius: 0.4rem;
}

.card-body {
  padding: 1rem;
}

.card-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.card-desc {
  color: var(--muted);
  font-size: 0.95rem;
}

.more {
  text-align: center;
  margin-top: 2.5rem;
}

.button {
  display: inline-block;
  padding: 0.7rem 2rem;
  border-radius: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}

.button:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---- Page head (section intro) ---- */
.page-head {
  padding-top: 2.5rem;
}

.page-head h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
}

/* ---- Single post ---- */
.post-hero {
  position: relative;
  margin-top: 2rem;
}

.post-hero img {
  width: 100%;
  max-height: 20rem;
  object-fit: contain;
  border-radius: 0.9rem;
}

.post-date {
  position: absolute;
  top: 1rem;
  right: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.25rem 0.6rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
}

.post {
  margin-top: 2rem;
}

/* ---- Prose (rendered markdown) ---- */
.prose {
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.prose h1 {
  font-size: 2rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.prose h2 {
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.5rem;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 1rem;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul,
.prose ol {
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.25rem;
}

.prose blockquote {
  border-left: 3px solid var(--accent);
  margin: 1rem 0;
  padding: 0.25rem 0 0.25rem 1rem;
  color: var(--muted);
}

.prose code {
  background: var(--surface-2);
  padding: 0.15em 0.35em;
  border-radius: 0.3rem;
  font-size: 0.9em;
}

.prose pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.6rem;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose img {
  border-radius: 0.6rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.prose th,
.prose td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.figure {
  margin: 1.5rem 0;
  text-align: center;
}

.figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.video-embed {
  position: relative;
  padding-top: 56.25%;
  margin: 1.5rem 0;
  border-radius: 0.6rem;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Social ---- */
.social {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3rem 0;
  margin-top: 2rem;
  text-align: center;
}

.social h2 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.social-lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  transition: transform 0.15s, border-color 0.15s, color 0.15s;
}

.social-link svg {
  width: 1.2rem;
  height: 1.2rem;
}

.social-link:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}
