/* ── Jack's Corner — Personal Blog Stylesheet ─────────────────────── */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter/InterVariable.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter/InterVariable-Italic.woff2') format('woff2');
}

/* ── Reset & Base ───────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #1a1a2e;
  background: #faf9f7;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: #5b4a8a;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #3d2e6e;
}

/* ── Layout ─────────────────────────────────────────────────────── */

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

.jc-container-narrow {
  max-width: 740px;
}

/* ── Header ─────────────────────────────────────────────────────── */

.jc-header {
  background: #1a1a2e;
  color: #fff;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.jc-header .jc-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.jc-logo {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.jc-logo:hover {
  color: #e8dff5;
}

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

.jc-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
}
.jc-nav a:hover {
  color: #fff;
}

.jc-lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.jc-lang-switch img {
  display: inline;
  border-radius: 2px;
}

/* ── Hero ────────────────────────────────────────────────────────── */

.jc-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2a4a 100%);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem 3.5rem;
}

.jc-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.jc-tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.7);
  font-style: italic;
}

/* ── About Section (homepage) ────────────────────────────────────── */

.jc-about-section {
  padding: 3rem 0 1rem;
}

.jc-about {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.jc-about-img {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
}

.jc-about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jc-about-body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.jc-about-body p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.jc-about-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #5b4a8a;
}
.jc-about-link:hover {
  color: #3d2e6e;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .jc-about {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .jc-about-img {
    width: 120px;
    height: 120px;
  }
}

/* ── Sections ────────────────────────────────────────────────────── */

.jc-section {
  padding: 3rem 0;
}

.jc-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.jc-section-center {
  text-align: center;
  padding: 5rem 0;
}

/* ── Post Grid ───────────────────────────────────────────────────── */

.jc-post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.jc-post-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.jc-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.jc-post-card-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.jc-post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.jc-post-card:hover .jc-post-card-img img {
  transform: scale(1.03);
}

.jc-post-card-body {
  padding: 1.25rem 1.5rem;
}

.jc-post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.jc-post-card-body time {
  font-size: 0.8rem;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Category Chips ─────────────────────────────────────────────── */

.jc-cat-chip {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #eee;
  color: #555;
}
.jc-cat-vidnesbyrd { background: #e8f5e9; color: #2e7d32; }
.jc-cat-tanker     { background: #e8eaf6; color: #3949ab; }
.jc-cat-undervisning { background: #fff3e0; color: #e65100; }

/* ── Category Filters ───────────────────────────────────────────── */

.jc-cat-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.jc-cat-btn {
  display: inline-block;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  color: #555;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.jc-cat-btn:hover {
  border-color: #5b4a8a;
  color: #5b4a8a;
}
.jc-cat-btn.active {
  background: #5b4a8a;
  border-color: #5b4a8a;
  color: #fff;
}

.jc-post-card-body h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 0.4rem 0 0.6rem;
  line-height: 1.35;
}
.jc-post-card-body h3 a {
  color: #1a1a2e;
}
.jc-post-card-body h3 a:hover {
  color: #5b4a8a;
}

.jc-post-card-body p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.55;
}

/* ── Single Post ─────────────────────────────────────────────────── */

.jc-post {
  padding: 2rem 0 3rem;
}

.jc-post-hero {
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}
.jc-post-hero img {
  width: 100%;
}

.jc-post-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e8e6e3;
}

.jc-post-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.jc-post-header time {
  font-size: 0.85rem;
  color: #888;
}

/* ── Prose (post body) ───────────────────────────────────────────── */

.jc-prose p {
  margin-bottom: 1.25rem;
}

.jc-prose h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2rem 0 0.75rem;
}

.jc-prose h3 {
  font-size: 1.15rem;
  font-weight: 650;
  margin: 1.5rem 0 0.5rem;
}

.jc-prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.jc-prose strong {
  font-weight: 650;
}

.jc-prose blockquote {
  border-left: 3px solid #5b4a8a;
  padding: 0.5rem 1rem;
  margin: 1.25rem 0;
  color: #555;
  font-style: italic;
}

.jc-prose ul, .jc-prose ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.jc-prose li {
  margin-bottom: 0.4rem;
}

.jc-prose img {
  border-radius: 8px;
  margin: 1.5rem 0;
}


/* ── Share Bar ───────────────────────────────────────────────────── */

.jc-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0;
  margin-top: 2rem;
  border-top: 1px solid #e8e6e3;
  font-size: 0.9rem;
}

.jc-share span {
  color: #888;
  font-weight: 500;
}

.jc-share a {
  color: #5b4a8a;
  font-weight: 500;
}
.jc-share a:hover {
  color: #3d2e6e;
  text-decoration: underline;
}

/* ── Search ──────────────────────────────────────────────────────── */

.jc-search {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.jc-search-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid #d4d2cf;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s;
}
.jc-search-input:focus {
  outline: none;
  border-color: #5b4a8a;
  box-shadow: 0 0 0 3px rgba(91,74,138,0.12);
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.jc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  background: #5b4a8a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.jc-btn:hover {
  background: #3d2e6e;
  color: #fff;
}

/* ── Empty State ─────────────────────────────────────────────────── */

.jc-empty {
  color: #888;
  font-style: italic;
  padding: 2rem 0;
}

/* ── AI Pill ─────────────────────────────────────────────────────── */

.jc-ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: linear-gradient(135deg, #7c5cbf 0%, #5b4a8a 100%);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.jc-ai-pill:hover {
  color: #fff;
  opacity: 0.9;
}
.jc-ai-pill svg {
  width: 14px;
  height: 14px;
}

/* ── Cookie Notice ──────────────────────────────────────────────── */

.jc-cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #1a1a2e;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  padding: 0.75rem 0;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

.jc-cookie-notice .jc-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.jc-cookie-notice p {
  margin: 0;
  line-height: 1.5;
}

.jc-cookie-notice a {
  color: #e8dff5;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.jc-cookie-notice a:hover {
  color: #fff;
}

.jc-cookie-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.jc-cookie-close:hover {
  color: #fff;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.jc-footer {
  background: #1a1a2e;
  color: rgba(255,255,255,0.6);
  padding: 2rem 0;
  font-size: 0.85rem;
}

.jc-footer .jc-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.jc-footer a {
  color: rgba(255,255,255,0.6);
}
.jc-footer a:hover {
  color: #fff;
}

/* ── 404 ─────────────────────────────────────────────────────────── */

.jc-section-center h1 {
  font-size: 4rem;
  font-weight: 800;
  color: #d4d2cf;
  margin-bottom: 0.5rem;
}

.jc-section-center p {
  color: #888;
  margin-bottom: 1.5rem;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .jc-header .jc-container {
    flex-wrap: wrap;
  }
  .jc-nav {
    gap: 1rem;
  }
  .jc-hero {
    padding: 3rem 1.5rem 2.5rem;
  }
  .jc-post-grid {
    grid-template-columns: 1fr;
  }
  .jc-search {
    flex-direction: column;
  }
  .jc-footer .jc-container {
    flex-direction: column;
    text-align: center;
  }
}
