:root {
  --paper: #f2f8f8;
  --panel: #fcfaf6;
  --ink: #072b06;
  --ink-soft: rgb(13, 83, 54);
  --ink-faint: #1c613b;
  --line: rgba(28, 57, 40, 0.14);
  --line-strong: rgba(40, 57, 28, 0.28);
  --accent: #a8592e;
  --accent-ink: #7a3f1f;
  --accent-soft: #efd9c6;
  --radius: 10px;

  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --content-w: 800px;
  --wide-w: 960px;
}

* {
  box-sizing: border-box;
  text-align: justify;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  /*background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px;*/
  min-height: 100vh;
  line-height: 1.5;
}

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

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

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

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 24px;
}

.prose {
  max-width: var(--content-w);
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(252, 250, 246, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-strong);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-family: var(--sans);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  width: 40px;
  height: 36px;
  cursor: pointer;
  position: relative;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--ink);
}

.nav-toggle::before { top: 11px; }
.nav-toggle span { top: 17px; }
.nav-toggle::after { top: 23px; }

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  margin-bottom: 0.3em;
}

.hero .tagline {
  font-family: var(--sans);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 1.5em;
}

.hero-bio {
  max-width: var(--content);
  font-size: 1.05rem;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 1.5em;
}

.hero-wave {
  width: 100%;
  max-width: 480px;
  height: auto;
  margin-top: 40px;
  opacity: 0.9;
}

.hero-wave path {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 1.8s ease-out forwards 0.2s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wave path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
}

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

.btn-primary {
  background: var(--ink);
  color: var(--panel);
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: var(--panel);
}

/* ---------- generic sections ---------- */

section {
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

section:first-child {
  border-top: none;
}

.section-heading {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 0.6em;
}

.section-intro {
  color: var(--ink-soft);
  max-width: var(--content);
  margin-bottom: 1.8em;
}

/* ---------- highlight rows ---------- */

.rows {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.row {
  display: flex;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.row-label {
  font-family: var(--serif);
  font-weight: 600;
  min-width: 180px;
  flex-shrink: 0;
  color: var(--ink);
}

.row-body {
  color: var(--ink-soft);
  flex: 1;
}

.row-body a {
  color: var(--accent-ink);
}

/* ---------- panels / cards ---------- */

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px;
}

.panel img {
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  margin-bottom: 14px;
}

.panel h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4em;
}

.panel .panel-links {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 0.92rem;
}

/* ---------- blog list ---------- */

.post-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.post-entry {
  display: flex;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  flex-direction: column;
}

.post-entry:hover .post-title {
  color: var(--accent-ink);
}

.post-date {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 4px;
}

.post-update {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: block;
  margin-bottom: 4px;
}

.post-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.post-summary {
  color: var(--ink-soft);
  max-width: var(--content);
}

.post-empty,
.post-error {
  color: var(--ink-soft);
  padding: 20px 0;
}

/* ---------- single post ---------- */

.post-header {
  margin-bottom: 8px;
}

.post-meta {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-faint);
  margin-bottom: 1.2em;
}

.post-body {
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.7;
  max-width: var(--content-w);
}

.post-body h2 {
  font-size: 1.4rem;
  margin-top: 1.4em;
}

.post-body h3 {
  font-size: 1.15rem;
  margin-top: 1.2em;
}

.post-body p {
  margin-bottom: 1.1em;
}

.post-body a {
  color: var(--accent-ink);
}

.post-body code {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  padding: 2px 5px;
  border-radius: 3px;
}

.post-body pre {
  background: var(--ink);
  color: var(--panel);
  padding: 16px;
  border-radius: var(--radius);
  overflow-x: auto;
}

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

.post-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 0 0 1.1em;
  padding-left: 16px;
  color: var(--ink-soft);
}

.back-link {
  display: inline-block;
  margin-bottom: 28px;
  font-family: var(--sans);
  font-size: 0.95rem;
}


/* ---------- contact ---------- */

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.contact-icon {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.contact-label {
  font-size: 0.85rem;
  color: var(--ink-faint);
  display: block;
}

.contact-value a {
  font-family: var(--serif);
  font-size: 1.15rem;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: 28px 0;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-row a {
  color: var(--ink-faint);
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--panel);
    border-bottom: 1px solid var(--line-strong);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
  
  .nav-links a {
    padding: 12px 0;
    border-bottom: none;
  }

  .nav-toggle {
    display: block;
  }

  .panel-grid {
    flex-direction: row;
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
    gap: 4px;
  }

  .row-label {
    min-width: 0;
  }

  .contact-value a {
    font-size: 1rem;
    word-break: break-word;
  }
}
