/* ============================================================
   [ALIAS] — portfolio styles
   Pure white background, near-black text, EB Garamond + Inter.
   Mobile-first; desktop styles in media query.
   ============================================================ */

:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --fg-muted: #666666;
  --fg-faint: #aaaaaa;
  --rule: #e5e5e5;
  --accent: #1a1a1a; /* same as fg — we don't use a colored accent */
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 640px;
  --gutter: 1.5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: opacity 0.15s ease;
}

a:hover {
  opacity: 0.6;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--gutter);
}

/* ---------- Anchor nav ---------- */
/* Mobile: hidden by default. We could add a hamburger later if needed.
   For now mobile users scroll naturally. */
.anchor-nav {
  display: none;
}

/* ---------- Header ---------- */
header#top {
  padding: 4rem 0 3rem;
}

header h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.5rem;
  margin: 0;
  letter-spacing: -0.01em;
}

/* ---------- Section spacing ---------- */
section, footer {
  padding: 3rem 0;
  border-top: 1px solid var(--rule);
}

section h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 2rem;
  letter-spacing: -0.005em;
}

/* ---------- Bio ---------- */
#bio p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

#bio p:last-child {
  color: var(--fg-muted);
  font-size: 0.95rem;
  margin-top: 1.5rem;
}

/* ---------- Work items ---------- */
.work-item {
  margin-bottom: 3rem;
}

.work-item:last-child {
  margin-bottom: 0;
}

.work-item h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
}

.work-item .meta {
  color: var(--fg-muted);
  font-size: 0.875rem;
  margin: 0 0 1rem;
  font-style: italic;
}

.work-item p {
  margin: 0 0 1rem;
}

.work-link {
  color: var(--fg);
  font-weight: 500;
}

/* ---------- Video embed ---------- */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 1rem 0;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Audio player ---------- */
.audio-player {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0;
  margin: 0.5rem 0;
  font-family: var(--sans);
  font-size: 0.875rem;
}

.audio-player .play-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.audio-player .play-btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.audio-player .play-btn.playing {
  background: var(--fg);
  color: var(--bg);
}

.audio-player .progress {
  flex: 1;
  height: 1px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}

.audio-player .progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: var(--fg);
  transition: width 0.1s linear;
}

.audio-player .time {
  flex-shrink: 0;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  min-width: 80px;
  text-align: right;
}

/* ---------- RX section ---------- */
#rx p {
  margin: 0 0 1rem;
}

.external-links {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: 1.5rem !important;
}

.external-links a {
  color: var(--fg-muted);
}

/* ---------- Footer ---------- */
footer#contact {
  padding-bottom: 5rem;
}

footer p {
  margin: 0 0 0.75rem;
}

/* ============================================================
   Desktop: anchor nav appears on the left, content stays narrow
   ============================================================ */
@media (min-width: 900px) {
  :root {
    --gutter: 2rem;
  }

  main {
    margin-left: 240px;
    padding: var(--gutter) 3rem;
  }

  .anchor-nav {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    padding: 3rem 2rem;
    border-right: 1px solid var(--rule);
  }

  .anchor-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .anchor-nav li:first-child a {
    font-family: var(--serif);
    font-size: 1.1rem;
  }

  .anchor-nav a {
    text-decoration: none;
    color: var(--fg-muted);
    font-size: 0.9rem;
    transition: color 0.15s ease;
  }

  .anchor-nav a:hover {
    color: var(--fg);
    opacity: 1;
  }

  header h1 {
    font-size: 3rem;
  }
}
