/* ==========================================================================
   style.css for madelainedalangin.com

   TABLE OF CONTENTS
   1. Design tokens
   2. Base
   3. Layout
   4. Glass panel
   5. Site header and navigation
   6. Buttons
   7. Background photo and hero (the typing line)
   8. Featured project cards
   9. Labels, tags and badges
   10. Small project cards
   11. About section
   12. Experience timeline
   13. Contact card and footer
   14. Accessibility helpers
   15. Fallbacks
   16. Motion
   ========================================================================== */


/* == 1. Design tokens == */

:root {
  --color-accent: #d2a35f;
  --color-accent-strong: #a5864e;
  --color-accent-tint: rgb(210 163 95 / 0.2);
  --color-on-accent: #211d12;
  --color-ink: #ffffff;
  --color-ink-soft: #ececec;
  --color-rule: #615439;
  --color-hover: rgb(236 236 236 / 0.1);
  --color-surface: rgb(15 14 9 / 0.45);
  --color-tag-fill: #342c17;
  --color-badge-fill: #403728;

  --color-page: #211d12;
  --photo-blur: 12px;

  --glass-fill: rgb(15 14 9 / 0.38);
  --glass-fill-solid: rgb(15 14 9 / 0.85);
  --glass-fill-hover: rgb(15 14 9 / 0.55);
  --header-fill: rgb(15 14 9 / 0.72);
  --glass-border: rgb(236 236 236 / 0.16);
  --glass-shine: rgb(255 255 255 / 0.08);
  --glass-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.14),
    0 8px 24px rgb(0 0 0 / 0.25);

  --button-fill: rgb(236 236 236 / 0.9);
  --button-fill-hover: #ffffff;
  --button-text: #211d12;

  --font-body: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Mioya", Georgia, "Times New Roman", serif;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-strong: 700;

  --label-size: 0.7rem;
  --label-tracking: 0.08em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;

  --radius-panel: 22px;
  --radius-pill: 999px;

  --content-width: 64rem;
  --prose-width: 65ch;

  --header-height: 3.95rem;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --type-speed: 85ms;
  --type-start: 300ms;
  --type-length: 22;
  --hero-peek: 9rem;
}

/* Starting values only: js/reveal.js replaces --header-height with the header's real height. */
@media (max-width: 52rem) {
  :root {
    --header-height: 6.8rem;
  }
}

@media (max-width: 22rem) {
  :root {
    --header-height: 9.5rem;
  }
}


/* == 2. Base == */

/* Mioya by Sora Sagano (dot colon), SIL Open Font License.
   MioyaVF.ttf is the variable version: one file that covers every weight from 300 to 900. */
@font-face {
  font-family: "Mioya";
  src: url("../fonts/MioyaVF.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-padding-top: calc(var(--header-height) + 1.25rem);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--color-ink);

  background-color: var(--color-page);
}

main {
  overflow-x: clip;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-weight: var(--weight-strong);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.3rem;
}

h4 {
  font-size: 1.1rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 var(--space-3);
}

a {
  color: var(--color-ink);
  text-decoration-color: var(--color-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--color-accent);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}


/* == 3. Layout == */

.container {
  width: min(100% - 2 * var(--space-3), var(--content-width));
  margin-inline: auto;
}

.section {
  margin-top: var(--space-7);
}

.container > .section:first-child {
  margin-top: var(--space-5);
}

.section + .section {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-rule);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__intro {
  max-width: 40rem;
  margin: 0 auto var(--space-6);
  text-align: center;
  color: var(--color-ink);
}

.section__intro .section__title {
  margin-bottom: var(--space-2);
  color: var(--color-ink);
}

.subsection__title {
  margin: var(--space-5) 0 var(--space-3);
}


/* == 4. Glass panel == */

.panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(6px) saturate(150%);
  backdrop-filter: blur(6px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--glass-shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 55% 0;
  z-index: -1;
  background: linear-gradient(to bottom, var(--glass-shine), transparent);
  pointer-events: none;
}


/* == 5. Site header and navigation == */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-fill);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid var(--color-rule);
  box-shadow: 0 8px 24px rgb(15 14 9 / 0.2);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  width: min(100% - 2 * var(--space-3), var(--content-width));
  margin-inline: auto;
  padding-block: var(--space-2);
}

.site-nav__brand {
  padding: var(--space-2) 0;
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: var(--weight-strong);
  text-decoration: none;
}

.site-nav__brand:hover {
  color: var(--color-accent);
}

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  --link-pad: 0.55rem;
  position: relative;
  display: block;
  padding: var(--space-2) var(--link-pad);
  border-radius: var(--radius-pill);
  color: var(--color-ink);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-nav__link:hover {
  background: var(--color-hover);
  color: var(--color-ink);
}

.site-nav__link[aria-current="true"] {
  color: var(--color-accent);
}

.site-nav__link[aria-current="true"]::after {
  content: "";
  position: absolute;
  right: var(--link-pad);
  bottom: 0.25rem;
  left: var(--link-pad);
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}

@media (min-width: 30rem) {
  .site-nav__link {
    --link-pad: var(--space-3);
    font-size: 1rem;
  }
}

/* GitHub, LinkedIn and email icons.
   Each PNG is a solid circle with a see-through symbol, so it is used as a mask:
   the circle takes the link's text color (white, gold on hover). */
.site-nav__social {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__icon {
  display: block;
  padding: 0.25rem;
  border-radius: 50%;
  color: var(--color-ink);
}

.site-nav__icon:hover {
  color: var(--color-accent);
}

.site-nav__icon-shape {
  display: block;
  width: 2rem;
  height: 2rem;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.site-nav__icon--github {
  --icon: url("../images/github.png");
}

.site-nav__icon--linkedin {
  --icon: url("../images/linkedin.png");
}

.site-nav__icon--email {
  --icon: url("../images/email.png");
}

/* Narrow screens: name and icons on the first row, section links centered on the second */
@media (max-width: 52rem) {
  .site-nav__social {
    order: 1;
  }

  .site-nav__list {
    order: 2;
    flex-basis: 100%;
    justify-content: center;
    margin-left: 0;
  }
}

/* Very narrow screens: the icons no longer fit beside the name, so center every row */
@media (max-width: 22rem) {
  .site-nav {
    justify-content: center;
  }
}


/* == 6. Buttons == */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: var(--weight-strong);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button--primary {
  background: var(--color-accent);
  border-color: var(--color-accent-strong);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.6);
  color: var(--color-on-accent);
}

.button--primary:hover {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

.button--glass {
  background: var(--button-fill);
  -webkit-backdrop-filter: blur(6px) saturate(150%);
  backdrop-filter: blur(6px) saturate(150%);
  border-color: rgb(255 255 255 / 0.6);
  box-shadow: inset 0 1px 0 #fff, 0 6px 18px rgb(0 0 0 / 0.25);
  color: var(--button-text);
}

.button--glass:hover {
  background: var(--button-fill-hover);
  color: var(--button-text);
}

.button--icon {
  width: 2.5rem;
  padding: 0;
}

.button--icon img {
  display: block;
  width: auto;
  height: 1.3rem;
}

.button__icon {
  flex-shrink: 0;
}


/* == 7. Background photo and hero (the typing line) == */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-4);
  min-height: calc(100vh - var(--header-height) - var(--hero-peek));
  min-height: calc(100svh - var(--header-height) - var(--hero-peek));
  padding: var(--space-5) var(--space-3);
  text-align: center;
}

.hero__subtitle {
  max-width: 60ch;
  margin: 0;
  color: #fff;
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  line-height: 1.4;
  text-shadow:
    0 0 1px rgb(15 14 9 / 0.9),
    0 0 3px rgb(15 14 9 / 0.9),
    0 1px 12px rgb(0 0 0 / 0.6);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.hero__photo {
  position: absolute;
  inset: calc(-1 * var(--header-height)) 0 0 0;
  z-index: -1;
  background:
    linear-gradient(rgb(15 14 9 / 0.25), rgb(15 14 9 / 0.45)),
    url("../images/IMG_5023.jpg") center / cover no-repeat;
}

.typing {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 6.5vw, 6.5rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 24px rgb(0 0 0 / 0.35);
}

.typing__text::after {
  content: "";
  display: none;
  width: 0.06em;
  height: 0.85em;
  margin-left: 0.06em;
  background: var(--color-accent);
  vertical-align: -0.05em;
}


/* == 8. Featured project cards == */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  gap: var(--space-4);
}

.card-grid--three {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.card-grid--locked {
  align-items: start;
}

.card {
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
}

.card__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.card__title {
  margin: 0;
}

.card__summary {
  color: var(--color-ink-soft);
}

.card__details {
  margin-top: var(--space-3);
}

.card__details summary,
.about-more > summary {
  cursor: pointer;
  list-style: none;
}

.card__details summary::-webkit-details-marker,
.about-more > summary::-webkit-details-marker {
  display: none;
}

.card__details summary::after,
.about-more > summary::after {
  content: "";
  width: 0.8em;
  height: 0.8em;
  background: currentColor;
  -webkit-mask: var(--chevron) center / contain no-repeat;
  mask: var(--chevron) center / contain no-repeat;
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.card__details[open] summary::after,
.about-more[open] > summary::after {
  transform: rotate(180deg);
}

.card__details .when-open,
.card__details[open] .when-closed,
.about-more > summary .when-open,
.about-more[open] > summary .when-closed {
  display: none;
}

.card__details[open] .when-open,
.about-more[open] > summary .when-open {
  display: inline;
}

.card__details ul {
  margin: var(--space-3) 0 0;
  padding-left: 1.2rem;
  color: var(--color-ink-soft);
}

.card__details li + li {
  margin-top: var(--space-1);
}

.card__footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-top: auto;
  padding-top: var(--space-4);
}

.card__footer > .card__details {
  grid-row: 1;
  grid-column: 1 / -1;
  margin: 0;
}

.card__footer > .button--icon {
  grid-row: 1;
  grid-column: 2;
}


/* == 9. Labels, tags and badges == */

.tag,
.card__label,
.skill-list dt,
.contact-list dt,
.eyebrow {
  font-size: var(--label-size);
  font-weight: var(--weight-strong);
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}

.card__label {
  margin: 0;
  color: var(--color-ink-soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--color-tag-fill);
  color: var(--color-accent);
}

.badge {
  flex-shrink: 0;
  margin: 0;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-badge-fill);
  font-size: 0.75rem;
  font-weight: var(--weight-strong);
}


/* == 10. Small project cards == */

.card__banner {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  margin-bottom: var(--space-3);
  border-radius: calc(var(--radius-panel) - 8px);
  background: linear-gradient(160deg, rgb(210 163 95 / 0.38), rgb(210 163 95 / 0.08));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25);
  color: rgb(255 255 255 / 0.6);
  font-size: 2.5rem;
  font-weight: var(--weight-strong);
  letter-spacing: -0.02em;
}

.card__banner--natural {
  aspect-ratio: auto;
}

.card__banner-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__banner--natural .card__banner-image {
  position: static;
  height: auto;
}

.card__banner + .card__title {
  margin-bottom: var(--space-2);
}


/* == 11. About section == */

.prose {
  max-width: var(--prose-width);
}

.about-block {
  display: grid;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  max-width: calc(18rem + var(--space-5) + var(--prose-width));
  margin-bottom: var(--space-6);
}

.about-block__photo {
  display: block;
  width: 100%;
  max-width: 20rem;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-panel);
  box-shadow: var(--glass-shadow);
}

.about-more {
  margin-top: calc(var(--space-4) - var(--space-6));
}

.about-more[open] > summary {
  margin-bottom: var(--space-6);
}

.about-block__photo--cover {
  width: 10rem;
  aspect-ratio: auto;
  border-radius: 6px;
}

.about-block__text {
  max-width: var(--prose-width);
}

.about-block__text > :last-child {
  margin-bottom: 0;
}

@media (min-width: 48rem) {
  .about-block {
    grid-template-columns: 18rem minmax(0, 1fr);
  }

  .about-block:nth-of-type(even) {
    grid-template-columns: minmax(0, 1fr) 18rem;
  }

  .about-block:nth-of-type(even) .about-block__photo {
    grid-column: 2;
    grid-row: 1;
  }

  .about-block__photo--cover {
    justify-self: center;
  }
}

.skill-list {
  display: grid;
  gap: var(--space-2) var(--space-5);
}

.skill-list dt {
  color: var(--color-ink);
}

.skill-list dd {
  margin: 0 0 var(--space-2);
}

@media (min-width: 40rem) {
  .skill-list {
    grid-template-columns: max-content 1fr;
    align-items: baseline;
  }
}


/* == 12. Experience timeline == */

.timeline {
  --line-x: 0.6rem;
  --card-gap: 2.5rem;
  --dot-size: 1.1rem;
  position: relative;
  margin: 0;
  padding: 0 0 0 var(--card-gap);
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--line-x);
  width: 2px;
  margin-left: -1px;
  background: var(--color-accent);
  transform-origin: top;
}

.timeline__item {
  position: relative;
  margin-bottom: var(--space-5);
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: calc(var(--line-x) - var(--card-gap) - var(--dot-size) / 2);
  width: var(--dot-size);
  height: var(--dot-size);
  border: 4px solid var(--color-accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px var(--color-accent-tint);
}

.timeline__card {
  padding: var(--space-4);
}

.timeline__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
}

.timeline__title {
  margin: 0;
}

.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: var(--space-2) 0 var(--space-3);
  font-size: 0.9rem;
  color: var(--color-ink-soft);
}

.timeline__card > :last-child {
  margin-bottom: 0;
}

.timeline__date,
.timeline__place {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}

.timeline__date::before,
.timeline__place::before {
  content: "";
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.timeline__date {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M4 11h16'/%3E%3C/svg%3E");
}

.timeline__place {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6-5.3-6-10a6 6 0 0 1 12 0c0 4.7-6 10-6 10z'/%3E%3Ccircle cx='12' cy='11' r='2'/%3E%3C/svg%3E");
}

.timeline__summary {
  color: var(--color-ink-soft);
}

@media (min-width: 48rem) {
  .timeline {
    --line-x: 50%;
    padding-left: 0;
  }

  .timeline__item {
    width: calc(50% - var(--card-gap));
  }

  .timeline__item:nth-child(odd)::before {
    left: auto;
    right: calc(-1 * var(--card-gap) - var(--dot-size) / 2);
  }

  .timeline__item:nth-child(even) {
    margin-left: auto;
  }

  .timeline__item:nth-child(even)::before {
    left: calc(-1 * var(--card-gap) - var(--dot-size) / 2);
  }
}


/* == 13. Contact card and footer == */

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-ink-soft);
}

.contact-card {
  max-width: 46rem;
  padding: var(--space-5);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
}

.contact-card__intro {
  margin-bottom: var(--space-4);
}

.contact-list {
  margin: 0;
}

.contact-list__row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  align-items: baseline;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-rule);
}

.contact-list__row:last-child {
  border-bottom: 1px solid var(--color-rule);
}

.contact-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.contact-list a {
  text-decoration-color: transparent;
}

.contact-list a:hover {
  text-decoration-color: var(--color-accent);
}

@media (max-width: 30rem) {
  .contact-card {
    padding: var(--space-4);
  }

  .contact-list__row {
    grid-template-columns: 1fr;
  }
}

.contact-list__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.site-footer {
  margin-top: var(--space-6);
  margin-bottom: var(--space-5);
}

.site-footer__copyright {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}


/* == 14. Accessibility helpers == */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 20;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--color-accent);
  color: var(--color-on-accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}


/* == 15. Fallbacks == */

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .panel,
  .button--glass,
  .site-header {
    background: var(--glass-fill-solid);
  }
}


/* == 16. Motion == */

@keyframes type-hide {
  from,
  to {
    display: none;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes details-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
}

@keyframes draw-line {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes dot-pop {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

@keyframes fill-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

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

  .typing__char {
    animation: type-hide 1ms linear backwards;
    animation-delay: calc(var(--type-start) + var(--i) * var(--type-speed));
  }

  .hero__subtitle {
    animation: fade-up 0.9s ease-out both;
    animation-delay: calc(var(--type-start) + var(--type-length) * var(--type-speed));
  }

  .hero__actions {
    animation: fade-up 0.9s ease-out both;
    animation-delay: calc(var(--type-start) + var(--type-length) * var(--type-speed) + 0.15s);
  }

  .typing__text::after {
    display: inline-block;
    animation: blink 1.1s steps(1) infinite;
  }

  .js .reveal:not(.is-visible) {
    opacity: 0;
  }

  .reveal.is-visible {
    animation: fade-up 0.9s ease-out both;
  }

  .card-grid > .card:nth-child(even).is-visible,
  .about-block:nth-of-type(odd) > .about-block__text.is-visible,
  .about-block:nth-of-type(even) > .about-block__photo.is-visible {
    animation-delay: 0.12s;
  }

  .card-grid--three > .card:nth-child(3n).is-visible {
    animation-delay: 0.24s;
  }

  .js .timeline:not(.is-visible)::before {
    transform: scaleY(0);
  }

  .timeline.is-visible::before {
    animation: draw-line 1.4s var(--ease-out) both;
  }

  .js .timeline__item:not(.is-visible)::before {
    transform: scale(0);
  }

  .timeline__item.is-visible::before {
    animation: dot-pop 0.6s var(--ease-out) 0.2s both;
  }

  .js .hero__photo {
    position: fixed;
    inset: calc(-2 * var(--photo-blur));
    filter: blur(calc(var(--photo-progress, 0) * var(--photo-blur)));
    opacity: calc(1 - var(--photo-progress, 0));
  }

  @supports (animation-timeline: scroll()) {
    .site-header::before {
      content: "";
      position: absolute;
      inset: 0 0 auto 0;
      height: 3px;
      background: var(--color-accent);
      transform-origin: left;
      animation: fill-bar linear both;
      animation-timeline: scroll(root);
    }
  }

  .card__details[open] > ul {
    animation: details-in 0.3s var(--ease-out);
  }

  .card__details summary::after,
  .about-more > summary::after {
    transition: transform 0.2s ease;
  }

  .button,
  .site-nav__link {
    transition: transform 0.12s ease, background-color 0.12s ease;
  }

  .button:hover {
    transform: translateY(-1px);
  }

  .button:active {
    transform: scale(0.94);
  }

  a {
    transition: text-underline-offset 0.15s ease, color 0.15s ease;
  }

  a:hover {
    text-underline-offset: 5px;
  }
}