/* Riley Chen portfolio
   Palette: electric blue, warm white, coral. Edit the variables below to retune the whole site. */

:root {
  --blue: #183dc7;
  --paper: #f5f3ef;
  --coral: #fd7648;
  --ink: #15171f;
  --muted: #4b4f5c;
  --rule: rgba(24, 61, 199, 0.22);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --radius: 4px;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

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

a { color: inherit; text-underline-offset: 0.18em; }

h1, h2, h3 { margin: 0; }

/* Focus: always visible, high contrast against each background */
:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
.about :focus-visible { outline-color: var(--paper); }
.cta-tile :focus-visible { outline-color: var(--ink); }

.wrap {
  width: min(100% - 2 * var(--pad), var(--max));
  margin-inline: auto;
}

section[id] { scroll-margin-top: 1rem; }

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--blue);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; outline-color: var(--coral); }

/* Header */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--blue);
}

.nav-list {
  display: flex;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.15rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-list a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 2px solid var(--blue);
  border-radius: 999px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.btn--solid { background: var(--blue); color: var(--paper); }
.btn--solid:hover { background: var(--ink); border-color: var(--ink); }
.btn--line { color: var(--blue); }
.btn--line:hover { background: var(--blue); color: var(--paper); }
.btn--ink { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: transparent; color: var(--ink); }

/* Hero */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  grid-template-areas:
    "eyebrow art"
    "title   art"
    "lede    art"
    "actions art";
  column-gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}

.eyebrow {
  grid-area: eyebrow;
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.br-phone { display: none; }

.hero-title {
  grid-area: title;
  font-size: clamp(3rem, 8.4vw, 7.75rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.045em;
  color: var(--blue);
}
.hero-title .line { display: block; }
.hero-title .dot { color: var(--coral); }

.lede {
  grid-area: lede;
  max-width: 34rem;
  margin: 1.75rem 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.5;
}

.actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0 0;
}

.hero-art {
  grid-area: art;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 24rem;
}

/* Dieline graphic */
.dieline { display: block; width: 100%; height: auto; overflow: visible; }
.dieline .cut { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linejoin: round; }
.dieline .fold { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 5 5; }
.dieline .panel-front { fill: var(--blue); }
.dieline .label-line { fill: var(--paper); }
.dieline .label-line--thin { opacity: 0.7; }
.dieline .barcode rect { fill: var(--blue); }
.dieline .seal-disc { fill: var(--coral); }
.dieline .seal-ring { fill: none; stroke: var(--paper); stroke-width: 2; stroke-dasharray: 3 4; }

@media (prefers-reduced-motion: no-preference) {
  .dieline .cut {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: draw 1.6s cubic-bezier(.6, .1, .3, 1) 0.15s forwards;
  }
  .dieline .seal {
    transform-box: fill-box;
    transform-origin: center;
    animation: stamp 0.55s cubic-bezier(.2, 1.4, .4, 1) 1.45s both;
  }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes stamp {
  from { transform: scale(1.6) rotate(-25deg); opacity: 0; }
  to   { transform: scale(1) rotate(0); opacity: 1; }
}

/* Section headings */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.25rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 3px solid var(--blue);
}
.section-head h2,
.about h2,
.contact h2 {
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
}
.section-head h2 { color: var(--blue); }
.section-note { margin: 0; color: var(--muted); font-weight: 600; }

/* Work grid: two columns on wider screens, one on phones */
.work { padding-bottom: clamp(3.5rem, 8vw, 6.5rem); }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
}

.card { display: flex; flex-direction: column; }

.frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e7e1d8;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card--ceramics .frame img { object-position: 50% 60%; }
.card--coffee   .frame img { object-position: 50% 50%; }
.card--alpine   .frame img { object-position: 50% 12%; }

.photo-credit {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  margin: 0;
  padding: 0.25rem 0.55rem;
  border-radius: 2px;
  background: rgba(21, 23, 31, 0.78);
  color: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-body { padding-top: 1.1rem; }
.card-body p { margin: 0.5rem 0 0; max-width: 34rem; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.card-body .card-meta { margin: 0 0 0.4rem; }
.num {
  display: inline-grid;
  place-items: center;
  min-width: 2.1rem;
  height: 1.6rem;
  padding-inline: 0.35rem;
  border-radius: 999px;
  background: var(--blue);
  color: var(--paper);
  letter-spacing: 0.02em;
}
.card h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.card-body .card-aside { font-size: 0.9rem; color: var(--muted); }

.cta-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  border-radius: var(--radius);
  background: var(--coral);
  color: var(--ink);
}
.cta-tile h3 {
  font-size: clamp(1.75rem, 3.6vw, 3rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 14ch;
}
.cta-tile p { margin: 1rem 0 0; font-size: 1.1rem; font-weight: 600; max-width: 24rem; }

/* About (blue band) */
.about {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  background: var(--blue);
  color: var(--paper);
}
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem clamp(1.5rem, 4vw, 4rem);
}
.about-copy { max-width: 42rem; }
.about-copy p { margin: 0 0 1rem; font-size: 1.15rem; }
.about-copy .about-lede {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.about h3 {
  margin-top: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.4rem 0.9rem;
  border: 1.5px solid rgba(245, 243, 239, 0.7);
  border-radius: 999px;
  font-weight: 600;
}

/* Contact */
.contact { padding-block: clamp(3.5rem, 8vw, 6rem); }
.contact h2 { color: var(--blue); }
.contact-mail {
  margin: 1.25rem 0 0;
  font-size: clamp(1.25rem, 6.4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.contact-mail a {
  padding-block: 0.15em;
  color: var(--ink);
  text-decoration-color: var(--coral);
  text-decoration-thickness: 0.12em;
}
.contact-mail a:hover { color: var(--blue); }
.contact-place { margin: 1rem 0 0; color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer-inner p { margin: 0; }
.footer-inner a { display: inline-block; padding-block: 0.35rem; }

/* Tablet and down: hero graphic sits beside the small eyebrow, heading takes full width */
@media (max-width: 48em) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "eyebrow art"
      "title   title"
      "lede    lede"
      "actions actions";
    align-items: end;
  }
  .hero-art { width: clamp(6.5rem, 28vw, 10rem); justify-self: end; align-self: end; margin-bottom: 1.25rem; }
  .eyebrow { align-self: end; }
  .br-phone { display: inline; }
  .eyebrow .sep { display: none; }
  .hero-title { font-size: clamp(2.6rem, 17vw, 8rem); }

  .about-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Phones: one column, each image cropped to suit its subject */
@media (max-width: 40em) {
  .work-grid { grid-template-columns: minmax(0, 1fr); }
  .eyebrow { margin-bottom: 1rem; font-size: 0.95rem; font-weight: 500; letter-spacing: 0; text-transform: none; line-height: 1.35; }
  .eyebrow-name { font-weight: 800; color: var(--ink); }
  .card--ceramics .frame { aspect-ratio: 7 / 5; }
  .card--coffee   .frame { aspect-ratio: 1 / 1; }
  .card--alpine   .frame { aspect-ratio: 4 / 5; }
  .card--alpine   .frame img { object-position: 50% 20%; }
  .cta-tile h3 { max-width: none; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 22.5em) {
  body { font-size: 1rem; }
  .nav-list { gap: 0.7rem; }
  .nav-list a { font-size: 0.95rem; }
  .hero-title { letter-spacing: -0.04em; }
  .actions .btn { flex: 1 1 100%; }
}
