/* Values come from the Figma frames (1512px wide). */
:root {
  --ink: #000;
  --paper: #fff;
  --font-heading: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Fraunces", Georgia, serif;
  --page-pad: 70px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-heading);
}

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

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

/* ---------- Header (Figma: TOP BANNER, 104px) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 104px;
  padding: 0 34px 0 30px;
  background: var(--paper);
  font-weight: 700;
  font-size: 40px;
}

.site-nav { display: flex; gap: 34px; }

.site-nav a:hover,
.tile:hover .tile-label { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Three tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 86px;
  max-width: 1512px;
  margin: 0 auto;
  padding: 66px var(--page-pad) 0;
}

.tile { display: block; }

.tile-image {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
}

/* Crops are positioned with inline styles copied from Figma */
.tile-image img {
  position: absolute;
  max-width: none;
}

.tile-label {
  display: block;
  margin-top: 43px;
  font-weight: 700;
  font-size: 40px;
}

/* ---------- Horizontal carousel ---------- */
.carousel {
  margin-top: 35px;
  padding: 29px 0;
  overflow-x: auto;
  scrollbar-width: none; /* hidden: the carousel scrolls itself */
}

.carousel::-webkit-scrollbar { display: none; }

.carousel-track {
  display: flex;
  gap: 15px;
  width: max-content;
}

.carousel-track img {
  height: 402px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------- Project grids (Figma: DESIGN PAGE, ART PAGE) ---------- */
.tiles--projects {
  row-gap: 106px;
  padding-bottom: 42px;
}

.tiles--art { padding-top: 85px; }

.tiles--projects .tile-label {
  font-size: 30px;
  line-height: 34px;
  min-height: 68px; /* room for two lines, so rows stay aligned */
}

/* ---------- About page (Figma: ABOUT ME) ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 91px;
  max-width: 1512px;
  margin: 0 auto;
  padding: 54px 30px 60px;
}

.about h2 {
  margin: 0;
  font-size: 35px;
  font-weight: 700;
  white-space: nowrap;
}

.about h3 {
  margin: 57px 0 22px;
  font-size: 30px;
  font-weight: 700;
}

.about h3.about-education { margin-top: 149px; }

.about-text {
  font-family: var(--font-body);
  font-variation-settings: "SOFT" 0, "WONK" 1;
  font-size: 20px;
}

.about-text p { margin: 0 0 1.2em; }
.about-intro { margin-top: 115px; }

.cv-entry { margin-bottom: 1.2em; }
.cv-entry p { margin: 0; }
.cv-entry ul { margin: 0; padding-left: 1.4em; }

.cv-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.cv-title strong { font-weight: 700; }

.cv-date {
  flex-shrink: 0;
  color: #636363;
  font-size: 15px;
  text-align: right;
}

.contact-list {
  list-style: none;
  margin: 99px 0 0;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 50px;
  text-align: right;
}

.contact-link { text-decoration: underline; }
.contact-list a:hover { text-decoration: underline; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1200px) {
  :root { --page-pad: 40px; }
  .site-header, .tile-label { font-size: 30px; }
  .tiles { gap: 40px; }
  .tiles--projects { row-gap: 64px; }
  .tiles--projects .tile-label { font-size: 22px; min-height: 52px; }
  .tile-label { margin-top: 24px; }
  .about { column-gap: 40px; }
  .about h2 { font-size: 28px; white-space: normal; }
  .about h3 { font-size: 24px; }
  .about-text { font-size: 18px; }
}

@media (max-width: 760px) {
  :root { --page-pad: 16px; }
  .site-header {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    min-height: 0;
    padding: 16px;
  }
  /* Name runs about half the screen width; the nav runs edge to edge */
  .site-name { font-size: 4.3vw; align-self: flex-start; }
  .site-nav { justify-content: space-between; gap: 0; font-size: 6.9vw; }
  .tiles, .tiles--art { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .tile-label { font-size: 28px; margin-top: 16px; }
  .tiles--projects .tile-label { font-size: 22px; min-height: 0; }
  .about { grid-template-columns: 1fr; row-gap: 48px; padding: 24px 16px 48px; }
  .about-intro { margin-top: 24px; }
  .about h3 { margin-top: 32px; }
  .about h3.about-education { margin-top: 48px; }
  .about-text { font-size: 17px; }
  .contact-list { margin-top: 16px; font-size: 20px; line-height: 40px; text-align: left; }
  .carousel-track img { height: 260px; width: auto !important; }
}
