@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600&display=swap');

:root {
  --yellow: #FFE94A;
  --white: #F4FAFF;
  --red: #E7402A;
  --purple: #8A2BE8;
}

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

html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  font-family: 'Space Grotesk', sans-serif;
}

/* ===== Homepage ===== */

body.page-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5vh;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, #ffcf7a 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, #ffdca0 0%, transparent 40%),
    radial-gradient(circle at 50% 60%, #ff8fae 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, #ffb37a 0%, transparent 45%),
    #e8331f;
}

/* subtle grain so the gradient doesn't look flat */
body.page-home::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.logo {
  width: min(70vw, 640px);
  height: auto;
  user-select: none;
  z-index: 1;
  filter: hue-rotate(0deg);
  transition: filter 0.2s ease-out;
}

.logo:hover,
.logo:focus-visible {
  animation: rainbow 2.5s linear infinite;
}

@keyframes rainbow {
  0%   { filter: hue-rotate(0deg)   saturate(6) brightness(1.05); }
  50%  { filter: hue-rotate(180deg) saturate(6) brightness(1.05); }
  100% { filter: hue-rotate(360deg) saturate(6) brightness(1.05); }
}

nav {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.8rem);
  z-index: 1;
  flex-wrap: wrap;
  justify-content: center;
}

nav a {
  color: var(--yellow);
  text-decoration: none;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  .logo { animation: none; }
}

/* ===== About page ===== */

body.page-about {
  background: var(--yellow);
}

.site-header {
  padding: 1.5rem clamp(1.5rem, 4vw, 3rem) 0;
}

.site-header a {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.site-header a:hover,
.site-header a:focus-visible {
  text-decoration: underline;
}

.about-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

@media (max-width: 820px) {
  .about-wrap {
    grid-template-columns: 1fr;
  }
}

/* photo collage */

.about-photos {
  position: relative;
  aspect-ratio: 4 / 3.2;
  overflow: visible;
}

.about-photos .photo {
  position: absolute;
  border: 2px solid #fff;
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.photo--main {
  top: 3%;
  left: 3%;
  width: 62%;
  height: 88%;
  z-index: 1;
}

.photo--top {
  top: 30%;
  right: 2%;
  width: 42%;
  height: 45%;
  z-index: 2;
}

.photo--bottom {
  bottom: 2%;
  left: 22%;
  width: 40%;
  height: 32%;
  z-index: 3;
}

/* text column */

.about-text h1 {
  color: var(--red);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.2rem;
}

.about-text p {
  color: var(--red);
  font-size: 1rem;
  line-height: 1.55;
  margin-bottom: 1.2rem;
  max-width: 44ch;
}

.about-text h2,
.contact-wrap h2 {
  color: var(--red);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-top: 1.5rem;
}

.about-divider {
  border: none;
  border-top: 1px solid var(--red);
  opacity: 0.4;
  margin: 0.75rem 0 1.5rem;
}

.social-row {
  display: flex;
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.social-item .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.social-item svg {
  width: 26px;
  height: 26px;
  fill: var(--yellow);
}

.social-item span {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 500;
}

.social-item:hover .icon,
.social-item:focus-visible .icon {
  transform: scale(1.08);
  background: var(--purple);
}

/* ===== Projects page ===== */

body.page-projects {
  background: var(--yellow);
}

.portfolio-wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
}

.portfolio-title {
  color: var(--red);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 2rem;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.2rem, 3vw, 2rem);
}

@media (max-width: 900px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

.port-col {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vw, 2rem);
}

.port-item {
  display: block;
  text-decoration: none;
  color: var(--red);
}

.port-item:visited {
  color: var(--red);
}

.port-thumb {
  width: 100%;
  background: #d8d8d8;
  border-radius: 2px;
}

.port-item--tall .port-thumb { aspect-ratio: 4 / 4.7; }
.port-item--short .port-thumb { aspect-ratio: 4 / 2.7; }

.port-item p {
  color: var(--red);
  font-size: 1rem;
  margin-top: 0.6rem;
  line-height: 1.3;
}

/* ===== Contact page ===== */

body.page-contact {
  background: var(--yellow);
  display: flex;
  flex-direction: column;
}

.contact-wrap {
  max-width: 700px;
  margin: clamp(1rem, 6vh, 4rem) auto 0;
  padding: 0 clamp(1.5rem, 4vw, 3rem) 3rem;
}

.contact-wrap h1 {
  color: var(--red);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-wrap p {
  color: var(--red);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.contact-email {
  display: inline-block;
  color: var(--red);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  margin-bottom: 2.5rem;
}

.contact-email:hover,
.contact-email:focus-visible {
  color: var(--purple);
  border-color: var(--purple);
}

/* ===== Individual project pages ===== */

body.page-project {
  background: var(--yellow);
}

.project-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem) 3rem;
}

.project-wrap h1 {
  color: var(--red);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.project-wrap p {
  color: var(--red);
  font-size: 1.05rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
  max-width: 60ch;
}

.project-wrap p a {
  color: var(--red);
  font-weight: 700;
  text-decoration: underline;
}

.project-wrap p a:hover,
.project-wrap p a:focus-visible {
  color: var(--purple);
}

.mixcloud-embed {
  border-radius: 4px;
  overflow: hidden;
}

.mixcloud-embed iframe {
  display: block;
}

.mixes-subhead {
  color: var(--red);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
}

.mix-accordion {
  margin-top: 2rem;
}

.mix-row {
  border-top: 1px solid rgba(231, 64, 42, 0.3);
}

.mix-row:last-child {
  border-bottom: 1px solid rgba(231, 64, 42, 0.3);
}

.mix-row-header {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 0.25rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.mix-date {
  color: var(--red);
  opacity: 0.55;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.mix-title {
  color: var(--red);
  font-size: 1.05rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.mix-row-header:hover .mix-title,
.mix-row-header:focus-visible .mix-title {
  color: var(--white);
}

.mix-row.is-open .mix-row-header .mix-date,
.mix-row.is-open .mix-row-header .mix-title {
  color: var(--purple);
}

.mix-panel:empty {
  display: none;
}

.mix-panel .mixcloud-embed {
  margin: 0 0.25rem 1.25rem;
}
