@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;1,400&family=DM+Mono:wght@300;400&display=swap');

:root {
  --bg:         #181c18;
  --surface:    #1f241e;
  --surface-2:  #252b24;
  --line:       rgba(160,185,150,0.14);
  --line-hi:    rgba(160,185,150,0.30);
  --text:       #d4dbc8;
  --text-dim:   #7a8c72;
  --text-faint: #4a5644;
  --green:      #8aad7e;
  --green-soft: rgba(138,173,126,0.10);
  --green-glow: rgba(138,173,126,0.06);
  --serif:      'Lora', Georgia, serif;
  --mono:       'DM Mono', monospace;
}

/* ── Body + shared button/select base ───────────────── */
body, button, select {
  font-family: var(--mono);
  max-width: 900px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow:
    0 0 40px rgba(0,0,0,0.5),
    0 0 20px var(--green-glow),
    inset 0 1px 0 rgba(160,185,150,0.04);
  padding: 20px;
  margin: 50px auto;
  line-height: 1.4;
}

/* rain-streak overlay on body */
body {
  position: relative;
  background: var(--bg);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(138,173,126,0.05) 0%, transparent 60%),
    repeating-linear-gradient(
      108deg,
      transparent,
      transparent 14px,
      rgba(160,185,150,0.016) 14px,
      rgba(160,185,150,0.016) 15px
    );
  pointer-events: none;
  z-index: -1;
}

/* ── Buttons & Selects ──────────────────────────────── */
button, select {
  position: relative;
  overflow: hidden;
  padding: 10px 15px;
  margin: 10px 0;
  max-width: unset;
  font-size: 12px;
  letter-spacing: 0.6px;
  background: var(--surface);
  color: var(--text-dim);
  border-color: var(--line-hi);
  transition: all 0.2s ease;
  appearance: none;
  outline: none;
}
/* Updated Hover State */


button:hover, select:hover {
  cursor: pointer;
  color: var(--text);
  border-color: var(--green);
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%), 
    var(--green-soft) 0%, 
    var(--surface-2) 100%
  );
  box-shadow: 0 0 14px var(--green-glow);
}
button:active { transform: translateY(1px); }

/* ── Links ──────────────────────────────────────────── */
a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--text); }

/* ── Header ─────────────────────────────────────────── */
.header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.profile-pic {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-hi);
  filter: saturate(0.7);
}

/* ── Headings ───────────────────────────────────────── */
h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

h2 {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 28px 0 12px;
  font-weight: 400;
}

h3 {
  font-family: var(--serif);
  font-style: italic;
}

/* ── Paragraphs ─────────────────────────────────────── */
p { font-size: 14px; margin: 5px 0; color: var(--text-dim); }

/* ── Lists ──────────────────────────────────────────── */
ul { list-style: none; padding: 0; }

li { border-bottom: 1px solid var(--line); }
li:first-child { border-top: 1px solid var(--line); }

li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  color: var(--text-dim);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease, gap 0.2s ease;
}
li a::before {
  content: '·';
  color: var(--text-faint);
  font-size: 20px;
  line-height: 0;
  opacity: 1;
  transform: none;
  position: static;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
li a:hover { color: var(--text); gap: 14px; }
li a:hover::before { color: var(--green); transform: scale(1.4); }

/* ── Posts Grid ─────────────────────────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.post-card {
  display: block;
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  --x: 50%;
  --y: 50%;
}

.post-card::before {
  content: '';
  position: absolute;
  inset: 0px; 
  background: radial-gradient(
    circle at var(--x) var(--y), 
    var(--green-soft) 0%, 
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.post-card:hover {
  border-color: var(--line-hi);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  background: var(--surface-2);
}

.post-card:hover::before { 
  opacity: 1; 
}

.post-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--text);
}

.post-card p { 
  font-size: 13px; 
  margin: 0 0 10px 0; 
}

/* ── Tags ───────────────────────────────────────────── */
.post-tags { font-size: 12px; display: flex; flex-wrap: wrap; gap: 5px; }

.tag {
  display: inline-block;
  border: 1px solid var(--line);
  padding: 2px 8px;
  border-radius: 20px;
  margin-right: 0;
  color: var(--text-faint);
  transition: all 0.2s ease;
}
.tag:hover {
  border-color: var(--line-hi);
  color: var(--text-dim);
  background: var(--green-soft);
}
.tag-filter.active {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}

/* ── Spinner ────────────────────────────────────────── */
.loader {
    width: 48px;
    transform: scale(2);
    height: 48px;
    animation: spin 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 6px rgba(138,173,126,0.3));
    opacity: 0.85;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-hi); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ── Selection ──────────────────────────────────────── */
::selection { background: var(--green-soft); color: var(--text); }