/* =============================================
   proper.rip — style.css
   Typefaces: Cormorant Garamond (serif), JetBrains Mono
   ============================================= */

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

:root {
  --bg: #0a0a0a;
  --bg-subtle: #111;
  --border: #222;
  --text: #ece9e1;
  --text-muted: #b5aa99;
  --text-dim: #877e72;
  --accent: #b8734a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --max: 1200px;
  --pad: 2.5rem;
}

[data-theme="light"] {
  --bg: #f4f1ec;
  --bg-subtle: #eae6e0;
  --border: #d6d1c9;
  --text: #1c1a17;
  --text-muted: #5c554b;
  --text-dim: #8a8279;
  --accent: #a5623b;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 300;
  min-height: 100vh;
}

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

/* ---- LANDING PAGE ---- */

.landing {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding: 4rem 0;
}

.landing-inner {
  max-width: 600px;
  padding: 0 var(--pad);
  margin: 0 auto;
  width: 100%;
}

.landing-bio {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.landing-bio a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.landing-bio a:hover {
  border-color: var(--text-muted);
}

.landing-location {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.landing-location svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

.landing-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.landing-link {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.15s;
}

.landing-link:hover {
  color: var(--text);
}

.landing-projects-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.landing-projects-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.landing-projects-list li {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.landing-projects-list a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.landing-projects-list a:hover {
  border-color: var(--text-muted);
}

.landing-projects-desc {
  color: var(--text-dim);
}

.landing-projects-title {
  color: var(--text);
}

.landing-projects-list a.desc-link {
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.landing-projects-list a.desc-link:hover {
  color: var(--text-muted);
  border-bottom-color: var(--text-dim);
}

.landing-icon {
  color: var(--text-dim);
  transition: color 0.15s;
  display: flex;
  align-items: center;
}

.landing-icon:hover {
  color: var(--text);
}

.landing-nav .theme-toggle {
  border: none;
  width: auto;
  height: auto;
  padding: 0;
}

.landing-nav .theme-toggle svg {
  width: 18px;
  height: 18px;
}

.landing-projects {
  margin-top: 2.75rem;
}

.landing-coda {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-top: 3.5rem;
  transition: color 0.15s;
}

.landing-coda a {
  color: var(--text-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.landing-coda a:hover {
  color: var(--text);
  border-bottom-color: var(--text-dim);
}

/* ---- POST LIST ---- */

.post-list {
  max-width: var(--max);
  margin: 0 auto;
}

.post-item {
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-item-link {
  display: block;
  padding: 1.375rem var(--pad);
  transition: background 0.15s;
}

.post-item-link:hover {
  background: var(--bg-subtle);
}

.post-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.post-item-date {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.post-item-title {
  font-family: var(--serif);
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text);
  transition: color 0.15s;
}

.post-item-link:hover .post-item-title {
  color: var(--text);
}

.post-item-excerpt {
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 560px;
  margin-top: 0.375rem;
}

/* ---- POST PAGE ---- */

.post-header {
  /* no border — negative space */
}

.post-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--pad) 2.5rem;
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  font-weight: 500;
  max-width: 680px;
  margin-bottom: 1.25rem;
}

.post-meta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-nav a {
  font-size: 1.625rem;
  line-height: 1;
  color: var(--text-dim);
  transition: color 0.15s;
  padding: 0.25rem 0.5rem;
  margin-left: -0.5rem;
}

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

.dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  flex-shrink: 0;
}

.post-body {
  max-width: 660px;
  margin: 0 auto;
  padding: 3.5rem var(--pad);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.post-body p + p {
  margin-top: 1.5em;
}

.post-body h2 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 3rem 0 1.25rem;
  font-weight: 400;
}

.post-body a {
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.15s;
}

.post-body a:hover {
  border-color: var(--text-muted);
}

.post-body ul,
.post-body ol {
  margin: 1.25em 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.post-body li {
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.post-body s,
.post-body del {
  text-decoration: line-through;
  color: var(--text-dim);
}

.post-body figure {
  margin: 2.5rem 0;
}

.post-body img,
.post-body figure img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.post-body figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-top: 0.75rem;
  text-align: center;
}

.post-body blockquote {
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--text-dim);
  font-style: italic;
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 6px;
}

.post-body pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin: 2rem 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.post-body th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--text-dim);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.post-body td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
  word-break: break-all;
}

.post-body td:first-child {
  white-space: nowrap;
  color: var(--text);
  word-break: normal;
}

.post-body tbody tr:hover td {
  background: var(--bg-subtle);
}

.post-back {
  max-width: 660px;
  margin: 0 auto;
  padding: 0 var(--pad) 4rem;
}

.post-back a {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.15s;
}

.post-back a:hover {
  color: var(--text);
}

/* ---- THEME TOGGLE ---- */

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-dim);
  transition: color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-muted);
  border-color: var(--text-dim);
}

.theme-toggle svg {
  width: 14px;
  height: 14px;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  :root {
    --pad: 1.25rem;
  }

  .landing {
    align-items: flex-start;
    padding-top: 3rem;
  }
}
