/* ═══════════════════════════════════════════════════════════════
   ARTICLES PAGE — style.css / project.css companion
   Same design tokens, fonts and aesthetic as the rest of the site.
═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:           #0a0a0a;
  --fg:           #f0ede6;
  --accent:       #e8d5b0;
  --muted:        #333;
  --border:       #222;
  --border-light: rgba(240,237,230,0.08);
  --radius:       2px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
  cursor: none;
}

/* ─── CUSTOM CURSOR ─── */
#cursor {
  position: fixed; top: 0; left: 0;
  width: 10px; height: 10px;
  background: var(--fg);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, background 0.2s;
}
#cursor-ring {
  position: fixed; top: 0; left: 0;
  width: 36px; height: 36px;
  border: 1px solid rgba(240,237,230,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}
@media (hover: none), (pointer: coarse) {
  #cursor, #cursor-ring { display: none !important; }
  body { cursor: auto; }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2.5rem;
  mix-blend-mode: difference;
}
.nav-logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
}
.nav-back {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s, gap 0.2s;
}
.nav-back:hover { opacity: 1; gap: 0.75rem; }
.nav-back-arrow { font-size: 0.9rem; }

/* ─── ARTICLES HERO ─── */
.a-hero {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10rem 2.5rem 5rem;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.a-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}
.a-hero-content {
  max-width: 900px;
  animation: fadeUp 0.9s 0.2s both;
}
.a-hero-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0.9;
}
.a-hero-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.a-hero-sub {
  font-size: 0.9rem;
  line-height: 1.9;
  opacity: 0.7;
  max-width: 60ch;
}

/* ─── BODY ─── */
.a-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.a-section-label {
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.35;
}

.a-list-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4rem 0 2rem;
}
.a-list-count {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.35;
}

/* ─── PUBLICATION LIST ─── */
.a-list {
  border-top: 1px solid var(--border);
}

.a-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr auto;
  gap: 2.5rem;
  align-items: start;
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.a-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.a-item-index {
  font-family: 'Unbounded', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  opacity: 0.2;
  line-height: 1;
}

.a-item-main { min-width: 0; }

.a-item-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.9rem;
}
.a-item-type {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
}
.a-item-year {
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.4;
}
.a-item-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--fg);
  opacity: 0.3;
}

.a-item-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.a-item-authors {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 0.35rem;
}
.a-item-venue {
  font-size: 0.75rem;
  opacity: 0.45;
  font-style: italic;
  margin-bottom: 1.25rem;
}

.a-item-abstract {
  font-size: 0.85rem;
  line-height: 1.85;
  opacity: 0.7;
  max-width: 65ch;
  margin-bottom: 1.25rem;
}

.a-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.a-item-tag {
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  opacity: 0.6;
}

/* ─── PDF ACTION ─── */
.a-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  padding-top: 0.35rem;
}
.a-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg);
  background: #b8b8b8ac;
  text-decoration: none;
  padding: 0.85rem 1.4rem;
  border: 1px solid #b3b3b3ac;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, opacity 0.2s, transform 0.2s;
}
.a-pdf-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.a-pdf-btn-arrow { font-size: 0.8rem; transition: transform 0.2s; }
.a-pdf-btn:hover .a-pdf-btn-arrow { transform: translateY(2px); }

.a-pdf-btn.is-disabled {
  background: transparent;
  color: var(--fg);
  opacity: 0.35;
  border-color: var(--border);
  pointer-events: none;
}

.a-doi-link {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  opacity: 0.4;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.2s;
}
.a-doi-link:hover { opacity: 0.8; }

/* ─── EMPTY STATE ─── */
.a-empty {
  padding: 6rem 0;
  text-align: center;
  opacity: 0.4;
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ─── FOOTER NOTE ─── */
.a-footnote {
  padding: 5rem 0 6rem;
  font-size: 0.7rem;
  line-height: 1.9;
  opacity: 0.4;
  max-width: 60ch;
}

/* ─── FOOTER ─── */
footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.35;
  border-top: 1px solid var(--border);
}

/* ─── MUSIC BUTTON (same as main portfolio / project pages) ─── */
#music-btn {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.1rem 0.55rem 0.7rem;
  cursor: none;
  user-select: none;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.92);
  font: 500 0.68rem / 1 -apple-system, 'SF Pro Text', 'Helvetica Neue', sans-serif;
  letter-spacing: 0.01em;
  border-radius: 100px;
  background: linear-gradient(160deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.06) 40%, rgba(255,255,255,0.10) 100%);
  backdrop-filter: blur(28px) saturate(180%) brightness(1.08);
  -webkit-backdrop-filter: blur(28px) saturate(180%) brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 0 rgba(255,255,255,0.08), inset 0 0 0 0.5px rgba(255,255,255,0.18), 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.20);
  transition: box-shadow 0.25s ease, background 0.25s ease, transform 0.15s ease;
}
#music-btn:hover {
  background: linear-gradient(160deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.10) 40%, rgba(255,255,255,0.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.70), inset 0 -1px 0 rgba(255,255,255,0.10), inset 0 0 0 0.5px rgba(255,255,255,0.28), 0 12px 40px rgba(0,0,0,0.40), 0 2px 10px rgba(0,0,0,0.22);
  transform: translateX(-50%) translateY(-1px);
}
#music-btn:active {
  transform: translateX(-50%) translateY(0px) scale(0.97);
}
#music-btn.is-playing {
  background: linear-gradient(160deg, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0.08) 40%, rgba(180,220,255,0.15) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.60), inset 0 -1px 0 rgba(255,255,255,0.08), inset 0 0 0 0.5px rgba(255,255,255,0.22), 0 8px 32px rgba(0,0,0,0.35), 0 0 20px rgba(160,200,255,0.18);
}
.music-icon {
  position: relative; width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.14); border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.40), inset 0 0 0 0.5px rgba(255,255,255,0.15);
  transition: background 0.25s;
}
#music-btn:hover .music-icon { background: rgba(255,255,255,0.22); }
.music-icon svg { width: 15px; height: 15px; display: block; }
#music-btn.is-playing .music-disc { animation: discSpin 3s linear infinite; transform-origin: 50% 50%; }
@keyframes discSpin { to { transform: rotate(360deg); } }
.music-bars { display: flex; align-items: center; gap: 2.5px; height: 14px; opacity: 0; transition: opacity 0.3s ease; }
#music-btn.is-playing .music-bars { opacity: 1; }
.music-bar { width: 2px; height: 3px; background: rgba(255,255,255,0.85); border-radius: 2px; }
#music-btn.is-playing .music-bar:nth-child(1) { animation: bar1 0.9s ease-in-out infinite; }
#music-btn.is-playing .music-bar:nth-child(2) { animation: bar2 0.7s ease-in-out infinite 0.15s; }
#music-btn.is-playing .music-bar:nth-child(3) { animation: bar3 1.1s ease-in-out infinite 0.05s; }
#music-btn.is-playing .music-bar:nth-child(4) { animation: bar4 0.8s ease-in-out infinite 0.25s; }
#music-btn.is-playing .music-bar:nth-child(5) { animation: bar5 1.0s ease-in-out infinite 0.1s; }
@keyframes bar1 { 0%,100%{height:3px}  50%{height:12px} }
@keyframes bar2 { 0%,100%{height:6px}  50%{height:14px} }
@keyframes bar3 { 0%,100%{height:8px}  50%{height:4px}  }
@keyframes bar4 { 0%,100%{height:4px}  50%{height:11px} }
@keyframes bar5 { 0%,100%{height:9px}  50%{height:3px}  }
.music-label { font: 500 0.68rem / 1 -apple-system, sans-serif; letter-spacing: 0.01em; color: rgba(255,255,255,0.90); text-shadow: 0 1px 2px rgba(0,0,0,0.25); }
@media (hover: none), (pointer: coarse) { #music-btn { cursor: pointer; bottom: 1.5rem; } }

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

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .a-item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 2.5rem 0;
  }
  .a-item-index { display: none; }
  .a-item-actions { align-items: flex-start; }
  .a-hero { padding: 8rem 1.5rem 3.5rem; }
  .a-body { padding: 0 1.5rem; }
  footer { padding: 2rem 1.5rem; }
}

@media (max-width: 480px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-logo { font-size: 0.65rem; }
}