:root {
      --red: 0;
      --green: 24;
      --blue: 12;
      --ink: rgb(var(--red), var(--green), var(--blue));

      --bg: var(--ink);
      --surface: rgba(255, 255, 255, 0.03);
      --text: #b9d8c0;
      --text-strong: #f0fff2;
      --muted: #9dbfa4;
      --muted-strong: #739c7c;
      --border: rgba(185, 216, 192, 0.24);
      --button-bg: rgba(255, 255, 255, 0.05);
      --shadow: rgba(0, 0, 0, 0.18);
      --font-scale: 1;

      --scroll-progress: 0;
      --message-opacity: 0.82;
}

body.accessible {
  --bg: #f3f1ee;
  --surface: rgba(17, 17, 17, 0.04);
  --text: #1b1b1b;
  --text-strong: #050505;
  --muted: #3d3d3d;
  --muted-strong: #1a1a1a;
  --border: rgba(17, 17, 17, 0.32);
  --button-bg: rgba(17, 17, 17, 0.06);
  --shadow: rgba(0, 0, 0, 0.12);
  --font-scale: 1.16;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;

  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background: var(--bg);
  font-size: calc(1rem * var(--font-scale));
  line-height: 1.6;

  transition: background-color 120ms linear, color 120ms linear;
}

body.accessible .bottom-content,
body.accessible .site-footer {
  letter-spacing: 0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  opacity: 0.65;
}

.accessibility-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;

  border: 1px solid var(--border);
  background: var(--button-bg);
  color: var(--text-strong);
  font: 0.7rem/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 10px 28px var(--shadow);
}

body.accessible .accessibility-toggle {
  padding: 1rem 1.2rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.4);
  border-width: 1.5px;
  color: var(--text-strong);
}

.accessibility-toggle:hover,
.accessibility-toggle:focus-visible {
  border-color: var(--text);
  transform: translateY(-1px);
}

.accessibility-toggle:focus-visible,
.links a:focus-visible,
.footer-nav a:focus-visible,
.project:focus-visible,
.scroll-hint:focus-visible {
  outline: 3px solid var(--text-strong);
  outline-offset: 4px;
}

.stage {
  position: fixed;
  inset: 0;
  z-index: 2;

  display: grid;
  place-items: center;

  padding: 2rem;
  pointer-events: none;
}

.message {
  text-align: center;
  opacity: var(--message-opacity, 0.82);
  transform: translateY(
    calc(var(--scroll-progress, 0) * -18px)
  );

  transition:
    opacity 180ms linear,
    transform 120ms linear;
}

.message h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 0.95;
  text-transform: uppercase;
}

body.accessible .message h1 {
  font-size: clamp(3.6rem, 11vw, 9.8rem);
  letter-spacing: 0.11em;
  font-weight: 500;
}

.message h2 {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font: 0.75rem/1 Arial, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

body.accessible .message h2 {
  font-size: 0.86rem;
  letter-spacing: 0.28em;
  font-weight: 700;
  color: var(--muted-strong);
}

.message p {
  margin: 1.5rem 0 0;
  color: var(--muted-strong);
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

body.accessible .message p {
  font-size: 0.86rem;
  letter-spacing: 0.42em;
  font-weight: 700;
  color: var(--muted-strong);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.6;
}

.bottom-content {
  position: relative;
  z-index: 1;

  width: min(100% - 3rem, 72rem);

  /*
    The fixed opening section does not take up document space.
    This places the content after roughly one viewport of scrolling.
  */
  margin: 100vh auto 0;
  padding: 2rem 0 4rem;

  border-top: 1px solid rgba(185, 216, 192, 0.28);
}

body.accessible .bottom-content {
  padding-bottom: 5rem;
}

.bottom-heading {
  margin: 0 0 1.5rem;

  color: var(--muted-strong);
  font: 0.65rem/1 Arial, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.details {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 5rem;
}

.about-intro {
  align-self: end;
  max-width: 20rem;
}

.about-intro h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--text-strong);
}

.about-info {
  display: contents;
}

.portrait {
  width: 100%;
  max-width: 400px;
  height: 450px;
  justify-self: center;
  overflow: hidden;
  border: 1px solid rgba(185, 216, 192, 0.24);
}

.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.about-copy {
  align-self: end;
  min-width: 0;
  max-width: 20rem;
}

.about-copy p {
  margin: 0;
  color: var(--muted);
  font: 1rem/1.6 Arial, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

body.accessible .about-copy p,
body.accessible .project strong,
body.accessible .project span,
body.accessible .footer-nav a,
body.accessible .site-footer p,
body.accessible .links a {
  font-size: 1.04rem;
}

body.accessible .about-copy p {
  color: var(--text);
  line-height: 1.8;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 1.5rem;
}
.links a {
  color: var(--text);
  font: 0.7rem/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.links a:hover,
.links a:focus-visible {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.projects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.project {
  min-height: 8rem;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 1rem;

  border: 1px solid var(--border);
  background: var(--surface);

  color: var(--text);
  text-decoration: none;

  transition:
    border-color 160ms ease,
    background-color 160ms ease;
}

.project:hover,
.project:focus-visible {
  border-color: var(--text);
  background: rgba(185, 216, 192, 0.08);
}

.project span {
  color: var(--muted-strong);
  font: 0.62rem/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project strong {
  font-size: 1.2rem;
  font-weight: 400;
}

body.accessible .project strong {
  font-size: 1.42rem;
  color: var(--text-strong);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.content-section h3 {
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.6;
}

.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 2.5rem;
  padding: 1.25rem 0 2rem;
  background: var(--surface);
}

body.accessible .site-footer {
  padding-top: 1.5rem;
  background: rgba(255, 255, 255, 0.18);
}

.footer-inner {
  width: min(100% - 3rem, 72rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer p {
  color: var(--muted);
  font: 0.72rem/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem 1.5rem;
}

.footer-nav a {
  color: var(--text);
  font: 0.7rem/1 Arial, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--text-strong);
  text-decoration: underline;
  text-underline-offset: 0.25rem;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    justify-content: flex-start;
  }

  .accessibility-toggle {
    top: 0.8rem;
    right: 0.8rem;
    padding: 0.75rem 0.9rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.content-section p,
.content-section li {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(244, 244, 240, 0.75);
}

.content-section ul {
  list-style: none;
}

.content-section li + li {
  margin-top: 0.5rem;
}

.contact-link {
  display: inline-block;
  margin-top: 1rem;
  border-bottom: 1px solid rgba(244, 244, 240, 0.5);
  padding-bottom: 0.25rem;
}

.footer {
  margin-top: 8rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(244, 244, 240, 0.2);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  opacity: 0.5;
}

/*MOBILE CSS*/
@media (max-width: 650px) {
  .bottom-content {
    width: min(100% - 2rem, 72rem);
    margin-top: 100vh;
  }

  .details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3.5rem;
  }

  .about-intro {
    max-width: 100%;
  }

  .portrait {
    width: 100%;
    max-width: 240px;
    height: 300px;
    justify-self: start;
  }

  .about-copy {
    max-width: 100%;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .project {
    min-height: 6rem;
  }
}

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

  .message {
    transition: none;
  }
}