/* ═══════════════════════════════════════════════
   me.slipgate.au — Late Night Creative Theme
   Fonts: Playfair Display + Fragment Mono
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Fragment+Mono:ital@0;1&family=Lora:ital,wght@0,400;1,400&display=swap');

:root {
  --bg:        #0c0b0e;
  --bg2:       #111019;
  --bg3:       #181622;
  --ink:       #e8e2d9;
  --ink2:      #a89f92;
  --ink3:      #5c5650;
  --amber:     #d4956a;
  --amber2:    #e8b48a;
  --rust:      #9b4a2e;
  --teal:      #4a9b8e;
  --rule:      rgba(232,226,217,0.07);
  --rule2:     rgba(232,226,217,0.12);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Lora', Georgia, serif;
  --font-mono:    'Fragment Mono', 'Courier New', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.8;
  overflow-x: hidden;
}

/* Grain overlay */
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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ── LAYOUT ── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 32px;
}
.container--wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 0;
  background: linear-gradient(to bottom, rgba(12,11,14,0.98), rgba(12,11,14,0));
  backdrop-filter: blur(6px);
}
.site-nav .container--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink2);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-logo span { color: var(--amber); }
.nav-logo:hover { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink3);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a.active { color: var(--amber); }

/* ── HOMEPAGE HERO ── */
.home-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(212,149,106,0.05) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 70%, rgba(74,155,142,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero-time {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--ink3);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-time::before {
  content: '';
  display: block;
  width: 32px; height: 1px;
  background: var(--amber);
}
.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -1px;
  max-width: 680px;
  margin-bottom: 32px;
}
.home-hero h1 em {
  font-style: italic;
  color: var(--amber);
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--ink3);
  max-width: 400px;
  line-height: 1.8;
}

/* ── LATEST GRID ── */
.latest {
  padding: 100px 0;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-eyebrow::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--rule);
}
.posts-grid--full {
  grid-template-columns: 1fr;
  background: none;
  gap: 0;
}

.post-card {
  background: var(--bg);
  padding: 40px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.3s;
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--amber);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s;
}
.post-card:hover { background: var(--bg2); }
.post-card:hover::before { transform: scaleY(1); }

.post-card--featured {
  grid-column: 1 / -1;
  padding: 60px;
  border-bottom: 1px solid var(--rule2);
}
.post-card--featured .post-title {
  font-size: clamp(28px, 3.5vw, 44px);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.post-section {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 2px;
}
.section--stories  { color: var(--amber);  background: rgba(212,149,106,0.1);  border: 1px solid rgba(212,149,106,0.2); }
.section--articles { color: var(--teal);   background: rgba(74,155,142,0.1);   border: 1px solid rgba(74,155,142,0.2); }
.section--music    { color: #9b7fd4;       background: rgba(155,127,212,0.1);  border: 1px solid rgba(155,127,212,0.2); }
.section--journal  { color: var(--ink2);   background: rgba(168,159,146,0.08); border: 1px solid rgba(168,159,146,0.15); }

.post-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink3);
}

.post-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  transition: color 0.2s;
}
.post-card:hover .post-title { color: var(--amber); }

.post-excerpt {
  font-size: 14px;
  color: var(--ink2);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-readmore {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, gap 0.2s;
}
.post-card:hover .post-readmore {
  color: var(--amber);
  gap: 12px;
}

/* ── SECTION LIST PAGE ── */
.section-hero {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--rule);
}
.section-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 400;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.section-hero h1 em { font-style: italic; color: var(--amber); }
.section-desc {
  font-size: 15px;
  color: var(--ink2);
  max-width: 480px;
  line-height: 1.75;
}

.post-list {
  padding: 60px 0 100px;
}

/* ── SINGLE POST ── */
.post-header {
  padding: 140px 0 60px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 70% 50%, rgba(212,149,106,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.post-header .post-meta { margin-bottom: 24px; }
.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1px;
  max-width: 680px;
  margin-bottom: 24px;
}
.post-header h1 em { font-style: italic; color: var(--amber); }
.post-description {
  font-size: 18px;
  font-style: italic;
  color: var(--ink2);
  max-width: 580px;
  line-height: 1.7;
  font-family: var(--font-display);
}

/* ── POST CONTENT ── */
.post-content {
  padding: 72px 0 100px;
}
.post-content p {
  margin-bottom: 1.6em;
  font-size: 17px;
  line-height: 1.85;
  color: rgba(232,226,217,0.85);
}
.post-content h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin: 2.5em 0 0.8em;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.post-content h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  margin: 2em 0 0.6em;
  color: var(--amber);
}
.post-content blockquote {
  border-left: 2px solid var(--amber);
  margin: 2em 0;
  padding: 4px 0 4px 28px;
  font-style: italic;
  color: var(--ink2);
  font-size: 19px;
  line-height: 1.7;
  font-family: var(--font-display);
}
.post-content hr {
  border: none;
  border-top: 1px solid var(--rule2);
  margin: 3em 0;
  position: relative;
}
.post-content hr::before {
  content: '✦';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  padding: 0 12px;
  color: var(--ink3);
  font-size: 10px;
}
.post-content a {
  color: var(--amber);
  text-decoration: underline;
  text-decoration-color: rgba(212,149,106,0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.post-content a:hover { text-decoration-color: var(--amber); }
.post-content code {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--bg3);
  border: 1px solid var(--rule2);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--amber2);
}
.post-content pre {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 24px;
  overflow-x: auto;
  margin: 2em 0;
}
.post-content pre code {
  background: none;
  border: none;
  padding: 0;
}
.post-content ul, .post-content ol {
  padding-left: 24px;
  margin-bottom: 1.6em;
}
.post-content li {
  margin-bottom: 0.4em;
  color: rgba(232,226,217,0.85);
}

/* ── MUSIC SECTION ── */
.music-embed {
  background: var(--bg2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px;
  margin: 2em 0;
}
.music-embed iframe {
  width: 100%;
  border-radius: 8px;
  border: none;
}
.music-meta {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.music-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #9b7fd4;
  background: rgba(155,127,212,0.1);
  border: 1px solid rgba(155,127,212,0.2);
  padding: 4px 10px;
  border-radius: 2px;
}

/* ── POST FOOTER ── */
.post-footer {
  padding: 48px 0 80px;
  border-top: 1px solid var(--rule);
}
.post-footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--rule);
  margin-bottom: 48px;
}
.post-nav-link {
  background: var(--bg);
  padding: 28px 32px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}
.post-nav-link:hover { background: var(--bg2); }
.post-nav-dir {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink3);
  margin-bottom: 8px;
}
.post-nav-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
  line-height: 1.4;
}
.post-nav-link.next { text-align: right; }

/* ── ABOUT STRIP ── */
.about-strip {
  padding: 80px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.about-strip .container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: center;
}
.about-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink3);
}
.about-text {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink2);
}
.about-text em { font-style: italic; color: var(--amber); }
.about-text strong { font-weight: 500; color: var(--ink); }

/* ── FOOTER ── */
.site-footer {
  padding: 48px 0;
}
.site-footer .container--wide {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-logo {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--ink3);
}
.footer-logo em { font-style: normal; color: var(--amber); }
.footer-links {
  display: flex;
  gap: 28px;
  list-style: none;
}
.footer-links a {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink3);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--amber); }
.footer-copy {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(92,86,80,0.6);
  display: flex;
  justify-content: space-between;
}

/* ── TAGS ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink3);
  border: 1px solid var(--rule2);
  padding: 4px 12px;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s;
}
.tag:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ── REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 760px) {
  .container { padding: 0 20px; }
  .container--wide { padding: 0 20px; }
  .posts-grid { grid-template-columns: 1fr; background: none; gap: 0; }
  .post-card--featured { padding: 32px; }
  .post-footer-nav { grid-template-columns: 1fr; }
  .about-strip .container { grid-template-columns: 1fr; gap: 24px; }
  .footer-top { flex-direction: column; gap: 20px; align-items: flex-start; }
  .footer-copy { flex-direction: column; gap: 8px; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .nav-links { gap: 20px; }
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 48px 0 24px;
  border-top: 1px solid var(--rule);
  margin-top: 2px;
}
.pagination-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ink2);
  text-decoration: none;
  padding: 10px 20px;
  border: 1px solid var(--rule2);
  border-radius: 2px;
  transition: all 0.2s;
}
.pagination-btn:hover { border-color: var(--amber); color: var(--amber); }
.pagination-btn--disabled { color: var(--ink3); border-color: var(--rule); cursor: default; }
.pagination-info {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink3);
}

/* ── ARCHIVE ── */
.archive-year {
  margin-bottom: 64px;
}
.archive-year-label {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 400;
  color: transparent;
  -webkit-text-stroke: 1px rgba(232,226,217,0.1);
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: -2px;
  user-select: none;
}
.archive-entries {
  display: flex;
  flex-direction: column;
}
.archive-entry {
  display: grid;
  grid-template-columns: 60px 80px 1fr 20px;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.archive-entry:first-child { border-top: 1px solid var(--rule); }
.archive-entry:hover { padding-left: 8px; }
.archive-entry:hover .archive-title { color: var(--amber); }
.archive-entry:hover .archive-arrow { color: var(--amber); transform: translateX(4px); }
.archive-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink3);
  flex-shrink: 0;
}
.archive-section {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  flex-shrink: 0;
  text-align: center;
}
.archive-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  transition: color 0.2s;
  line-height: 1.3;
}
.archive-arrow {
  font-size: 14px;
  color: var(--ink3);
  transition: color 0.2s, transform 0.2s;
  text-align: right;
}

@media (max-width: 600px) {
  .archive-entry { grid-template-columns: 50px 1fr 16px; }
  .archive-section { display: none; }
}
