/* Iron and Oar — clean modern journal redesign */
:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --text: #1a2420;
  --muted: #5c6b64;
  --accent: #2a6b5a;
  --accent-dark: #1f5245;
  --line: #d5e0db;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(26, 36, 32, 0.08);
  --shadow-hover: 0 14px 36px rgba(26, 36, 32, 0.12);
  --content: 720px;
  --grid: 1180px;
  --space: 1.25rem;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(42, 107, 90, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(42, 107, 90, 0.05), transparent 45%),
    var(--bg);
  min-height: 100vh;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  width: auto;
  height: auto;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: min(100% - 2rem, var(--grid));
  margin-inline: auto;
}

.wrap--narrow {
  width: min(100% - 2rem, var(--content));
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 247, 246, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  color: var(--accent-dark);
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.brand__tag {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}

.menu-toggle__icon {
  display: inline-block;
  width: 1.1rem;
  height: 0.85rem;
  position: relative;
}

.menu-toggle__icon span,
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle__icon span {
  top: 50%;
  transform: translateY(-50%);
}

.menu-toggle__icon::before {
  top: 0;
}

.menu-toggle__icon::after {
  bottom: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.main-nav {
  display: none;
}

.main-nav.is-open {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.menu {
  list-style: none;
  margin: 0;
  padding: 0.75rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu a {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.menu a:hover,
.menu a[aria-current="page"] {
  background: rgba(42, 107, 90, 0.1);
  color: var(--accent-dark);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .main-nav {
    display: block;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .menu {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
  }

  .menu a {
    padding: 0.45rem 0.75rem;
  }
}

/* Hero / page intro */
.page-hero {
  padding: 2.75rem 0 1.5rem;
}

.layout.page-hero {
  padding-top: 2rem;
  padding-bottom: 0;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.page-hero p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

/* Layout */
.site-content {
  flex: 1;
  padding: 0 0 3.5rem;
}

.layout {
  display: grid;
  gap: 2rem;
}

@media (min-width: 960px) {
  .layout--with-sidebar {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
}

/* Cards */
.posts-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .posts-grid .card--featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
  }

  .posts-grid .card--featured .card__media {
    min-height: 100%;
    aspect-ratio: auto;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card__media {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(42, 107, 90, 0.18), rgba(42, 107, 90, 0.05)),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 12px,
      rgba(42, 107, 90, 0.04) 12px,
      rgba(42, 107, 90, 0.04) 24px
    );
}

.card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.card__meta {
  font-size: 0.88rem;
  color: var(--muted);
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.02em;
}

.card__title a {
  color: var(--text);
  text-decoration: none;
}

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

.card__excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  flex: 1;
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  font-weight: 700;
  text-decoration: none;
}

.card__cta::after {
  content: "→";
  transition: transform var(--transition);
}

.card__cta:hover::after {
  transform: translateX(3px);
}

/* Article */
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.35rem;
  box-shadow: var(--shadow);
}

@media (min-width: 700px) {
  .article {
    padding: 2.25rem 2.5rem;
  }
}

.article .entry-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.article .entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.8vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}

.entry-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.entry-meta a {
  color: var(--muted);
  text-decoration: none;
}

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

.entry-meta .updated:not(.published) {
  display: none;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.15rem;
}

.entry-content h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.85rem;
  line-height: 1.25;
}

.entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 1.6rem 0 0.7rem;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.25rem;
}

.entry-content li {
  margin-bottom: 0.45rem;
}

.entry-content li ul {
  margin-top: 0.45rem;
  margin-bottom: 0.45rem;
}

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 0.85rem 1.15rem;
  border-left: 3px solid var(--accent);
  background: rgba(42, 107, 90, 0.06);
  color: var(--text);
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.entry-content img {
  border-radius: 10px;
  margin: 1.25rem 0;
}

/* Post nav */
.post-navigation {
  margin-top: 1.75rem;
}

.post-navigation .nav-links {
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .post-navigation .nav-links {
    grid-template-columns: 1fr 1fr;
  }

  .post-navigation .nav-next {
    text-align: right;
  }
}

.post-navigation a {
  display: block;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.post-navigation a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.post-navigation a::before {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.nav-previous a::before {
  content: "Previous";
}

.nav-next a::before {
  content: "Next";
}

/* Sidebar */
.sidebar {
  display: grid;
  gap: 1rem;
}

.widget {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
}

.widget:empty {
  display: none;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li + li {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.widget a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

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

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-field {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
}

.search-submit,
.btn {
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}

.search-submit:hover,
.btn:hover {
  background: var(--accent-dark);
}

/* Forms */
.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.contact-form p {
  margin: 0 0 1rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--bg);
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.92rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: #16352d;
  color: #d7e6e0;
  padding: 2.5rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer a {
  color: #e8f3ef;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: #fff;
}

.footer-desc {
  margin: 0;
  color: #b7cbc3;
  max-width: 28rem;
}

.footer-heading {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fb5ac;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.92rem;
  color: #9fb5ac;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }
}
