@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Inter:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --surface: #fefefe;
  --bio-surface: #f7f7f7;
  --ink: #0e0e0e;
  --outline: #e5e5e5;
  --button-top: #fff;
  --button-bottom: #f7f7f7;
  --u: clamp(.70px, .0694444vw, 1.2px);
  --scale: 1;
  --gutter: calc(40 * var(--u));
  --header: calc(100 * var(--u));
  --card: calc(266.667 * var(--u));
  --card-gap: 8px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0e0e0e;
  --bio-surface: #0e0e0e;
  --ink: #fefefe;
  --outline: #1a1a1a;
  --button-top: #151515;
  --button-bottom: #0e0e0e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 600 1rem/1.3 Inter, Arial, sans-serif; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
:focus { outline: none; }
.keyboard-nav :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.header { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; height: var(--header); padding-inline: var(--gutter); }
.wordmark, .header-actions button { display: grid; place-items: center; }
.wordmark img { height: 16px; width: auto; }
[data-theme="dark"] .wordmark img { filter: brightness(0) invert(1); }
.header-actions img { zoom: var(--scale); }
#theme-toggle { width: calc(28px * var(--scale)); height: calc(28px * var(--scale)); }
:root[data-theme="light"] .sun-icon,
:root[data-theme="dark"] .moon-icon { display: none; }
.header-actions { display: flex; gap: calc(28 * var(--u)); }
.header-actions button { position: relative; }
.menu-icon { zoom: var(--scale); }
.menu-icon path { transition: d 180ms cubic-bezier(.2,.75,.25,1), opacity 120ms ease; }
#bio-toggle[aria-expanded="true"] path:nth-child(1) { d: path("M18 6L6 18"); }
#bio-toggle[aria-expanded="true"] path:nth-child(2) { d: path("M18 18L6 6"); }
#bio-toggle[aria-expanded="true"] path:nth-child(3) { d: path("M12 12L12 12"); opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .menu-icon path { transition: none; }
}
.header-actions button::after { content: ""; position: absolute; inset: -8px; }
.gallery { position: relative; display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); height: 100svh; min-height: 350px; overflow: hidden; }
.carousel { position: relative; isolation: isolate; width: 100%; min-width: 0; }
.track { overflow-x: auto; scrollbar-width: none; overscroll-behavior-inline: contain; }
.track::-webkit-scrollbar { display: none; }
.keyboard-nav .track:focus-visible { outline-offset: -2px; }
.photos { display: flex; width: max-content; gap: var(--card-gap); }
.photo { flex: 0 0 var(--card); width: var(--card); aspect-ratio: 2/3; }
.photo img, .bio-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.keyboard-nav .photo:focus-visible { outline-offset: -4px; }
.curve {
  position: absolute; z-index: 1; left: 50%; pointer-events: none;
  width: 2100px; height: 300px; zoom: var(--scale); translate: -50% 0;
  background: var(--surface);
  mask: url("assets/light-imgVector1.svg") center / contain no-repeat;
}
.curve-top { bottom: calc(50% + 150px); }
.curve-bottom { top: calc(50% + 150px); transform: scaleY(-1); }
.contact { position: absolute; bottom: calc(24 * var(--u)); display: flex; justify-content: center; gap: calc(8 * var(--u)); padding-inline: 12px; }
.contact a, .primary {
  display: inline-flex; align-items: center; justify-content: center;
  color: inherit; text-decoration: none; white-space: nowrap; border-radius: 8px;
}
.contact a {
  min-height: calc(32 * var(--u)); padding: 4px calc(10 * var(--u));
  font-size: 14px; font-weight: 500; border: 1px solid var(--outline);
  background: linear-gradient(var(--button-top), var(--button-bottom));
}
a.primary { color: var(--surface); background: var(--ink); border-color: var(--ink); }
.contact a:hover, .primary:hover { opacity: .78; }
.bio { min-height: 100svh; display: grid; align-items: center; padding: var(--header) var(--gutter); background: var(--bio-surface); }
.bio-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 60px; align-items: start; }
.bio-copy { grid-column: 2; grid-row: 1; }
.bio-photo { grid-column: 3; grid-row: 1; }
.bio h1 { margin: 0; font: 400 calc(100 * var(--u))/1 "Abril Fatface", Georgia, serif; text-box: trim-both cap alphabetic; }
.bio-copy p { margin: 0 0 1.3em; }
.bio-copy p:last-of-type { margin-bottom: calc(34 * var(--u)); }
.bio-copy .primary { min-height: 44px; padding: 10px 12px; font-size: 18px; font-weight: 500; }
.bio-photo { aspect-ratio: 4/5; height: auto; }
@media (prefers-reduced-motion: no-preference) {
  .bio:not([hidden]) {
    --bio-entry-ease: cubic-bezier(.22, 1, .36, 1);
  }
  .bio:not([hidden]) h1 {
    --bio-entry-offset: 24px;
    animation: bio-rise 600ms var(--bio-entry-ease) both;
  }
  .bio:not([hidden]) .bio-copy {
    --bio-entry-offset: 18px;
    animation: bio-rise 600ms var(--bio-entry-ease) 620ms both;
  }
  .bio:not([hidden]) .bio-photo {
    animation: bio-curtain 1000ms var(--bio-entry-ease) 1260ms both;
  }
}
@keyframes bio-rise {
  from { opacity: 0; transform: translateY(var(--bio-entry-offset)); }
  to { opacity: 1; transform: none; }
}
@keyframes bio-curtain {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0); }
}
#preview { width: 100%; height: 100%; max-width: none; max-height: none; padding: 0; border: 0; margin: 0; background: transparent; }
#preview[open] { display: grid; place-items: center; }
dialog::backdrop { background: #0008; backdrop-filter: blur(8px); }
.preview-photo { aspect-ratio: 2/3; width: min(calc(450 * var(--u)), 90vw, 50svh); object-fit: cover; }
.preview-controls { position: absolute; bottom: calc(32 * var(--u)); display: flex; gap: 4px; color: #fefefe; font-size: calc(14 * var(--u)); font-weight: 400; }
.pill { display: flex; align-items: center; gap: calc(6 * var(--u)); padding: 3px; background: #1a1a1a; border: 1px solid #212121; border-radius: 40px; box-shadow: 0 4px 8px #0005; }
.pill button, button.pill { display: grid; place-items: center; border-radius: 50%; width: calc(34 * var(--u)); height: calc(34 * var(--u)); }
button.pill { width: calc(42 * var(--u)); height: calc(42 * var(--u)); }
.pill button:hover, .keyboard-nav .pill button:focus-visible { background: #292929; }
.pill img { zoom: var(--scale); }
.pill output { min-width: calc(56 * var(--u)); text-align: center; }
@media (max-width: 760px), (max-width: 950px) and (max-height: 500px) {
  :root {
    --gutter: 16px;
    --header: 80px;
    --card: 173.333px;
    --inset-top: env(safe-area-inset-top, 0px);
    --inset-bottom: env(safe-area-inset-bottom, 0px);
  }
  .header {
    position: fixed;
    background: var(--surface);
    height: calc(var(--header) + var(--inset-top));
    padding-top: var(--inset-top);
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(6px, env(safe-area-inset-right, 0px));
  }
  .wordmark img { height: 14px; }
  .header-actions { gap: 4px; }
  .header-actions button, #theme-toggle { width: 44px; height: 44px; }
  .header-actions button::after { content: none; }
  .header-actions img { zoom: .857; }
  .menu-icon { zoom: 1; }
  .curve {
    width: 1000px; height: 320px; zoom: 1;
    mask-image: url("assets/mobile-imgVector1.svg");
  }
  .curve-top { bottom: calc(100% - 25px); }
  .curve-bottom { top: calc(100% - 25px); }
  .contact {
    bottom: calc(24px + var(--inset-bottom));
    width: min(calc(100% - 2 * var(--gutter)), 358px);
    gap: 8px;
    padding: 0;
  }
  .contact .primary { flex: 1; }
  .gallery { min-height: 100svh; }
  .contact a, .bio-copy .primary { min-height: 38px; padding-block: 0; }
  .contact a { padding-inline: 9px; }
  .bio {
    align-items: start;
    background: var(--surface);
    padding-block: calc(120px + var(--inset-top)) calc(120px + var(--inset-bottom));
  }
  .bio-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 60px;
    width: min(100%, 480px);
    margin-inline: auto;
  }
  .bio h1 { font-size: 60px; }
  .bio-photo, .bio-copy { grid-area: auto; }
  .bio-copy p:last-of-type { margin-bottom: 40px; }
  .preview-photo { width: min(266.667px, 88vw, 48svh); }
  .preview-controls { bottom: calc(40px + var(--inset-bottom)); font-size: .875rem; }
  .pill button { width: 44px; height: 44px; }
  button.pill { width: 52px; height: 52px; }
  .pill output { min-width: 52px; }
  .pill img { zoom: 1; }
}
@media (max-width: 370px) {
  .contact { gap: 5px; }
  .contact a { padding-inline: 8px; }
  .bio h1 { font-size: clamp(46px, 15.4vw, 60px); }
}
@media (max-width: 950px) and (max-height: 500px) {
  :root { --card: min(173.333px, 35svh); }
  .preview-photo { width: min(266.667px, 88vw, 34svh); }
  .preview-controls { bottom: calc(16px + var(--inset-bottom)); }
}

@font-face {
  font-family: "Inter Display";
  src: url("https://rsms.me/inter/font-files/InterDisplay-Medium.woff2?v=4.1") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

.bio-copy p {
  font-family: "Inter Display", Inter, sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 26px;
  text-box: trim-both cap alphabetic;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
