/* ============================================================
   caret.rs — indie web stylesheet
   dark orange terminal aesthetic
   ============================================================ */

:root {
  --bg:         #000000;
  --bg-panel:   #111111;
  --bg-code:    #0d0d0d;
  --fg:         #ff8500;
  --fg-dim:     #ff8500;
  --fg-bright:  #ffbe79;
  --fg-muted:   #994f00;
  --border:     #ff8500;
  --border-dim: #3a1f00;
  --font: 'Courier New', Courier, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}


/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font); font-weight: bold; }

h2 { color: var(--fg-bright); margin-bottom: 0.5em; }
h3 { color: var(--fg); margin-bottom: 0.25em; }

p  { margin-bottom: 0.8em; }

a {
  color: var(--fg-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-dim);
  transition: color 0.1s, border-color 0.1s;
}
a:hover {
  color: #fff;
  border-color: var(--fg-bright);
}

ul { list-style: none; }
ul li::before { content: '> '; color: var(--fg-dim); }

code, pre {
  background: var(--bg-code);
  color: var(--fg-bright);
  font-family: var(--font);
}

pre {
  padding: 1em;
  overflow-x: auto;
  border-left: 2px solid var(--fg-dim);
}

/* syntax-highlighted blocks — pure black bg, hljs owns the colors */
pre code.hljs {
  background: #000;
  padding: 1em;
  display: block;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
}
pre:has(code.hljs) {
  background: #000;
  padding: 0;
  border-left-color: var(--fg-dim);
}

/* ── Blink cursor animation ──────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
}

/* ── Marquee bar ─────────────────────────────────────────── */
.marquee-bar {
  background: var(--fg);
  color: var(--bg);
  padding: 3px 0;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 0.05em;
  overflow: hidden;
  white-space: nowrap;
}
.marquee-inner {
  display: flex;
  width: max-content;
  animation: scroll-marquee 28s linear infinite;
}
.marquee-inner span { white-space: nowrap; flex-shrink: 0; }

@keyframes scroll-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Site header ─────────────────────────────────────────── */
.site-header {
  border-bottom: 2px solid var(--border);
  padding: 1.5rem 2rem;
  background: var(--bg);
}
.site-header-compact {
  padding: 0.35rem 2rem;
  border-bottom-width: 1px;
}

.ascii-logo {
  font-size: 13px;
  line-height: 1.2;
  color: var(--fg);
  margin: 0;
  overflow-x: auto;
}

.tagline {
  color: var(--fg-muted);
  font-size: 12px;
  margin-top: 0.5rem;
  padding-left: 0.25rem;
}
.tagline .prompt { color: var(--fg-bright); }

/* ── Navigation ──────────────────────────────────────────── */
nav.main-nav {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-dim);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

nav.main-nav a {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border: none;
  border-right: 1px solid var(--border-dim);
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.1s, color 0.1s;
}
nav.main-nav a:first-child { border-left: 1px solid var(--border-dim); }
nav.main-nav a:hover,
nav.main-nav a.active {
  background: var(--fg);
  color: var(--bg);
}

.nav-label {
  margin-left: auto;
  color: var(--fg-dim);
  font-size: 11px;
  padding: 0.6rem 0;
  letter-spacing: 0.1em;
}

/* ── Page wrapper ────────────────────────────────────────── */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* ── Panels / sections ───────────────────────────────────── */
.panel {
  border: 1px solid var(--border-dim);
  margin-bottom: 1.5rem;
  background: var(--bg-panel);
}

.panel-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border-dim);
  padding: 0.4rem 1rem;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-bright);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.panel-header::before { content: '[ '; color: var(--fg-dim); }
.panel-header::after  { content: ' ]'; color: var(--fg-dim); }

.panel-body { padding: 1.2rem 1.4rem; }

/* ── Two-column grid ─────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Status indicator ────────────────────────────────────── */
.status-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}
.status-key {
  color: var(--fg-dim);
  min-width: 130px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.status-val {
    color: var(--fg-bright);
    font-size: 12px;
}

/* ── Project card ────────────────────────────────────────── */
.project-card {
  border: 1px solid var(--border-dim);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  background: var(--bg);
  position: relative;
}
.project-card:hover { border-color: var(--fg-muted); }

.project-title {
  color: var(--fg-bright);
  font-size: 15px;
  margin-bottom: 0.3em;
}
.project-title a { border: none; color: inherit; }
.project-title a:hover { color: #fff; }

.project-tags {
  margin-top: 0.6em;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}
.tag {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--fg-dim);
  padding: 1px 6px;
  color: var(--fg-dim);
}

/* ── Post filter / sort controls ────────────────────────── */
.filter-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-right: 0.2rem;
  flex-shrink: 0;
}

.sort-btn {
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--fg-dim);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  cursor: pointer;
  transition: color 0.1s, border-color 0.1s;
}
.sort-btn:hover  { color: var(--fg); border-color: var(--fg-muted); }
.sort-btn.active { color: var(--fg-bright); border-color: var(--fg-muted); }

.tag-dropdown {
  position: relative;
}
.tag-dropdown summary {
  list-style: none;
  cursor: pointer;
  background: none;
  border: 1px solid var(--border-dim);
  color: var(--fg-dim);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  transition: color 0.1s, border-color 0.1s;
  user-select: none;
}
.tag-dropdown summary::-webkit-details-marker { display: none; }
.tag-dropdown summary:hover  { color: var(--fg); border-color: var(--fg-muted); }
.tag-dropdown[open] summary  { color: var(--fg-bright); border-color: var(--fg-muted); }

.tag-dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  padding: 0.4rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 150px;
  z-index: 100;
}

.tag-pill {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-family: var(--font);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 4px;
  cursor: pointer;
  text-align: left;
  transition: color 0.1s;
}
.tag-pill::before         { content: '[ ] '; color: var(--border-dim); }
.tag-pill.active::before  { content: '[x] '; color: var(--fg-bright); }
.tag-pill:hover           { color: var(--fg); }
.tag-pill.active          { color: var(--fg-bright); }

/* ── Post list rows ──────────────────────────────────────── */
.post-row {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1.4rem;
  border-bottom: 1px solid var(--border-dim);
  text-decoration: none;
  color: inherit;
}
.post-row:hover .post-row-title { color: #fff; }

.post-row-title {
  font-size: 14px;
  font-weight: bold;
  color: var(--fg-bright);
}
.post-row-desc {
  font-size: 12px;
  color: var(--fg-dim);
}
.post-row-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}
.post-row-date {
  font-size: 11px;
  color: var(--fg-dim);
  margin-left: auto;
}
.post-tag {
  font-size: 10px;
  font-family: var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-code);
  color: var(--fg-bright);
  border: 1px solid var(--fg-dim);
  padding: 1px 5px;
  border-radius: 0;
}
.post-tag-dim {
  color: var(--fg-dim);
  border-color: var(--border-dim);
}

/* ── Blog list ───────────────────────────────────────────── */
.blog-entry {
  border-bottom: 1px solid var(--border-dim);
  padding: 0.8rem 0;
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}
.blog-entry:last-child { border-bottom: none; }

.blog-date {
  color: var(--fg-dim);
  font-size: 12px;
  min-width: 100px;
  flex-shrink: 0;
}
.blog-title a { border: none; font-size: 15px; }

/* ── ASCII dividers ──────────────────────────────────────── */
.ascii-div {
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 0.05em;
  margin: 1rem 0;
  overflow: hidden;
  white-space: nowrap;
}

/* ── Badge row (88x31 area, retro) ──────────────────────── */
.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 0.5rem;
}
.badge {
  display: inline-block;
  width: 88px;
  height: 31px;
  border: 1px solid var(--border-dim);
  font-size: 9px;
  text-align: center;
  line-height: 31px;
  color: var(--fg-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
}
.badge:hover { border-color: var(--fg); color: var(--fg); }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border-dim);
  padding: 1rem 2rem;
  text-align: center;
  font-size: 11px;
  color: var(--fg-dim);
  margin-top: 2rem;
}
footer a { color: var(--fg-muted); border-color: transparent; }
footer a:hover { color: var(--fg-bright); }

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-dim);
  color: var(--fg-dim);
  transition: color 0.1s, border-color 0.1s;
}
.footer-socials a:hover { color: var(--fg-bright); border-color: var(--fg-muted); }
.footer-socials svg { width: 16px; height: 16px; display: block; }

/* ── Inline highlight ────────────────────────────────────── */
.hl { color: var(--fg-bright); }
.dim { color: var(--fg-dim); }

/* ── Censor / redaction ──────────────────────────────────── */
.censor {
  background: var(--fg);
  color: transparent;
  cursor: pointer;
  user-select: none;
  border-radius: 1px;
  transition: background 0.15s, color 0.15s;
}
.censor:hover {
  background: var(--border-dim);
  color: var(--fg-dim);
}

/* ── Indie web button marquee ────────────────────────────── */
.button-marquee-bar {
  padding: 4px 0;
  overflow: hidden;
  white-space: nowrap;
  line-height: 0;
}
.button-marquee-inner {
  display: inline-flex;
  align-items: center;
  width: max-content;
  animation: scroll-marquee 20s linear infinite;
}
.button-marquee-bar a {
  display: inline-block;
  border: none;
  line-height: 0;
  vertical-align: middle;
}
.button-marquee-bar img {
  width: 88px;
  height: 31px;
  display: inline-block;
  image-rendering: pixelated;
  opacity: 0.75;
  transition: opacity 0.1s;
}
.button-marquee-bar a:hover img { opacity: 1; }

/* ── Chat placeholder ────────────────────────────────────── */
.chat-stub {
  border: 1px solid var(--border-dim);
  padding: 2rem;
  text-align: center;
  color: var(--fg-dim);
  font-size: 13px;
}

/* ── Photo gallery ───────────────────────────────────────── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.photo-thumb {
  display: block;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--border-dim);
  aspect-ratio: 3 / 2;
  background: #050505;
  text-decoration: none;
}
.photo-thumb:hover { border-color: var(--fg-muted); }

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: sepia(30%) brightness(0.85) saturate(0.8);
  transition: filter 0.2s;
}
.photo-thumb:hover img { filter: sepia(10%) brightness(1) saturate(1); }

.photo-thumb .thumb-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.85);
  color: var(--fg-dim);
  font-size: 10px;
  padding: 4px 8px;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity 0.15s;
}
.photo-thumb:hover .thumb-caption { opacity: 1; }

/* CSS-only lightbox via :target */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox:target { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border: 1px solid var(--border-dim);
  display: block;
}

.lightbox-caption {
  color: var(--fg-dim);
  font-size: 12px;
  margin-top: 0.8rem;
  letter-spacing: 0.1em;
  text-align: center;
}

.lb-close {
  position: fixed;
  top: 1.5rem;
  right: 2rem;
  font-size: 24px;
  color: var(--fg-dim);
  text-decoration: none;
  border: none;
  letter-spacing: 0;
  line-height: 1;
}
.lb-close:hover { color: var(--fg-bright); }

/* Month folder cards */
.month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.month-card {
  border: 1px solid var(--border-dim);
  background: var(--bg);
  display: block;
  text-decoration: none;
  color: var(--fg);
  padding: 1.2rem;
  transition: border-color 0.1s;
}
.month-card:hover { border-color: var(--fg-muted); color: var(--fg); }

.month-card-header {
  font-size: 18px;
  color: var(--fg-bright);
  margin-bottom: 0.4rem;
  border: none;
}
.month-card-meta {
  color: var(--fg-dim);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
}
.month-card-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  height: 60px;
  overflow: hidden;
}
.month-card-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(40%) brightness(0.7);
  display: block;
}

/* ── Whoami panel ────────────────────────────────────────── */
.whoami-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
#pfp-wrap { width: 96px; height: 96px; flex-shrink: 0; }
#pfp-wrap img, #pfp-wrap video {
  width: 96px; height: 96px;
  object-fit: cover; display: block;
  border: 1px solid var(--border-dim);
  image-rendering: pixelated;
}

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .site-header { padding: 1rem; }
  .ascii-logo  { font-size: 8px; }

  nav.main-nav { padding: 0; }
  nav.main-nav a { padding: 0.5rem 0.8rem; font-size: 12px; }
  .nav-label { display: none; }

  .page-wrap { padding: 1rem; }

  .grid-2 { grid-template-columns: 1fr; }

  .blog-entry { flex-direction: column; gap: 0.2rem; }
  .blog-date  { min-width: unset; }

  .whoami-body { flex-direction: column; }
  #pfp-wrap { width: 100%; height: auto; }
  #pfp-wrap img, #pfp-wrap video { width: 100%; height: auto; aspect-ratio: 1; }

  .post-row-date { margin-left: 0; }
}
