/* ============================================
   Atticus Reynolds — Portfolio Site
   ============================================ */

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

:root {
  --bg: #0d0d0d;
  --bg-nav: #141414;
  --text: #f0ece6;
  --text-muted: #999;
  --accent: #c9a96e;
  --font-display: 'Domaine Display', 'Georgia', serif;
  --font-sans-fine: 'Domaine Sans Fine', 'Helvetica Neue', Arial, sans-serif;
  --font-text: 'Domaine Text', 'Georgia', serif;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-text);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.02em;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.3;
}

h3 {
  font-size: 1.2rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav__name {
  font-family: var(--font-sans-fine);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width 0.3s ease;
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__links a.active {
  opacity: 0.6;
}

.nav__links a:hover {
  opacity: 1;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* --- Layout --- */
.page-spacer {
  height: 70px; /* offset for fixed nav */
}

main {
  flex: 1;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

/* --- Hero (Home page) --- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.hero__title {
  position: relative;
  z-index: 2;
  font-family: var(--font-sans-fine);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 400;
  letter-spacing: 0.35em;
  text-transform: none;
  color: var(--bg);
  text-align: center;
}

.hero__socials {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 1.5rem;
}

.hero__socials a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s ease;
}

.hero__socials a:hover {
  color: #fff;
  opacity: 1;
}

.hero__socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* --- About Page --- */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.about__image {
  width: 100%;
  max-width: 500px;
  margin-bottom: 3rem;
}

.about__image img {
  width: 100%;
  height: auto;
}

.about__text {
  font-family: var(--font-text);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.8;
  text-align: left;
  max-width: 700px;
}

/* --- Words Page --- */
.words {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.words__image {
  position: sticky;
  top: 100px;
}

.words__image img {
  width: 100%;
  max-width: 420px;
}

.words__list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.words__item h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.words__item h2 a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.words__item h2 a:hover {
  opacity: 0.7;
}

.words__item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Music Page --- */
.music {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.music__heading {
  font-family: var(--font-text);
  font-size: clamp(2rem, 4vw, 3rem);
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 400;
}

.music__bio {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}

.music__bio-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.music__bio p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.music__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.music__card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.music__card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.music__card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.music__card-info {
  padding: 1.25rem;
}

.music__card-info h3 {
  font-family: var(--font-text);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.music__card-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Bandcamp hover dropdown */
.music__card--bandcamp {
  position: relative;
  cursor: pointer;
}

.music__card-dropdown {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(20, 20, 20, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: all 0.25s ease;
  z-index: 10;
}

.music__card--bandcamp:hover .music__card-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.music__card-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: 3px;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.music__card-dropdown a:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.music__card-dropdown svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.music__embed {
  margin-top: 3rem;
}

.music__embed iframe {
  width: 100%;
  border: none;
  border-radius: 4px;
}

/* --- Video Carousel --- */
.music__videos {
  margin-top: 4rem;
}

.music__carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.music__carousel {
  overflow: hidden;
  flex: 1;
  border-radius: 6px;
}

.music__carousel-track {
  display: flex;
  gap: 1.25rem;
  will-change: transform;
}

.music__video-card {
  flex-shrink: 0;
  width: 340px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.music__video-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.music__video-card.is-playing {
  width: 340px;
}

.music__video-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.music__video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.music__video-card:hover .music__video-thumb img {
  transform: scale(1.03);
}

.music__video-play {
  display: none;
}

.music__video-thumb iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.music__video-info {
  padding: 0.85rem 1rem;
}

.music__video-info h3 {
  font-family: var(--font-text);
  font-size: 0.95rem;
  font-weight: 400;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music__video-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Arrow buttons — sit on the sides */
.music__carousel-btn {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: all 0.2s ease;
}

.music__carousel-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

.music__carousel-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .music__carousel-btn {
    display: none;
  }

  .music__carousel {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .music__carousel::-webkit-scrollbar {
    display: none;
  }

  .music__video-card {
    scroll-snap-align: start;
    width: 280px;
  }
}

/* --- Theater Mode --- */
.theater {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.theater.active {
  opacity: 1;
  visibility: visible;
}

.theater__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.theater__container {
  position: relative;
  width: 90%;
  max-width: 960px;
  z-index: 1;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.theater.active .theater__container {
  transform: scale(1) translateY(0);
}

.theater__close {
  position: absolute;
  top: -48px;
  right: 0;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.theater__close:hover {
  opacity: 1;
}

.theater__close svg {
  width: 28px;
  height: 28px;
}

.theater__player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.theater__player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.theater__info {
  padding: 1.25rem 0.25rem;
}

.theater__title {
  font-family: var(--font-text);
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 0.3rem;
}

.theater__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .theater__container {
    width: 95%;
  }

  .theater__close {
    top: -42px;
  }
}

/* --- Specific Records Page --- */
.specific-records {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.specific-records__logo {
  display: inline-block;
  margin-bottom: 4rem;
  transition: opacity 0.3s ease;
}

.specific-records__logo:hover {
  opacity: 0.7;
}

.specific-records__logo img {
  max-width: 400px;
  width: 100%;
  height: auto;
}

.specific-records__text {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  line-height: 1.9;
  color: var(--text);
  max-width: 650px;
  margin: 0 auto;
}

.specific-records__text p + p {
  margin-top: 1.5rem;
}

/* --- Contact Page --- */
.contact {
  max-width: 600px;
  margin: 0 auto;
  padding: 5rem 2rem;
  text-align: center;
}

.contact__image {
  width: 320px;
  height: 320px;
  overflow: hidden;
  margin: 0 auto 2rem;
}

.contact__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact__heading {
  font-family: var(--font-text);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 3rem;
}

.contact__email {
  font-size: 1.1rem;
  margin-bottom: 2.5rem;
}

.contact__email a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.contact__socials {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact__socials a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.contact__socials a:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
}

.contact__socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .contact__socials {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.footer__socials {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer__socials a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.footer__socials a:hover {
  color: var(--text);
  opacity: 1;
}

.footer__socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* --- Fade-in animation --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav {
    padding: 0 1.25rem;
  }

  .nav__links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-nav);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav__links.open {
    max-height: 400px;
    padding: 1rem 0;
  }

  .nav__links li {
    width: 100%;
    text-align: center;
  }

  .nav__links a {
    display: block;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
  }

  .nav__links a::after {
    display: none;
  }

  .nav__toggle {
    display: block;
  }

  .nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav__toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero__title {
    letter-spacing: 0.15em;
    padding: 0 1rem;
  }

  .words {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .words__image {
    position: static;
    display: flex;
    justify-content: center;
  }

  .words__image img {
    max-width: 350px;
  }

  .about__text {
    font-size: 1.05rem;
  }

  .contact__socials {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .nav__name {
    font-size: 1.25rem;
  }

  .section {
    padding: 3rem 0;
  }
}
