/* ==========================================================================
   Guido Steinacker — Custom Jekyll Theme
   Nautical-subtle: deep blue, sand, warm white
   ========================================================================== */

/* ==========================================================================
   Self-hosted fonts (DSGVO-konform, no external requests)
   ========================================================================== */

/* Inter — latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Inter — latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Source Serif 4 — latin-ext */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Source Serif 4 — latin */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* JetBrains Mono — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* JetBrains Mono — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Poiret One — latin (display font, used only for the site wordmark) */
@font-face {
  font-family: 'Poiret One';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/poiret-one-latin.woff2') format('woff2');
}

:root {
  /* Nautical palette */
  --color-deep-blue: #1b3a54;
  --color-mid-blue: #2c5f82;
  --color-light-blue: #4a8db7;
  --color-sky: #a8cde0;
  --color-sand: #e8dcc8;
  --color-sand-light: #f4efe6;
  --color-sand-warm: #d4c4a8;
  --color-white: #fafaf7;
  --color-warm-white: #f7f5f0;
  --color-text: #2d2d2d;
  --color-text-light: #5a5a55;
  --color-text-lighter: #8a8a82;
  --color-accent: #c4652a;
  --color-border: #e0dbd2;

  /* Typography */
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Sizing */
  --content-width: 720px;
  --header-height: 60px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-warm-white);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

.site-header {
  background-color: var(--color-deep-blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(27, 58, 84, 0.15);
  /* Match .main-content horizontal padding so the inner 720px nav box aligns
     flush with the content column. */
  padding: 0 1.5rem;
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-logo:hover {
  opacity: 0.85;
}

.site-logo-mark {
  display: block;
  width: 18px;
  height: 18px;
  color: var(--color-sand);
  flex-shrink: 0;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
  font-family: 'Poiret One', var(--font-serif);
  font-weight: bold;
  color: var(--color-sand);
  line-height: 1;
  text-transform: uppercase;
}

.site-logo-line {
  display: block;
}

.site-logo-line:first-child {
  font-size: 1.5rem;
  letter-spacing: 0.08em;
}

.site-logo-line:last-child {
  font-size: 0.85rem;
  letter-spacing: 0.29em;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
}

.nav-link {
  color: var(--color-sky);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover {
  color: var(--color-sand-light);
}

.nav-link.active {
  color: var(--color-sand);
  border-bottom-color: var(--color-sand);
}

/* Burger menu (hidden on desktop) */
.nav-toggle {
  display: none;
}

.nav-overlay {
  display: none;
}

.nav-burger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0.5rem;
  box-sizing: content-box;
  z-index: 110;
}

.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-sky);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
  flex: 1;
  padding: 2.5rem 1.5rem 4rem;
}

.content-container {
  max-width: var(--content-width);
  margin: 0 auto;
}

/* ==========================================================================
   Blog Feed (Homepage)
   ========================================================================== */

.blog-feed-heading {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-mid-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 2.5rem 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.blog-feed-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-feed-title a:hover {
  color: var(--color-mid-blue);
}

.blog-feed-entry {
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.blog-feed-entry:first-child {
  padding-top: 0;
}

.blog-feed-entry:last-child {
  border-bottom: none;
}

.blog-feed-cover {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 1.2rem 0;
  overflow: hidden;
  background: var(--color-sand-light);
  border-radius: 2px;
}

.blog-feed-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.blog-feed-cover:hover img {
  transform: scale(1.02);
}

.blog-feed-header time {
  font-size: 0.82rem;
  color: var(--color-text-lighter);
  font-family: var(--font-sans);
}

.blog-feed-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  line-height: 1.35;
  margin: 0.3rem 0 0;
}

.blog-feed-body {
  margin-top: 0.8rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
}

.blog-feed-body p {
  margin-bottom: 0.8rem;
}

.blog-feed-body a {
  color: var(--color-mid-blue);
  text-decoration: underline;
  text-decoration-color: var(--color-sky);
  text-underline-offset: 2px;
}

.blog-feed-body a:hover {
  text-decoration-color: var(--color-mid-blue);
}

.blog-entry-read-article {
  display: inline-block;
  margin-top: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-mid-blue);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-entry-read-article:hover {
  color: var(--color-deep-blue);
}

/* Blog entry standalone page */
.blog-entry-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.blog-entry-date {
  font-size: 0.85rem;
  color: var(--color-text-lighter);
  font-family: var(--font-sans);
}

.blog-entry-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-deep-blue);
  line-height: 1.2;
  margin-top: 0.4rem;
}

.blog-entry-body {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ==========================================================================
   Article List
   ========================================================================== */

.home-intro {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.home-intro p {
  font-size: 1.1rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* Hero post on homepage */

.home-hero {
  margin-bottom: 2.5rem;
}

.home-hero-entry {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.home-hero-cover {
  display: block;
}

.home-hero-cover img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.home-hero-cover:hover img {
  opacity: 0.9;
}

.home-hero-body {
  padding: 1.2rem 1.5rem 1.5rem;
}

.home-hero-body time {
  font-size: 0.8rem;
  color: var(--color-text-lighter);
}

.home-hero-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  margin: 0.3rem 0 0.6rem;
  line-height: 1.3;
}

.home-hero-title a {
  color: var(--color-deep-blue);
  text-decoration: none;
}

.home-hero-title a:hover {
  color: var(--color-accent);
}

.home-hero-excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}

/* Thematic sections on homepage */

.home-sections {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.home-section-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-deep-blue);
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--color-border);
}

.home-section-heading a {
  color: var(--color-deep-blue);
  text-decoration: underline;
  text-decoration-color: var(--color-sky);
  text-underline-offset: 3px;
}

.home-section-heading a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

/* Call-to-action banner (e.g. Refit link on Boot page) */

.cta-banner {
  display: block;
  padding: 1.2rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--color-sand-light);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 4px;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s, background-color 0.2s;
}

.cta-banner:hover {
  border-left-color: var(--color-mid-blue);
  background: var(--color-warm-white);
}

.cta-banner-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  margin-bottom: 0.3rem;
}

.cta-banner-text {
  display: block;
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.55;
}

.home-section-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.home-section-more {
  display: inline-block;
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
}

.home-section-more:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .home-section-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-title {
    font-size: 1.25rem;
  }

  .home-hero-cover img {
    aspect-ratio: 3 / 2;
  }
}

.article-list {
  list-style: none;
}

.article-item {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.article-item:first-child {
  padding-top: 0;
}

.article-link {
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  gap: 1.4rem;
}

.article-thumbnail {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  color: var(--color-mid-blue);
  opacity: 0.7;
  transition: opacity 0.2s;
  margin-top: 0.15rem;
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
}

.article-link:hover .article-thumbnail {
  opacity: 1;
}

.article-text {
  flex: 1;
  min-width: 0;
}

.article-link:hover .article-title {
  color: var(--color-mid-blue);
}

.article-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  line-height: 1.35;
  margin-bottom: 0.4rem;
  transition: color 0.2s;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--color-text-lighter);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.article-excerpt {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.65;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-mid-blue);
  background-color: rgba(44, 95, 130, 0.08);
  padding: 0.15rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}

.tag--link {
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}

.tag--link:hover,
.tag--link:focus {
  background-color: var(--color-mid-blue);
  color: var(--color-white);
}

/* ==========================================================================
   Tag overview page (/tags/)
   ========================================================================== */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.tag-cloud .tag {
  font-size: 0.85rem;
  padding: 0.25rem 0.7rem;
}

.tag-section {
  margin-bottom: 2rem;
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.tag-section-heading {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-deep-blue);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.3rem;
  margin-bottom: 0.8rem;
}


/* ==========================================================================
   Page Content
   ========================================================================== */

.page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-deep-blue);
  margin-bottom: 1.8rem;
  line-height: 1.25;
}

.page-content {
  font-size: 1rem;
  line-height: 1.75;
}

.page-content h2 {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  margin: 2.5rem 0 0.6rem;
  letter-spacing: -0.01em;
}

.page-content h3 {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  margin: 1.6rem 0 0.3rem;
}

.page-content p {
  margin-bottom: 0.5rem;
}

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

.page-content ul, .page-content ol {
  margin: 0.3rem 0 0.8rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.2rem;
}

.page-content a {
  color: var(--color-mid-blue);
  text-decoration: underline;
  text-decoration-color: var(--color-sky);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.page-content a:hover {
  text-decoration-color: var(--color-mid-blue);
}

.page-content blockquote + p {
  margin-top: 1.5rem;
}

/* Anchor offset for sticky header */
.page-content h2[id],
.page-content h3[id],
.page-content a[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

/* Highlight targeted anchor */
.page-content h3:target {
  background-color: rgba(168, 205, 224, 0.2);
  margin-left: -0.5rem;
  padding-left: 0.5rem;
  border-radius: 3px;
}

.page-content a[id]:target + p {
  background-color: rgba(168, 205, 224, 0.2);
  margin-left: -0.5rem;
  padding-left: 0.5rem;
  border-radius: 3px;
}

/* ==========================================================================
   Post / Article Content
   ========================================================================== */

.post-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post-title {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-deep-blue);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-text-lighter);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.post-tags {
  display: flex;
  gap: 0.4rem;
}

.reading-time::before {
  content: "\00b7";
  margin-right: 0;
}

.post-body {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-body h2 {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-deep-blue);
  margin: 2rem 0 0.8rem;
}

.post-body p {
  margin-bottom: 1.3rem;
}

.post-body a {
  color: var(--color-mid-blue);
  text-decoration: underline;
  text-decoration-color: var(--color-sky);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.post-body a:hover {
  text-decoration-color: var(--color-mid-blue);
}

/* Glossary links: dotted underline signals "definition" */
.post-body a[href*="/glossar/#"],
.post-body a[href*="/glossary/#"] {
  text-decoration-style: dotted;
  text-decoration-color: var(--color-mid-blue);
}

/* External links: small arrow signals "leaves the site" */
.post-body a[href^="http"]:not([href*="gsteinacker.github.io"]):not([href*="steinacker.name"])::after {
  content: "\00a0\2197";
  font-size: 0.7em;
  vertical-align: super;
  text-decoration: none;
  display: inline-block;
}

.post-body ul, .post-body ol {
  margin: 1rem 0 1.3rem 1.5rem;
}

.post-body li {
  margin-bottom: 0.4rem;
}

.post-body blockquote {
  border-left: 3px solid var(--color-sand-warm);
  padding: 0.8rem 1.2rem;
  margin: 1.5rem 0;
  background-color: var(--color-sand-light);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: var(--color-text-light);
}

.post-body img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 1.5rem 0 0.3rem;
}

/* Image captions: _italic text_ directly after an image */
.post-body img + em,
.post-body p > img + br + em {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-lighter);
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Code blocks */
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background-color: var(--color-sand-light);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  color: var(--color-deep-blue);
}

.post-body pre {
  background-color: var(--color-deep-blue);
  color: var(--color-sand-light);
  padding: 1.2rem 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  line-height: 1.5;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.85rem;
}

/* Tables */
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.post-body th {
  background-color: var(--color-sand-light);
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 1rem;
  border-bottom: 2px solid var(--color-sand-warm);
}

.post-body td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* Comments */
.post-comments {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.post-comments h2 {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  color: var(--color-deep-blue);
  margin-bottom: 1rem;
}

/* Post footer */
.post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.back-link {
  font-size: 0.9rem;
  color: var(--color-mid-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--color-deep-blue);
}

/* ==========================================================================
   About Page
   ========================================================================== */

.about-header {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  margin-bottom: 2rem;
}

.about-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-sand);
  flex-shrink: 0;
}

.about-intro h1 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-deep-blue);
  margin-bottom: 0.3rem;
}

.about-intro p {
  color: var(--color-text-light);
  font-size: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: auto;
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: 30px;
}

.footer-content {
  background-color: var(--color-sand-light);
  padding: 1.2rem 1.5rem;
  text-align: center;
}

.footer-content p {
  font-size: 0.8rem;
  color: var(--color-text-lighter);
}

.footer-legal {
  margin-top: 0.3rem;
}

.footer-legal a {
  color: var(--color-text-lighter);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--color-text-light);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.pagination a {
  font-size: 0.9rem;
  color: var(--color-mid-blue);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  transition: background-color 0.2s, border-color 0.2s;
}

.pagination a:hover {
  background-color: var(--color-sand-light);
  border-color: var(--color-sand-warm);
}

/* ==========================================================================
   Rouge syntax highlighting (adapted for nautical dark)
   ========================================================================== */

.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { color: #7a9ab5; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr { color: #8ecdf0; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sc, .highlight .sh { color: #e8c48a; }
.highlight .na { color: #a8cde0; }
.highlight .nb, .highlight .nc, .highlight .no { color: #d4a76a; }
.highlight .nf, .highlight .nx { color: #7cc5a8; }
.highlight .nn { color: #e8dcc8; }
.highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo { color: #c9a8e0; }
.highlight .o, .highlight .ow { color: #b0c8dc; }
.highlight .p { color: #d4cfc4; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
  :root {
    --header-height: 52px;
  }

  html {
    font-size: 16px;
  }

  .site-header {
    padding: 0 1rem;
  }

  .site-logo-mark {
    width: 24px;
    height: 24px;
  }

  .site-logo-line:first-child {
    font-size: 1.2rem;
  }

  .site-logo-line:last-child {
    font-size: 0.7rem;
  }

  .nav-burger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-deep-blue);
    padding: 1rem 1.5rem;
    gap: 0;
    align-items: flex-end;
    box-shadow: 0 4px 12px rgba(27, 58, 84, 0.25);
    z-index: 105;
  }

  .nav-toggle:checked ~ .nav-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
  }

  .nav-toggle:checked ~ .nav-links {
    display: flex;
  }

  /* Animate burger to X */
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-link:last-of-type {
    border-bottom: none;
  }

  .main-content {
    padding: 1.8rem 1rem 3rem;
  }

  .post-title {
    font-size: 1.7rem;
  }

  .article-title {
    font-size: 1.2rem;
  }

  .article-thumbnail {
    width: 48px;
    height: 48px;
  }

  .blog-feed-cover {
    margin: 1rem 0;
  }

  .about-header {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Footer social icons
   ========================================================================== */

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.8rem;
  padding: 0;
  list-style: none;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-lighter);
  transition: color 0.2s, transform 0.2s;
  padding: 0.25rem;
}

.footer-social a:hover {
  color: var(--color-mid-blue);
  transform: translateY(-1px);
}

/* ==========================================================================
   Related posts
   ========================================================================== */

.related-posts {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.related-posts-heading {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-deep-blue);
  margin-bottom: 1rem;
}

/* ==========================================================================
   Post card — reusable article tile (homepage, tags, hub pages)
   ========================================================================== */

.post-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0 2rem;
}

.post-card,
.page-content .post-card,
.post-body .post-card {
  text-decoration: none;
  color: var(--color-text);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.15s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-card-img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 0.6rem 0.7rem 0.7rem;
  flex: 1;
}

.post-card-body:first-child {
  background: var(--color-sand-light);
  padding: 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card-title {
  display: block;
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--color-deep-blue);
}

.post-card-excerpt {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-top: 0.25rem;
}

@media (max-width: 600px) {
  .post-card-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   YouTube embed (2-click GDPR pattern)
   ========================================================================== */

.youtube-embed {
  margin: 1.5rem 0;
}

.youtube-embed-container {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.youtube-embed-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.youtube-embed-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.youtube-embed-play svg {
  opacity: 0.85;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
  transition: opacity 0.15s;
}

.youtube-embed-container:hover .youtube-embed-play svg {
  opacity: 1;
}

.youtube-embed-notice {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.4rem 0.6rem;
  text-align: center;
}

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

/* ==========================================================================
   Post pager (prev / next)
   ========================================================================== */

.post-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.5rem 0 1.5rem;
}

.post-pager-prev,
.post-pager-next {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-warm-white);
  transition: border-color 0.2s, background-color 0.2s;
}

.post-pager-next {
  grid-column: 2;
  text-align: right;
}

.post-pager-prev:hover,
.post-pager-next:hover {
  border-color: var(--color-mid-blue);
  background: var(--color-sand-light);
}

.post-pager-label {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--color-text-lighter);
  letter-spacing: 0.03em;
}

.post-pager-title {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  color: var(--color-deep-blue);
  line-height: 1.35;
}

/* ==========================================================================
   Inline image (single, click-to-enlarge)
   ========================================================================== */

.inline-image {
  margin: 1.6rem 0;
  width: fit-content;
  max-width: 100%;
}

.inline-image--center { margin-left: auto; margin-right: auto; }
.inline-image--left   { margin-right: auto; }
.inline-image--right  { margin-left: auto; }

.inline-image-trigger {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}

.inline-image-trigger img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  border-radius: 4px;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.inline-image-trigger:hover img,
.inline-image-trigger:focus-visible img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

.inline-image figcaption {
  margin-top: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-lighter);
  font-style: italic;
  line-height: 1.4;
  text-align: left;
}

@media (max-width: 600px) {
  .inline-image-trigger img {
    max-height: 280px;
  }
}

/* ==========================================================================
   Figure + text widget (image on one side, prose on the other)
   ========================================================================== */

.figure-text {
  display: grid;
  grid-template-columns: var(--figure-text-width, 12rem) minmax(0, 1fr);
  gap: 1rem 1.4rem;
  align-items: start;
  margin: 1.6rem 0;
}

.figure-text--right {
  grid-template-columns: minmax(0, 1fr) var(--figure-text-width, 12rem);
}

.figure-text--right .figure-text__figure {
  grid-column: 2;
  grid-row: 1;
}

.figure-text--right .figure-text__body {
  grid-column: 1;
  grid-row: 1;
}

.figure-text__figure {
  margin: 0;
}

.figure-text__figure .inline-image-trigger {
  display: block;
  width: 100%;
}

.figure-text__figure .inline-image-trigger img {
  width: 100%;
  max-height: none;
}

.figure-text__figure figcaption {
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-lighter);
  font-style: italic;
  line-height: 1.4;
}

.figure-text__body > :first-child { margin-top: 0; }
.figure-text__body > :last-child  { margin-bottom: 0; }

@media (max-width: 600px) {
  .figure-text,
  .figure-text--right {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  /* Always image first, text below — keeps the visual reference obvious. */
  .figure-text__figure,
  .figure-text--right .figure-text__figure {
    grid-column: 1;
    grid-row: 1;
  }

  .figure-text__body,
  .figure-text--right .figure-text__body {
    grid-column: 1;
    grid-row: 2;
  }

  .figure-text__figure .inline-image-trigger {
    width: fit-content;
    max-width: 100%;
  }

  .figure-text__figure .inline-image-trigger img {
    max-height: 280px;
    width: auto;
  }
}

/* ==========================================================================
   Photo gallery + lightbox
   ========================================================================== */

.gallery {
  display: grid;
  grid-template-columns: repeat(var(--gallery-cols, 3), minmax(0, 1fr));
  gap: 0.6rem;
  margin: 1.6rem 0;
}

.gallery figure {
  margin: 0;
}

.gallery button.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}

.gallery button.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery button.gallery-item:hover img,
.gallery button.gallery-item:focus-visible img {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.gallery figcaption {
  margin-top: 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--color-text-lighter);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(27, 58, 84, 0.92);
  padding: 2rem 1rem;
  backdrop-filter: blur(3px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1200px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox-caption {
  color: var(--color-sand-light);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-align: center;
  max-width: 60ch;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: rgba(0, 0, 0, 0.55);
}

.lightbox-btn[hidden] {
  display: none;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .gallery button.gallery-item img,
  .inline-image-trigger img,
  .lightbox-btn,
  .post-pager-prev,
  .post-pager-next {
    transition: none;
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
  }

  .post-pager {
    grid-template-columns: 1fr;
  }

  .post-pager-next {
    grid-column: 1;
    text-align: left;
  }

  .lightbox-btn {
    width: 40px;
    height: 40px;
  }
}
