/*
  Unspoken Illustrations portfolio
  First homepage prototype
*/

/* 01) Typography */
@font-face {
  font-family: 'Quicksand';
  src: url('/fonts/quicksand-variable.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

/* 02) Design tokens */
:root {
  /* Lucie's selected colour palette */
  --ink: #10151d;
  --sea-blue: #55b8d1;
  --soft-aqua: #bfe4e1;
  --warm-cream: #f7f2e8;
  --sunset-coral: #e98b69;
  --sea-pink: #d98fa0;
  --cat-eye-yellow: #f3c735;
  --deep-ocean: #176d8d;

  /* Typography */
  --font-primary: 'Quicksand', 'Trebuchet MS', Arial, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Layout */
  --content-width: 1180px;
  --page-gutter: clamp(1.1rem, 3vw, 2.25rem);
  --section-space: clamp(4.5rem, 8vw, 8rem);
  --small-radius: 0.8rem;
  --large-radius: 1.6rem;

  /* Theme roles */
  --colour-text: var(--ink);
  --colour-background: var(--warm-cream);
  --colour-link: var(--deep-ocean);
  --colour-link-hover: var(--sea-blue);
  --colour-accent: var(--sunset-coral);
}

/* 03) Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--colour-background);
  color: var(--colour-text);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-regular);
  line-height: 1.6;
}

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

figure,
p,
h1,
h2,
h3 {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: var(--font-weight-bold);
  line-height: 1.12;
}

a {
  color: var(--colour-link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--colour-link-hover);
}

/* Keep keyboard focus obvious across light and dark sections. */
:focus-visible {
  outline: 3px solid var(--cat-eye-yellow);
  outline-offset: 4px;
}

/* Respect visitors who have reduced motion enabled. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* 04) Shared layout */
.container {
  width: min(calc(100% - (2 * var(--page-gutter))), var(--content-width));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-space);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-heading h2,
.about-contact h2 {
  margin-bottom: 0.8rem;
  font-size: clamp(2rem, 5vw, 3.8rem);
}

.about-contact p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--deep-ocean);
  font-size: 0.78rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* 05) Skip link */
.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  transform: translateY(-180%);
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--warm-cream);
  font-weight: var(--font-weight-bold);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--warm-cream);
}

/* 06) Header */
.site-header {
  border-bottom: 1px solid rgba(16, 21, 29, 0.12);
  background: var(--warm-cream);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5.25rem;
}

.site-name {
  color: var(--ink);
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2rem);
}

.site-nav a {
  color: var(--ink);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--deep-ocean);
}

/* 07) Hero */
.hero {
  padding-top: clamp(2.25rem, 4vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(24rem, 1.25fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero__copy h1 {
  max-width: 11ch;
  margin-bottom: 0;
  font-size: clamp(3.2rem, 6.4vw, 6rem);
  letter-spacing: -0.045em;
}

.hero__art {
  overflow: hidden;
  margin: 0;
  border-radius: var(--large-radius);
}

.hero__art img {
  width: 100%;
  max-height: 32rem;
  height: auto;
  object-fit: contain;
}

/* 08) Portfolio gallery */
.portfolio-browser {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.portfolio-browser .section-heading {
  margin-bottom: 1.25rem;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.gallery-filter {
  padding: 0.65rem 0.95rem;
  border: 1px solid rgba(16, 21, 29, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}

.gallery-filter:hover,
.gallery-filter:focus-visible {
  background: #ffffff;
  color: var(--deep-ocean);
}

.gallery-filter[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--warm-cream);
}

/* Show only the small amount of context needed for the active project or work type. */
.project-context {
  margin: 0 0 clamp(1.5rem, 3vw, 2.25rem);
}

.project-context__title {
  margin-bottom: 0.15rem;
  font-weight: var(--font-weight-bold);
}

.project-context__description {
  margin-bottom: 0;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.8vw, 1.25rem);
}

.gallery-item {
  min-width: 0;
  margin: 0;
}

.gallery-item[hidden] {
  display: none;
}

/* Keep thumbnails compact and consistent while preserving the full artwork inside each frame. */
.gallery-open {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(16, 21, 29, 0.1);
  border-radius: var(--small-radius);
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.gallery-open:hover,
.gallery-open:focus-visible {
  border-color: var(--deep-ocean);
}

.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-open span {
  display: none;
}

/* Keep the enlarged artwork focused on the image rather than the surrounding interface. */
.gallery-dialog {
  width: min(94vw, 72rem);
  max-height: 92vh;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 0;
  border-radius: var(--large-radius);
  background: var(--warm-cream);
  color: var(--ink);
}

.gallery-dialog::backdrop {
  background: rgba(16, 21, 29, 0.82);
}

.gallery-close {
  display: block;
  margin: 0 0 1rem auto;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(16, 21, 29, 0.18);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}

.gallery-close:hover,
.gallery-close:focus-visible {
  color: var(--deep-ocean);
}

.gallery-dialog__media {
  display: grid;
  place-items: center;
}

.gallery-dialog__media img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  border-radius: var(--small-radius);
  object-fit: contain;
}

.gallery-dialog__caption {
  padding-top: 1rem;
}

.gallery-dialog__caption .eyebrow {
  margin-bottom: 0.35rem;
}

.gallery-dialog__caption h2 {
  margin-bottom: 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* 09) What I do and contact */

.about-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 6rem);
}

/* Keep the work types easy to scan and let linked items open matching gallery examples. */
.work-types-list {
  display: grid;
  gap: 0.7rem;
  margin: 1.4rem 0 0;
  padding-left: 1.25rem;
}

.work-types-list li {
  padding-left: 0.2rem;
}

.work-types-list a {
  color: var(--ink);
  font-weight: var(--font-weight-semibold);
}

.work-types-list a:hover,
.work-types-list a:focus-visible,
.work-types-list a[aria-current="true"] {
  color: var(--deep-ocean);
}

.contact-panel {
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: var(--large-radius);
  background: var(--cat-eye-yellow);
}

.contact-panel .eyebrow {
  color: var(--ink);
}

/* 10) Footer */
.site-footer {
  padding-block: 2rem;
  background: var(--ink);
  color: var(--warm-cream);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.site-footer p {
  margin: 0;
}

/* 11) Tablet */
@media (max-width: 1000px) {
  .portfolio-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .hero__copy h1 {
    max-width: 12ch;
  }

  .hero__art {
    max-width: 44rem;
  }

  .about-contact__grid {
    grid-template-columns: 1fr;
  }
}

/* 12) Mobile */
@media (max-width: 700px) {
  .site-header__inner {
    gap: 1rem;
    min-height: 4.25rem;
  }

  .site-name {
    font-size: 1.05rem;
  }

  .site-nav {
    flex-wrap: nowrap;
    gap: 1rem;
    margin-left: auto;
  }

  .hero {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }

  .hero__grid {
    gap: 1.5rem;
  }

  .hero__copy h1 {
    font-size: clamp(2.5rem, 12vw, 3.8rem);
  }

  .hero__art img {
    max-height: 20rem;
  }

  .gallery-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
  }

  .gallery-filter {
    flex: 0 0 auto;
  }

  .portfolio-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .gallery-open {
    padding: 0.35rem;
  }

  .site-footer__inner {
    flex-direction: column;
    gap: 0.4rem;
  }
}
