:root {
  color-scheme: light;
  --paper: #fcf6eb;
  --ink: #172044;
  --muted: #4a5573;
  --blue: #1c37ca;
  --blue-deep: #14299f;
  --pink: #ffb6ce;
  --orange: #ff9a54;
  --radius: 1.5rem;
  --tap: 2.85rem;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 1rem; line-height: 1.46; }
h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
[id] { scroll-margin-block: 1.25rem; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.frame { width: min(100% - clamp(1.75rem, 6vw, 6rem), 73rem); margin-inline: auto; }
.skip-link {
  position: fixed;
  inset: .6rem auto auto 1rem;
  z-index: 3;
  padding: .65rem 1rem;
  transform: translateY(-180%);
  background: var(--paper);
  border-radius: .6rem;
}
.skip-link:focus { transform: none; }

.site-header {
  min-height: 4.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.brand {
  position: relative;
  display: block;
  width: 7.4rem;
  height: 3.65rem;
  overflow: hidden;
  border-radius: .5rem;
}
.brand img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7.4rem;
  height: auto;
  transform: translate(-50%, -50%);
}
.header-link {
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  font-weight: 720;
  color: var(--blue-deep);
  text-underline-offset: .26em;
}
.header-link:hover, .site-footer a:hover { color: var(--blue); text-decoration-thickness: .13em; }

.hero {
  display: grid;
  gap: 1.15rem;
  align-items: center;
  padding: clamp(1.4rem, 4vw, 2.75rem);
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--paper);
}
.hero h1 {
  font-size: clamp(2.42rem, 10.6vw, 3.5rem);
  font-weight: 820;
  line-height: .96;
  letter-spacing: -.058em;
}
.hero h1 span { display: block; color: var(--pink); }
.hero-intro {
  max-width: 28rem;
  margin-top: .9rem;
  font-size: clamp(1rem, 2.2vw, 1.24rem);
  line-height: 1.42;
}
.instruction {
  min-width: 0;
  padding-top: 1rem;
  border-top: 1px solid #fff6;
}
.instruction p { max-width: 23rem; font-size: 1rem; }
.instruction p strong { color: var(--pink); }
.instruction:target { outline: 2px solid #fff9; outline-offset: .35rem; border-radius: .4rem; }
.hero :focus-visible { outline-color: var(--paper); }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .67rem;
  min-height: var(--tap);
  padding: .65rem .95rem;
  border: 1px solid transparent;
  border-radius: .82rem;
  font-weight: 750;
  line-height: 1.19;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.button-blue { background: var(--blue-deep); color: var(--paper); }
.button-blue:hover { background: #0e1e83; }

.social-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .38rem;
  margin-top: .8rem;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: .6rem .17rem;
  text-align: center;
  border-radius: .78rem;
  background: var(--orange);
  color: var(--ink);
  font-size: clamp(.875rem, 3.6vw, 1rem);
  font-weight: 730;
  text-decoration: none;
}
.social-link[href]:hover, .social-link[href]:focus-visible { background: #ffb17a; }
.social-link[aria-disabled="true"] { cursor: default; }
.instruction .contact-status { margin-top: .55rem; color: #f2ecff; font-size: .88rem; }

.portfolio { padding-block: clamp(1.75rem, 4vw, 3rem) clamp(2.8rem, 7vw, 5rem); }
.section-title {
  font-size: clamp(2.15rem, 9.25vw, 4.35rem);
  line-height: .99;
  font-weight: 820;
  letter-spacing: -.058em;
  text-wrap: balance;
}
.portfolio .section-title { color: var(--blue-deep); }
.portfolio .section-title span { display: block; }
.portfolio-grid {
  display: grid;
  gap: .8rem;
  margin-top: clamp(1.15rem, 3.4vw, 2.1rem);
}
.project {
  display: grid;
  grid-template-columns: minmax(0, .77fr) minmax(0, 1.23fr);
  align-items: stretch;
  height: 100%;
  overflow: hidden;
  border-radius: 1.1rem;
  background: var(--tile);
  text-decoration: none;
}
.project-blue { --tile: #dce5ff; --mat: #c8d6ff; }
.project-orange { --tile: #ffe4ce; --mat: #ffbc8f; }
.project-pink { --tile: #ffdae7; --mat: #ffc0d5; }
.project-lilac { --tile: #e8e5ff; --mat: #d6cbff; }
.project-peach { --tile: #ffe1d3; --mat: #ffc5a4; }
.project-media {
  display: grid;
  place-items: center;
  background: var(--mat);
  padding: .5rem;
}
.project-media > img {
  width: 100%;
  height: auto;
  max-height: 12.5rem;
  border-radius: .5rem;
  object-fit: contain;
}
.project-photo-detail {
  position: relative;
  width: min(100%, 14rem);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: .5rem;
}
.project-photo-detail > img {
  position: absolute;
  /* Frame the tree emblem and the lettering on the side of the keychain. */
  top: -25%;
  left: -85%;
  width: 200%;
  max-width: none;
  height: auto;
}
.project-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(.8rem, 3.65vw, 1.4rem);
}
.project h3 {
  font-size: clamp(1.06rem, 5vw, 1.52rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.038em;
  overflow-wrap: break-word;
}
.project-copy p { margin-top: .45rem; line-height: 1.32; }
.project-link {
  margin-top: .65rem;
  color: var(--blue-deep);
  font-size: .94rem;
  font-weight: 720;
  text-decoration: underline;
  text-underline-offset: .23em;
}
.project:hover .project-link, .project:focus-visible .project-link { text-decoration-thickness: .13em; }

.production {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--orange);
}
.production-copy { padding: clamp(1.45rem, 5vw, 3.45rem); }
.production .section-title { font-size: clamp(2rem, 8.6vw, 3.85rem); text-wrap: initial; }
.production-copy p { max-width: 26rem; margin-top: .9rem; font-size: 1.03rem; }
.production-copy .button { margin-top: 1.15rem; }
.production-photo {
  display: grid;
  place-items: center;
  padding: .85rem;
  background: #ffc399;
}
.production-photo img {
  width: min(100%, 12.25rem);
  height: auto;
  border-radius: .85rem;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  min-height: 5.8rem;
  padding-block: 1rem;
  color: var(--blue-deep);
  font-size: .91rem;
  font-weight: 720;
}
.site-footer a { padding-block: .6rem; text-underline-offset: .24em; }

body:has(.gallery[open]) { overflow: hidden; }
.gallery {
  border: 0;
  border-radius: 1.15rem;
  color: var(--ink);
  background: var(--paper);
  padding: 0;
  width: min(100% - 1.25rem, 39rem);
  max-height: calc(100dvh - 1.25rem);
  overflow: auto;
}
.gallery::backdrop { background: #131b4dcc; }
.gallery-panel { padding: clamp(.75rem, 2.6vw, 1.2rem); }
.gallery-header { display: flex; justify-content: space-between; align-items: center; gap: .55rem; margin-bottom: .65rem; }
.gallery-header h2 { font-size: clamp(1.04rem, 4.3vw, 1.38rem); line-height: 1.16; }
.gallery-close, .gallery-step {
  min-height: var(--tap);
  border: 1px solid #aeb9ea;
  border-radius: .7rem;
  background: #edf0ff;
  color: var(--blue-deep);
  cursor: pointer;
}
.gallery-close {
  flex: 0 0 var(--tap);
  padding: 0;
  font-size: 1.7rem;
  line-height: 1;
}
.gallery-step { padding: .45rem .88rem; font-weight: 720; }
.gallery-close:hover, .gallery-step:hover { background: #dce4ff; }
.gallery figure img {
  width: 100%;
  height: min(59dvh, 34rem);
  object-fit: contain;
  border-radius: .75rem;
  background: #ebe8e3;
}
.gallery figcaption { margin-top: .55rem; color: var(--muted); }
.gallery-nav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .7rem; }
.gallery-nav span { font-variant-numeric: tabular-nums; color: var(--muted); }

@media (min-width: 43rem) {
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .project h3 { font-size: clamp(1.12rem, 2.5vw, 1.5rem); }
  .production { grid-template-columns: minmax(0, 1.24fr) minmax(0, .76fr); }
  .production-copy { align-self: center; }
  .production-photo img { width: min(100%, 14.5rem); }
}

@media (min-width: 51rem) {
  :root { --radius: 1.7rem; }
  .site-header { min-height: 5.2rem; }
  .hero { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(1.5rem, 4vw, 3.75rem); }
  .hero h1 { font-size: clamp(3rem, 5.35vw, 4.65rem); }
  .hero-intro { margin-top: 1.05rem; }
  .instruction { padding: .25rem 0 .25rem clamp(1.35rem, 3.8vw, 2.75rem); border-top: 0; border-left: 1px solid #fff6; }
  .social-links { gap: .8rem; }
  .social-link { min-height: 3.2rem; }
  .portfolio .section-title span { display: inline; }
  .portfolio-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .project-item { grid-column: span 2; }
  .project-item:nth-child(-n+2) { grid-column: span 3; }
  .project { grid-template-columns: 1fr; }
  .project-media { position: relative; height: clamp(13.5rem, 21vw, 17rem); }
  .project-media > img {
    position: absolute;
    inset: .7rem;
    width: calc(100% - 1.4rem);
    height: calc(100% - 1.4rem);
    max-height: none;
  }
  .project-copy { justify-content: flex-start; }
  .project-link { margin-top: .85rem; }
  .project-featured .project { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
  .project-featured .project-media { height: auto; min-height: 17rem; }
  .project-featured .project-copy { justify-content: center; }
  .production-copy p { margin-top: 1.2rem; }
}

@media (max-width: 23rem) {
  .hero { padding-inline: 1.05rem; }
  .project-media { padding: .35rem; }
}

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