/* ============================================================
   FONTS
   ============================================================ */

/*
 * FuturaLTPro-Bold & FuturaLTPro-Medium — licensed via MyFonts (build 3131335)
 * Place the .woff2 and .woff files from your MyFonts kit in the fonts/ folder.
 */
@font-face {
  font-family: 'Futura';
  src: url('fonts/2FC7C7_0_0.woff2') format('woff2'),
       url('fonts/2FC7C7_0_0.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Futura';
  src: url('fonts/2FC7C7_1_0.woff2') format('woff2'),
       url('fonts/2FC7C7_1_0.woff') format('woff');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   TOKENS
   ============================================================ */

:root {
  --color-bg:           #faf7f5;
  --color-bg-hover:     #ede9e6;
  --color-text:         #2a1b0e;
  --color-text-muted:   #573e29;
  --color-accent:       #bb3200;
  --color-accent-dark:  #8c2500;
  --color-accent-light: #f5d8ca;
  --color-border:       #d9c0ab;
  --color-white:        #ffffff;

  --font-display: 'Futura', sans-serif;
  --font-body:    'Google Sans Code', monospace;
  --font-cursive: 'Cedarville Cursive', cursive;

  --shadow: 0px 4px 6px -1px rgba(0,0,0,0.07),
            0px 2px 4px -2px rgba(0,0,0,0.07);
}

/* ============================================================
   RESET
   ============================================================ */

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

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

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

/* ============================================================
   BASE
   ============================================================ */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   PAGE SHELL
   ============================================================ */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 48px 80px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.site-nav {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  font-size: 14px;
  white-space: nowrap;
}

.site-nav a {
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.site-nav a:hover {
  border-bottom-color: currentColor;
}

.site-nav a[aria-current="page"] {
  text-decoration: none;
  border-bottom-color: var(--color-accent);
}


/* ============================================================
   HERO — desktop: 2-column grid; tablet/mobile: single column
   ============================================================ */

/*
  DOM order: nav · h1 · figure.hero__photo · div.hero__bio
  On desktop, CSS Grid repositions photo to the left column.
  On tablet/mobile, the natural order is exactly right.
*/
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "photo nav"
    "photo name"
    "photo bio";
  column-gap: 60px;
  row-gap: 48px;
  align-items: start;
}

.hero .site-nav   { grid-area: nav; }
.hero h1          { grid-area: name; }
.hero__photo      { grid-area: photo; align-self: center; max-width: 522px; }
.hero__bio        { grid-area: bio; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  line-height: normal;
  color: var(--color-accent);
}

.hero__bio {
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: var(--color-text-muted);
  max-width: 600px;
}

/* ============================================================
   PHOTO FRAME  (polaroid-style)
   ============================================================ */

.photo-frame {
  border: 12px solid var(--color-white);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--color-accent-light);
  aspect-ratio: 1 / 1;
  width: 100%;
}

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

.photo-frame--tilt-right { transform: rotate( 1deg); }
.photo-frame--tilt-left  { transform: rotate(-1deg); }

.hero__photo .photo-frame { border-width: 16px; }

/* ============================================================
   TYPOGRAPHY UTILITIES
   ============================================================ */

.tagline {
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  line-height: 1.25;
}

.body-text {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  line-height: 1.5;
}

.body-text p + p { margin-top: 1em; }

/* First paragraph uses medium weight */
.body-text p:first-child { font-weight: 500; }

.signature {
  font-family: var(--font-cursive);
  font-size: 32px;
  line-height: 1.5;
  margin-top: 1em;
  font-style: normal;
  font-weight: 400;
}

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  line-height: normal;
  color: var(--color-accent);
}

.cursive {
  font-family: var(--font-cursive);
  font-style: normal;
}

.text-link,
.body-text a,
.project-body a,
.hero__bio a,
.product-section__description a,
.project-header__meta a {
  color: var(--color-accent);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.text-link:hover,
.body-text a:hover,
.project-body a:hover,
.hero__bio a:hover,
.product-section__description a:hover,
.project-header__meta a:hover {
  color: var(--color-accent-dark);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  padding: 0 16px;
  height: 36px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  color: var(--color-text);
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
}

.button--sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.button:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* ============================================================
   PRODUCT SECTION
   ============================================================ */

.product-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.product-section__image {
  max-width: 522px;
}

.mockup-frame {
  border: 12px solid var(--color-white);
  box-shadow: var(--shadow);
  background: var(--color-accent-light);
  overflow: hidden;
  transform: rotate(-1deg);
}

.mockup-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

/* Empty mockup placeholder when no image is present */
.mockup-frame:not(:has(img)),
.mockup-frame img[src=""] {
  aspect-ratio: 8 / 5;
}

.product-section__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
}

.product-section__description {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--color-text-muted);
}

.product-section__description .tagline {
  font-size: 16px;
}

.body-emphasis {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   GALLERY SECTION
   ============================================================ */

.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.gallery-section__header {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.gallery-section__header .tagline {
  font-size: 16px;
  color: var(--color-text-muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.gallery-card__image {
  width: 100%;
}

.gallery-card__info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: center;
  color: var(--color-text-muted);
}

.gallery-card__title {
  font-style: italic;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.25;
}

.gallery-card__type {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
}

/* ============================================================
   PROJECT PAGE
   ============================================================ */

.project-page {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.project-nav {
  display: flex;
  justify-content: flex-end;
}

.project-header {
  max-width: 600px;
}

.project-header h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  line-height: normal;
  color: var(--color-accent);
  margin-bottom: 48px;
}

.project-header__details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--color-text-muted);
}

.project-header__description {
  font-style: italic;
  font-weight: 300;
  font-size: 20px;
  line-height: 1.5;
}

.project-header__meta {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.project-header__meta strong {
  font-weight: 500;
}

.project-image {
  max-width: 808px;
}

.project-image .mockup-frame {
  transform: none;
}

.project-page > .project-image .mockup-frame {
  transform: rotate(-1deg);
}

.project-image .mockup-frame img {
  aspect-ratio: auto;
  object-fit: initial;
  height: auto;
}

.project-body {
  max-width: 600px;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 1em;
  font-size: 14px;
  line-height: 1.5;
}

.project-body h2,
.project-body h3 {
  margin-top: 1.5em;
}

.project-body :first-child {
  margin-top: 0;
}

.back-button {
  position: fixed;
  bottom: 24px;
  right: 48px;
  background: var(--color-bg);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.back-button:hover {
  background: var(--color-bg-hover);
}

.back-button svg {
  flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE — 1024px (tablet)
   ============================================================ */

@media (max-width: 1024px) {
  .page {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Hero: collapse to single column */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero .site-nav { justify-content: center; }
  .hero h1        { text-align: center; }
  .hero__bio      { margin-left: auto; margin-right: auto; }

  /* Product: stack, center blocks, left-align text */
  .product-section {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .product-section__image {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .product-section__content {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  .product-section__content .section-heading {
    width: 100%;
    text-align: center;
  }

  .product-section__content .button {
    align-self: center;
  }

  /* Gallery header */
  .gallery-section__header .section-heading {
    width: 100%;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .gallery-section__header .tagline {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Project page nav: center */
  .project-nav { justify-content: center; }

  .back-button { right: 24px; }
}

/* ============================================================
   RESPONSIVE — 920px
   ============================================================ */

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

/* ============================================================
   RESPONSIVE — 560px
   ============================================================ */

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: 1fr;
    row-gap: 48px;
  }
}

/* ============================================================
   RESPONSIVE — 471px (mobile)
   ============================================================ */

@media (max-width: 471px) {
  .page {
    padding-left: 16px;
    padding-right: 16px;
  }

  .back-button { right: 16px; }

  .hero h1 {
    font-size: 36px;
  }

  .project-header h1 {
    font-size: 36px;
  }
}
