/* isabellecastillo.com
   The logo and the artwork carry the color. Everything else stays quiet. */

:root {
  --bg: #FFFFFF;
  --ink: #16202A;
  --muted: #66717B;
  --line: #E4E7EA;
  --mat: #FFFFFF;          /* flat artwork always sits on white, as designed */
  --mat-edge: #E4E7EA;
  --gutter: 20px;
  --max: 1280px;
  --space: 64px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12181D;
  --ink: #E9ECEE;
  --muted: #9AA4AC;
  --line: #2A333A;
  --mat-edge: transparent;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12181D;
    --ink: #E9ECEE;
    --muted: #9AA4AC;
    --line: #2A333A;
    --mat-edge: transparent;
    color-scheme: dark;
  }
}
@media (min-width: 720px)  { :root { --gutter: 40px; --space: 96px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; --space: 128px; } }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  text-wrap: pretty;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 "DM Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.wrap {
  width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.skip { position: absolute; left: 8px; top: -48px; padding: 8px 12px; background: var(--ink); color: var(--bg); z-index: 10; }
.skip:focus { top: 8px; }

/* ---------------------------------------------------------------- header */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.logo { display: block; }
.logo img { height: 24px; width: auto; }
.bar-end { display: flex; align-items: center; gap: 28px; }
.site-header nav { display: flex; align-items: center; gap: 20px; font-size: 15px; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); }
.theme {
  display: grid; place-items: center; width: 36px; height: 36px; margin-right: -8px;
  color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer;
}
.theme:hover { color: var(--ink); }
.theme svg { display: block; }
.theme .icon-sun { display: none; }
:root[data-theme="dark"] .theme .icon-moon { display: none; }
:root[data-theme="dark"] .theme .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme .icon-sun { display: block; }
}
@media (min-width: 720px) {
  .bar { height: 96px; }
  .logo img { height: 30px; }
  .site-header nav { gap: 32px; }
  .bar-end { gap: 40px; }
}

/* ---------------------------------------------------------------- home */
.intro { padding-top: 40px; padding-bottom: var(--space); }
.intro p {
  margin: 0; max-width: 26ch;
  font-size: clamp(22px, 2.6vw, 32px); line-height: 1.3; letter-spacing: -0.012em; text-wrap: pretty;
}
@media (min-width: 720px) { .intro { padding-top: 64px; } }

.work { display: grid; gap: 48px; padding-bottom: var(--space); }
@media (min-width: 720px) { .work { gap: var(--space); } }
.trio { display: grid; gap: 48px; }
@media (min-width: 720px) {
  .trio { grid-template-columns: repeat(3, 1fr); column-gap: var(--gutter); align-items: end; }
}
.card a { display: block; text-decoration: none; }
.card img { width: 100%; }
.cover-mat {
  display: block; position: relative; aspect-ratio: 1 / 1;
  background: var(--mat); box-shadow: inset 0 0 0 1px var(--mat-edge);
}
.cover-mat img { position: absolute; inset: 8%; width: 84%; height: 84%; object-fit: contain; }
.card-title { display: block; margin-top: 14px; font-weight: 500; }
.card-kind { display: block; color: var(--muted); font-size: 15px; }
.card a:hover .card-title { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- project */
.project { padding-top: 40px; }
.project-head { display: grid; gap: 16px; padding-bottom: 48px; }
.project-head h1 {
  margin: 0; font-weight: 500; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.025em;
}
.project-text p { margin: 0; max-width: 54ch; font-size: 17px; }
.project-text .kind { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
@media (min-width: 900px) {
  .project { padding-top: 64px; }
  .project-head { grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding-bottom: 80px; }
  .project-head h1 { grid-column: 1 / span 5; }
  .project-text { grid-column: 7 / span 6; padding-top: 6px; }
}

.gallery { display: grid; gap: 16px; }
@media (min-width: 720px) { .gallery { gap: 24px; } }
.gallery .full img { width: 100%; }
.gallery .mat {
  display: flex; justify-content: center;
  background: var(--mat); box-shadow: inset 0 0 0 1px var(--mat-edge);
  padding: clamp(32px, 7vw, 96px) clamp(20px, 6vw, 96px);
}
.gallery .mat > div { width: 100%; }
.gallery .mat img { width: 100%; }

.next {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 32px;
  margin-top: var(--space); padding: 32px 0 var(--space); border-top: 1px solid var(--line);
}
.next a { text-decoration: none; }
.next span { display: block; color: var(--muted); font-size: 15px; }
.next strong { display: block; font-weight: 500; font-size: clamp(24px, 3vw, 36px); letter-spacing: -0.02em; line-height: 1.2; }
.next a:hover strong { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.next .all { color: var(--muted); font-size: 15px; }
.next .all:hover { color: var(--ink); }

/* ---------------------------------------------------------------- about */
.about { display: grid; gap: 40px; padding-top: 40px; padding-bottom: var(--space); }
.about-text h1 { margin: 0 0 24px; font-weight: 500; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
.about-text p { margin: 0 0 16px; max-width: 48ch; font-size: 17px; }
.about-text h2 { margin: 48px 0 8px; font-weight: 500; font-size: 15px; color: var(--muted); }
.elsewhere { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 8px; }
@media (min-width: 900px) {
  .about { grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); padding-top: 64px; }
  .about figure { grid-column: 1 / span 5; }
  .about-text { grid-column: 7 / span 6; }
}

/* ---------------------------------------------------------------- 404 */
.missing { padding-top: 64px; padding-bottom: var(--space); }
.missing h1 { margin: 0 0 12px; font-weight: 500; font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); }
.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px;
  padding-top: 32px; padding-bottom: max(40px, env(safe-area-inset-bottom)); font-size: 15px;
}
.foot .mail { text-decoration: none; }
.foot .mail:hover { text-decoration: underline; }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot ul a { text-decoration: none; color: var(--muted); }
.foot ul a:hover { color: var(--ink); }
