@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');

:root {
  /* Fonts */
  --font-heading: "Instrument Serif", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Mono", monospace;
  --font-ui: "Atkinson Hyperlegible Mono", monospace;
  --font-logo: "Atkinson Hyperlegible Mono", monospace;

  /* Palette */
  --black: #000000;
  --lime-yellow: #E0FF17;
  --dark-amethyst: #3B003E;
  --white: #FFFFFF;
  --dark-midnight: #090034;
  --pale-slate: #DAD3DA;
  --cream: #F1EDE1;
  --olive: #67675C;
  --lavender: #D9D4EC;

  /* Functional */
  --background: var(--cream);
  --text-main: #090034;
  --text-muted: #3B003E;
  --heading-color: #3B003E;
  --border: rgba(9, 0, 52, 0.22);

  /* Spacing */
  --space-xs: 0.4rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --space-xxl: 7rem;
}

/* =========================
   Reset / Base
   ========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--background);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: inherit;
}

::selection {
  background: var(--lime-yellow);
  color: var(--dark-midnight);
}

/* =========================
   Dark theme (About page)
   ========================= */

body.theme-dark {
  background: var(--dark-midnight);
  color: var(--lavender);
}

body.theme-dark p,
body.theme-dark .intro,
body.theme-dark .hero p {
  color: var(--lavender);
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4 {
  color: var(--white);
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

/* Prevent background p5 canvas from blocking links/buttons */
/* Prevent only the homepage background p5 canvas from blocking links/buttons */
#sketch-container,
#sketch-container canvas {
  pointer-events: none;
}

/* =========================
   Header / Navigation
   ========================= */

header,
.site-header {
  width: 100%;
  padding: 1.5rem 2.5rem;
  background: transparent;
  color: var(--dark-midnight);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.logo,
.site-title {
  width: fit-content;
  color: var(--dark-midnight);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
}

nav,
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

nav a,
.nav a {
  color: var(--dark-midnight);
  text-decoration: none;
}

.logo:hover,
.site-title:hover,
nav a:hover,
.nav a:hover {
  color: var(--dark-amethyst);
  background: var(--lime-yellow);
}

/* Dark theme (About page): flip header to lime-yellow-on-navy */
body.theme-dark header,
body.theme-dark .site-header {
  color: var(--lime-yellow);
}

body.theme-dark .logo,
body.theme-dark .site-title,
body.theme-dark nav a,
body.theme-dark .nav a {
  color: var(--lime-yellow);
}

body.theme-dark .logo:hover,
body.theme-dark .site-title:hover,
body.theme-dark nav a:hover,
body.theme-dark .nav a:hover {
  color: var(--dark-midnight);
  background: var(--lime-yellow);
}

/* =========================
   Main Layout
   ========================= */

main {
  width: 100%;
}

section {
  padding: var(--space-xl) var(--space-lg);
}

.container {
  width: min(1180px, 100%);
  margin: 0 auto;
}

/* =========================
   Typography
   ========================= */

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(4.5rem, 10vw, 11rem);
  max-width: 1100px;
}

h2 {
  font-size: clamp(2.6rem, 6vw, 6rem);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: clamp(1.6rem, 2.5vw, 2.6rem);
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  color: var(--dark-midnight);
  background: none;
  padding: 0;
}

p {
  max-width: 760px;
  color: var(--text-main);
}

/* =========================
   Hero
   ========================= */

.hero {
  min-height: calc(100vh - 135px);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xl);
}

.eyebrow,
.hero-label,
.hero .label {
  color: var(--dark-midnight);
  font-family: var(--font-ui);
  font-size: 1rem;
}

.intro,
.hero p {
  color: var(--dark-midnight);
  font-size: 1rem;
}

.hero-title {
  position: relative;
  display: inline-block;
  width: fit-content;
  max-width: 1100px;

  font-size: clamp(5rem, 11vw, 12rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-style: italic;
  color: var(--dark-midnight);

  padding: 0.08em 0.12em 0.12em 0;
  overflow: visible;
  z-index: 2;
}

/* Solid lime rectangle behind the whole title */
.hero-title::before {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  top: 0.12em;
  bottom: 0.08em;
  background: var(--lime-yellow);
  z-index: -1;
}

/* =========================
   Buttons
   ========================= */

.hero-links,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

button,
.button,
.btn,
.hero-links a,
.cta-row a {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;

  padding: 0.65rem 1rem;
  border: 1px solid var(--dark-amethyst);
  background: transparent;

  color: var(--dark-amethyst);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-decoration: none;

  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

button:hover,
.button:hover,
.btn:hover,
.hero-links a:hover,
.cta-row a:hover {
  background: var(--lime-yellow);
  border-color: var(--lime-yellow);
  color: var(--dark-amethyst);
  transform: translateY(-2px);
}

/* =========================
   Project Cards
   ========================= */

.projects,
.project-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-md);
}

.project-card {
  grid-column: span 6;
  min-height: 360px;
  padding: var(--space-md);
  background: var(--white);
  border: 1px solid var(--dark-midnight);
  color: var(--dark-midnight);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.project-card:nth-child(even) {
  background: var(--pale-slate);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--lime-yellow);
  box-shadow: 8px 8px 0 var(--lime-yellow);
}

.project-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
  margin-bottom: var(--space-md);
}

.project-card h3 {
  margin-bottom: var(--space-xs);
  color: var(--dark-amethyst);
}

.project-card p {
  font-size: 0.9rem;
}

.project-number {
  display: inline-block;
  width: fit-content;
  margin-bottom: var(--space-sm);
  padding: 0.25rem 0.5rem;
  background: var(--dark-midnight);
  color: var(--lime-yellow);
  font-family: var(--font-ui);
  font-size: 0.75rem;
}

/* =========================
   About / Info Panels
   ========================= */

.about,
.about-section,
.info-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-panel,
.info-panel {
  background: var(--pale-slate);
  border: 1px solid var(--dark-midnight);
  padding: var(--space-md);
}

.about-list,
.info-list {
  list-style: none;
  display: grid;
  gap: var(--space-sm);
}

.about-list li,
.info-list li {
  border-bottom: 1px solid var(--border);
  padding-bottom: var(--space-sm);
}

/* =========================
   Tags
   ========================= */

.tags,
.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}

.tag,
.keyword-list span {
  border: 1px solid var(--dark-amethyst);
  color: var(--dark-amethyst);
  background: transparent;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
}

.tag:hover,
.keyword-list span:hover {
  background: var(--lime-yellow);
  border-color: var(--lime-yellow);
  color: var(--dark-midnight);
}

/* =========================
   Images / Figures
   ========================= */

img {
  max-width: 100%;
}

figure {
  margin: 0;
}

figcaption {
  margin-top: var(--space-xs);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.75rem;
}

/* =========================
   Footer
   ========================= */

.site-footer,
footer {
  padding: var(--space-xl) var(--space-lg) var(--space-md);
  background: var(--olive);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.site-footer.footer-cream {
  background: var(--cream);
  color: var(--dark-midnight);
}

.footer-info,
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.footer-links {
  margin-bottom: var(--space-xxl);
}

.footer-info > *,
.footer-links > * {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-info > :nth-child(2) {
  text-align: center;
}

.footer-info > :nth-child(3),
.footer-links > :nth-child(3) {
  text-align: right;
}

.footer-links > :nth-child(2) {
  text-align: center;
}

.site-footer a,
footer a {
  color: var(--lime-yellow);
  text-decoration: none;
}

.site-footer a:hover,
footer a:hover {
  color: var(--dark-midnight);
  background: var(--lime-yellow);
}

.footer-cream a,
footer .footer-cream a {
  color: var(--dark-amethyst);
}

.footer-cream a:hover {
  color: var(--dark-midnight);
  background: var(--lime-yellow);
}

.made-by {
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
  opacity: 0.85;
}

.footer-wordmark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-logo);
  line-height: 0.75;
  font-size: clamp(5rem, 17vw, 13rem);
  color: var(--white);
  text-transform: uppercase;
}

.footer-cream .footer-wordmark {
  color: var(--dark-midnight);
}

.footer-wordmark .dot {
  width: 0.16em;
  height: 0.16em;
  border-radius: 50%;
  background: currentColor;
  align-self: center;
}

/* =========================
   Image placeholder utility
   ========================= */

.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 1px dashed var(--border);
  background: rgba(9, 0, 52, 0.04);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-align: center;
  padding: var(--space-md);
}

body.theme-dark .image-placeholder {
  border-color: rgba(217, 212, 236, 0.4);
  background: rgba(217, 212, 236, 0.06);
  color: var(--lavender);
}

.placeholder-square {
  aspect-ratio: 1 / 1;
}

.placeholder-portrait {
  aspect-ratio: 3 / 4;
}

.placeholder-wide {
  aspect-ratio: 4 / 3;
}

/* Once a placeholder <div> is swapped for a real <img> (keeping the same
   layout class), this makes the image fill its box without distorting.
   Sizing/position for the hero images is set further below — this only
   adds object-fit so those don't stretch. */
img.home-hero-image--left,
img.home-hero-image--right {
  object-fit: cover;
  display: block;
}

/* Tile-grid placeholders (e.g. project thumbnails) aren't absolutely
   positioned, so the <img> needs its own width + aspect-ratio sizing. */
img.placeholder-square,
img.placeholder-portrait,
img.placeholder-wide {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* =========================
   Home hero
   ========================= */

.home-hero {
  position: relative;
  height: 82vh;
  min-height: 600px;
  margin: 0 var(--space-lg);
}

/* Left image: smaller, portrait, sits low in the hero */
.home-hero-image--left {
  position: absolute;
  left: 0;
  top: 43%;
  width: 22%;
  height: 50%;
}

/* Right image: larger, near-square, sits high in the hero */
.home-hero-image--right {
  position: absolute;
  right: 0;
  top: 7%;
  width: 41%;
  height: 68%;
}

/* Name + role: right-aligned, tucked just left of the right image */
.home-hero-text {
  position: absolute;
  right: 43.5%;
  top: 46%;
  text-align: right;
  white-space: nowrap;
}

.home-name {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-style: italic;
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}

.home-role {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dark-amethyst);
}

.home-role br {
  content: "";
}

.discover-more {
  text-align: center;
  padding: var(--space-md) 0 var(--space-lg);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.discover-more .discover-arrow {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.7rem;
}

hr.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 var(--space-lg);
}

body.theme-dark hr.divider {
  border-top-color: rgba(217, 212, 236, 0.25);
}

/* =========================
   About hero
   ========================= */

.about-hero-title {
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: var(--space-xl);
}

.about-columns {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-xl);
  align-items: start;
}

.about-bio {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 46ch;
}

.availability-line {
  text-align: center;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: var(--space-xxl) var(--space-lg);
}

/* =========================
   Simple project tile grid (home page)
   ========================= */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: 0 var(--space-lg) var(--space-xl);
}

.project-tile {
  display: block;
  color: inherit;
  text-decoration: none;
}

.project-tile figcaption,
.project-tile .tile-caption {
  margin-top: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* =========================
   Responsive
   ========================= */

@media (max-width: 900px) {
  header,
  .site-header {
    padding: var(--space-md);
  }

  nav,
  .nav {
    gap: var(--space-md);
  }

  section,
  .hero {
    padding: var(--space-xl) var(--space-md);
  }

  .projects,
  .project-grid,
  .about,
  .about-section,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    grid-column: span 1;
  }

  .about-columns,
  .tile-grid {
    grid-template-columns: 1fr;
  }

  /* Collapse the asymmetric hero into a simple stacked column on small screens */
  .home-hero {
    position: static;
    height: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl) 0;
  }

  .home-hero-image--left,
  .home-hero-image--right {
    position: static;
    width: 70%;
    height: auto;
  }

  .home-hero-text {
    position: static;
    text-align: center;
    white-space: normal;
  }

  .footer-info,
  .footer-links {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    text-align: left !important;
  }

  .footer-info > *,
  .footer-links > * {
    text-align: left !important;
  }

  .footer-wordmark {
    font-size: clamp(3.5rem, 22vw, 6rem);
  }
}

@media (max-width: 600px) {
  h1,
  .hero-title {
    font-size: clamp(4rem, 18vw, 6rem);
  }

  .project-card img {
    height: 220px;
  }

  body::before {
    right: -52vw;
    width: 110vw;
    height: 110vw;
  }

  body::after {
    right: -8vw;
    width: 52vw;
    height: 52vw;
  }
}
