/* ============================================
   lacedenim — base styles
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 13px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 300;
  min-height: 100vh;
  cursor: crosshair;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: var(--grain-opacity);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  background: var(--bg);
}

.nav-left { display: flex; align-items: center; gap: 28px; }

.site-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--fg);
  text-decoration: none;
}

.nav-links { display: flex; gap: 20px; list-style: none; }

.nav-links a {
  font-size: 10px;
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--fg); }

.nav-right {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  padding: 3px 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

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

/* ── LAYOUT ── */
.container {
  display: grid;
  grid-template-columns: 1fr 200px;
  min-height: 100vh;
  padding-top: 38px;
}

/* ── MAIN ── */
.main-content {
  padding: 0;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.1s;
  min-width: 0;
}

.hero-strip {
  height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 10px;
}

.hero-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--fg);
}

.hero-sep { color: var(--line); font-size: 14px; }

.hero-sub {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.08em;
}

.v-tag {
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.08em;
  margin-left: auto;
}

.section-header {
  height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
}

.section-tab {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--dim);
  cursor: pointer;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  border-top: none; border-left: none; border-right: none;
  font-family: var(--mono);
  font-weight: 300;
}

.section-tab.active { color: var(--fg); border-bottom-color: var(--fg); }
.section-tab:hover { color: var(--fg); }

.content-area { padding: 0; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── FEED — compact timeline ── */
.feed-loading,
.feed-error {
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.06em;
  padding: 16px 24px;
  line-height: 2;
}

.feed-error a { color: var(--accent); text-decoration: none; }

.feed-entry {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  animation: fadeUp 0.35s ease forwards;
  transition: background 0.1s;
}

.feed-entry:hover { background: var(--row-hover); }

.feed-entry:nth-child(1) { animation-delay: 0.04s; }
.feed-entry:nth-child(2) { animation-delay: 0.08s; }
.feed-entry:nth-child(3) { animation-delay: 0.12s; }
.feed-entry:nth-child(4) { animation-delay: 0.16s; }
.feed-entry:nth-child(5) { animation-delay: 0.20s; }
.feed-entry:nth-child(n+6) { animation-delay: 0.24s; }

.feed-entry-date {
  padding: 12px 0 12px 24px;
  font-size: 9px;
  color: var(--dim);
  letter-spacing: 0.06em;
  line-height: 1.6;
  border-right: 1px solid var(--line);
  flex-shrink: 0;
}

.feed-entry-date .feed-time {
  display: block;
  font-size: 8px;
  color: var(--dim);
  opacity: 0.6;
  margin-top: 2px;
}

.feed-entry-body-wrap {
  padding: 12px 24px 12px 16px;
  min-width: 0;
}

.feed-entry-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--fg);
  margin-bottom: 4px;
  line-height: 1.5;
}

.feed-entry-text {
  font-size: 10px;
  color: var(--bio-color);
  line-height: 1.7;
  letter-spacing: 0.02em;
  max-width: 480px;
  word-break: break-word;
}

.feed-entry-text a { color: var(--accent); text-decoration: none; }

.feed-img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  object-fit: cover;
  margin: 6px 0;
  border: 1px solid var(--line);
  opacity: 0.88;
  transition: opacity 0.2s;
}

.feed-img:hover { opacity: 1; }

.feed-entry-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.feed-permalink {
  font-size: 9px;
  color: var(--dim);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.15s;
}

.feed-permalink:hover { color: var(--accent); }

.feed-src {
  font-size: 8px;
  color: var(--dim);
  opacity: 0.5;
  letter-spacing: 0.06em;
}

/* ── RELEASES ── */
.release-list { display: flex; flex-direction: column; }

.release-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.1s;
}

.release-row:hover { background: var(--row-hover); }

.release-cover {
  width: 48px; height: 48px;
  background: var(--img-bg);
  border: 1px solid var(--line);
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.release-cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }

.cover-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  color: var(--cover-num);
  font-weight: 500;
}

.release-info { min-width: 0; }

.release-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.release-meta { font-size: 9px; color: var(--dim); letter-spacing: 0.06em; }
.release-right { text-align: right; flex-shrink: 0; }

.release-year { font-size: 9px; color: var(--dim); letter-spacing: 0.06em; display: block; margin-bottom: 3px; }

.release-type {
  font-size: 8px; letter-spacing: 0.1em;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 1px 5px;
  text-transform: uppercase;
}

/* ── RIGHT SIDEBAR ── */
.sidebar-right {
  border-left: 1px solid var(--line);
  padding: 24px 16px;
  position: sticky;
  top: 38px;
  height: calc(100vh - 38px);
  overflow-y: auto;
  opacity: 0;
  animation: fadeUp 0.5s ease forwards 0.2s;
}

.sidebar-section { margin-bottom: 24px; }

.sidebar-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.status-dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #3a6b3a;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse 2.5s ease-in-out infinite;
}

.status-line { font-size: 10px; color: var(--dim); letter-spacing: 0.04em; }

/* Sidebar links */
.sidebar-links { display: flex; flex-direction: column; }

.sidebar-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s;
}

.sidebar-link:hover { padding-left: 4px; }

.sidebar-link-name {
  font-size: 10px;
  color: var(--fg);
  letter-spacing: 0.05em;
  text-transform: lowercase;
}

.sidebar-link-arrow {
  font-size: 9px;
  color: var(--dim);
  transition: color 0.15s;
}

.sidebar-link:hover .sidebar-link-arrow { color: var(--accent); }

.footer-text { font-size: 9px; color: var(--footer-color); letter-spacing: 0.06em; line-height: 2; }

.h-rule { height: 1px; background: var(--line); margin: 20px 0; }

/* ── CURSOR ── */
.cursor-dot {
  position: fixed;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s;
}

::selection { background: var(--accent); color: var(--bg); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); }

/* ── MOBILE ── */
@media (max-width: 600px) {
  .container { grid-template-columns: 1fr; }

  .sidebar-right {
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid var(--line);
  }

  nav {
    height: auto;
    min-height: 38px;
    padding: 8px 16px;
    flex-wrap: wrap;
    gap: 6px;
  }

  #ts { display: none; }

  .feed-entry { grid-template-columns: 80px 1fr; }
  .feed-entry-date { padding-left: 16px; }
  .feed-entry-body-wrap { padding: 12px 16px 12px 12px; }
}

/* ── EMBEDS ── */
.feed-entry-body-wrap iframe {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: 8px 0;
  border: none;
}

.feed-byline {
  font-size: 8px;
  color: var(--dim);
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-left: 4px;
}
