/* =========================================================
   ROGER MATEO — PORTFOLIO
   ========================================================= */

:root {
  --bg: #0f1934;
  --bg-mid: #0e1618;
  --text: #f5f2ed;
  --gold: #d5b35c;
  --muted: #d6c78e;
  --hero-bg: #111820;
  --max-width: 1120px;
  --transition: 600ms cubic-bezier(.2,.7,.2,1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* -------------------------
   HERO
   ------------------------- */

.hero {
  min-height: 100vh;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: url("assets/hero.jpg") center center / cover no-repeat;
  background-attachment: fixed;
}

/* Hero image supplied for the site. */

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, .12);
}

.nav {
  position: absolute;
  top: 31px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
  white-space: nowrap;
}

.nav a,
.project-title,
.project-role {
  position: relative;
}

.nav a::after,
.project-title::after,
.project-role::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms cubic-bezier(.2,.7,.2,1);
}

.nav a:hover::after,
.project-title:hover::after,
.project-role:hover::after {
  transform: scaleX(1);
}

.nav .language {
  color: var(--gold);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-top: 20px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(52px, 7vw, 88px);
  line-height: .95;
  font-weight: 400;
  letter-spacing: -3px;
  background: linear-gradient(90deg, #a96355, #fff 52%, #c78bc7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 span {
  font-weight: 400;
}

.hero p {
  margin: 18px 0 0;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  padding: 11px 27px;
  border: 1px solid rgba(255, 255, 255, .9);
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2px;
  transition: background-color 300ms ease, color 300ms ease, transform 300ms ease;
}

.hero-button:hover {
  background: #fff;
  color: #111;
  transform: translateY(-2px);
}


/* -------------------------
   GENERIC SECTIONS
   ------------------------- */

.section-inner {
  width: min(var(--max-width), calc(100% - 80px));
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 900px;
}

.section-dark {
  background: var(--bg);
}

.section-mid {
  background: var(--bg-mid);
}

.section-title {
  margin: 0;
  color: var(--gold);
  text-align: center;
  font-size: 29px;
  line-height: 1;
  font-weight: 700;
}

/* -------------------------
   PROJECTS
   ------------------------- */

.projects {
  padding: 68px 0 92px;
}

.projects .section-title {
  margin-bottom: 50px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 62px;
  row-gap: 44px;
}

.project-image-link {
  display: block;
  overflow: hidden;
  aspect-ratio: 1.48 / 1;
  background: #f4f4f4;
}

.project-image-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2,.7,.2,1);
}

.project-image-link:hover img {
  transform: scale(1.025);
}

.project-info {
  padding-top: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-title {
  font-size: 24px;
  line-height: 1.08;
  font-weight: 500;
}

.project-role {
  margin-top: 3px;
  font-size: 16px;
  line-height: 1.2;
}

.project-year {
  margin-top: 5px;
  color: var(--gold);
  font-size: 13px;
}

/* -------------------------
   CONTACT
   ------------------------- */

.contact {
  padding: 57px 0 43px;
  background: var(--bg-mid);
}

.contact-inner {
  text-align: center;
}

.contact .section-title {
  margin-bottom: 31px;
}

.email {
  display: inline-block;
  font-size: clamp(25px, 3vw, 35px);
  line-height: 1.1;
}

.socials {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 31px;
}

.socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transition: transform 300ms ease;
}

.socials a:hover {
  transform: translateY(-3px);
  
}

.socials img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.copyright {
  margin: 37px 0 0;
  font-size: 10px;
}

/* -------------------------
   SCROLL REVEAL
   ------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 800ms cubic-bezier(.2,.7,.2,1),
    transform 800ms cubic-bezier(.2,.7,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger for project cards */
.project:nth-child(2),
.service:nth-child(2) {
  transition-delay: 100ms;
}

.project:nth-child(3),
.service:nth-child(3) {
  transition-delay: 180ms;
}

.project:nth-child(4) {
  transition-delay: 260ms;
}

.project:nth-child(5) {
  transition-delay: 340ms;
}

/* -------------------------
   RESPONSIVE
   ------------------------- */


/* -------------------------
   ABOUT PAGE
   ------------------------- */

.about-body {
  background: #0b0b0b;
}

.about-page {
  min-height: 100vh;
  padding: 24px 20px 0;
  background: #0b0b0b;
}

.about-layout {
  min-height: calc(100vh - 24px);
  display: grid;
  grid-template-columns: minmax(0, 57%) minmax(0, 43%);
  gap: 64px;
  align-items: start;
}

.about-photo {
  height: calc(100vh - 90px);
  margin-top: 66px;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
  background: #ddd;
}

.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.about-copy {
  padding: 10px 0 70px 8vw;
}

.back-link {
  display: inline-block;
  margin-bottom: 75px;
  color: rgba(255,255,255,.72);
  font-size: 12px;
  position: relative;
}

.back-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms cubic-bezier(.2,.7,.2,1);
}

.back-link:hover::after {
  transform: scaleX(1);
}

.about-content {
  max-width: 820px;
}

.about-content h1 {
  margin: 0 0 52px;
  color: var(--gold);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.about-content h2 {
  margin: 0 0 35px;
  color: var(--gold);
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
}

.bio-text {
  color: rgba(255,255,255,.68);
  font-size: 17px;
  line-height: 1.62;
}

.bio-text p {
  margin: 0 0 27px;
}

.bio-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .hero {
    min-height: 100svh;
    height: 100svh;
    background-attachment: scroll;
  }

  .nav {
    top: 24px;
    gap: 13px;
    font-size: 10px;
  }

  .hero h1 {
    letter-spacing: -2px;
    font-size: clamp(38px, 10vw, 62px);
  }

  .hero p {
    margin-top: 14px;
    font-size: 15px;
  }

  .section-inner {
    width: min(100% - 40px, var(--max-width));
  }

  .projects {
    padding: 48px 0 65px;
  }

  .projects .section-title {
    margin-bottom: 34px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-title {
    font-size: 22px;
  }


  .contact {
    padding: 48px 0 35px;
  }

  .desktop-only {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}

.hero-content .hero-button {
  transition-delay: 140ms;
}

@media (max-width: 700px) {
  .hero-button {
    margin-top: 24px;
    padding: 10px 24px;
  }
}

.about-page {
  min-height: 100vh;
  padding: 40px;
  background: var(--bg);
}

.back-link {
  font-size: 12px;
  position: relative;
}

.about-page-content {
  width: min(720px, 100%);
  margin: 18vh auto 0;
  text-align: center;
}

.about-page-content h1 {
  margin: 0;
  color: var(--gold);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 500;
}

.about-page-content p {
  margin: 30px auto 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
}

@media (max-width: 700px) {
  .about-page {
    padding: 25px 20px;
  }
}


@media (max-width: 700px) {
  .about-page {
    padding: 20px;
  }

  .about-layout {
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
  }

  .about-photo {
    width: 100%;
    height: 72vh;
    min-height: 430px;
    border-radius: 12px;
  }

  .about-copy {
    padding: 0 0 50px;
  }

  .back-link {
    margin-bottom: 55px;
  }

  .about-content h1 {
    font-size: 28px;
    margin-bottom: 45px;
  }

  .about-content h2 {
    margin-bottom: 28px;
  }

  .bio-text {
    font-size: 15px;
    line-height: 1.6;
  }
}



/* -------------------------
   ABOUT NAVIGATION / FOOTER
   ------------------------- */

.about-nav {
  position: absolute;
  top: 31px;
  z-index: 10;
}

.about-footer {
  margin-top: 0;
  border-top: 1px solid rgba(255,255,255,.035);
}

/* On the About page the image sits on the right. */
@media (min-width: 701px) {
  .about-page {
    padding-top: 24px;
  }

  .about-copy {
    grid-column: 1;
  }

  .about-photo {
    grid-column: 2;
  }
}

@media (max-width: 700px) {
  .about-nav {
    position: absolute;
    top: 24px;
  }

  .about-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-top: 55px;
  }

  .about-copy {
    padding: 0 0 10px;
  }

  .about-photo {
    order: 2;
  }

  .about-footer {
    padding-top: 48px;
  }
}


/* -------------------------
   HERO BUTTON GROUP
   ------------------------- */
.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-content .hero-buttons .hero-button {
  margin-top: 28px;
}

/* The hero subtitle is not an interactive element. */
.hero p::after {
  display: none !important;
}

/* -------------------------
   PROJECT DETAIL PAGES
   ------------------------- */
.project-body {
  background: var(--bg);
}

.project-header {
  height: 90px;
  position: relative;
}

.project-nav {
  top: 31px;
}

.project-detail {
  padding: 30px 0 100px;
  background: var(--bg);
}

.project-detail-inner {
  width: min(var(--max-width), calc(100% - 80px));
  margin: 0 auto;
}

.project-detail .back-link {
  margin-bottom: 0;
}

.project-detail-heading {
  margin-top: 70px;
}

.project-detail-heading h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  font-weight: 500;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 16px;
}

.project-meta span:first-child {
  color: #fff;
}

.project-meta span:last-child {
  color: var(--gold);
  font-size: 13px;
}

.project-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 70px;
}

.project-text-column {
  font-size: 15px;
  line-height: 1.85;
}

.project-video-wrap {
  margin-top: 70px;
}

.project-video {
  aspect-ratio: 16 / 9;
  background: #080d12;
}

.project-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* -------------------------
   MUSIC CATALOG
   ------------------------- */
.catalog-main {
  min-height: calc(100vh - 90px);
  padding: 30px 0 160px;
}

.catalog-inner {
  width: min(var(--max-width), calc(100% - 80px));
  margin: 0 auto;
}

.catalog-title {
  margin: 70px 0 14px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1;
  font-weight: 500;
}

.catalog-intro {
  max-width: 650px;
  margin: 0 0 55px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
}

.track-list {
  border-top: 1px solid rgba(255,255,255,.22);
}

.track {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid rgba(255,255,255,.14);
}

.play-btn,
.player-play {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 0;
  position: relative;
}

.play-btn::before,
.player-play::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
  vertical-align: middle;
}

.play-btn.is-playing::before,
.player-play.is-playing::before {
  width: 14px;
  height: 18px;
  border: 0;
  background: linear-gradient(to right, #fff 0 5px, transparent 5px 9px, #fff 9px 14px);
}

.track-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.track-info strong {
  font-size: 17px;
  font-weight: 500;
}

.track-info span,
.track-duration {
  font-size: 12px;
  opacity: .55;
}

.catalog-player {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  background: rgba(14,22,24,.97);
  border-top: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(12px);
}

.catalog-player.active {
  display: block;
}

.player-inner {
  width: min(var(--max-width), calc(100% - 80px));
  margin: 0 auto;
  padding: 13px 0;
  display: grid;
  grid-template-columns: 45px 220px 1fr 90px;
  align-items: center;
  gap: 16px;
}

.player-current {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-current strong {
  font-size: 13px;
  font-weight: 500;
}

.player-current span {
  font-size: 10px;
  opacity: .55;
}

.player-progress,
.player-volume {
  width: 100%;
  accent-color: #fff;
  cursor: pointer;
}

.player-volume-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.player-volume-icon {
  font-size: 12px;
  opacity: .75;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 800ms cubic-bezier(.2,.7,.2,1),
    transform 800ms cubic-bezier(.2,.7,.2,1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  .hero-buttons .hero-button {
    margin-top: 24px;
    padding: 10px 24px;
  }

  .project-detail-inner,
  .catalog-inner {
    width: min(100% - 40px, var(--max-width));
  }

  .project-detail {
    padding-bottom: 70px;
  }

  .project-text-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 48px;
  }

  .project-detail-heading {
    margin-top: 55px;
  }

  .catalog-main {
    padding-bottom: 130px;
  }

  .catalog-title {
    margin-top: 55px;
  }

  .track {
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
  }

  .player-inner {
    width: 100%;
    padding: 10px 16px 13px;
    grid-template-columns: 40px 1fr auto;
    gap: 8px;
  }

  .player-progress {
    grid-column: 1 / -1;
  }

  .player-volume-wrap {
    grid-column: 1 / -1;
    max-width: 180px;
    justify-self: end;
  }
}
