/* Shared section layout --------------------------------------------- */
.section {
  padding: var(--section-space) var(--gutter);
}

.section + .section {
  padding-top: 0;
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-bottom: clamp(1.25rem, 2.4vw, 2rem);
  border-bottom: 2px solid var(--ink-key);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section__note {
  color: var(--muted);
  font-size: 0.9375rem;
}

.eyebrow {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Work -------------------------------------------------------------- */
.project {
  border-bottom: 1px solid var(--rule);
}

/* Each project is a native <details>: the row is the summary. */
.project__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.15rem 1rem;
  align-items: center;
  padding-block: clamp(1.25rem, 2.4vw, 1.75rem);
  list-style: none;
  cursor: pointer;
}

.project__row::-webkit-details-marker {
  display: none;
}

/* A small keycap carrying the project number, in a key colour. */
.project__cap {
  display: grid;
  place-items: center;
  grid-row: span 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--ink-key);
  border-radius: 0.8rem;
  background: var(--cap);
  color: var(--ink-key);
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 900;
  box-shadow: 0 3px 0 var(--ink-key);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.project__row:hover .project__cap {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink-key);
}

.project__title {
  font-family: var(--font-display);
  grid-column: 2;
  font-size: clamp(1.375rem, 2.6vw, 2.125rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
  transition: color 160ms ease;
}

.project__row:hover .project__title {
  color: var(--accent-deep);
}

.project__meta {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.9375rem;
}

.project__toggle {
  position: relative;
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--ink-key);
  border-radius: 50%;
  transition: background-color 180ms ease;
}

.project__toggle::before,
.project__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--ink-key);
  transform: translate(-50%, -50%);
}

.project__toggle::before {
  width: 14px;
  height: 2px;
}

.project__toggle::after {
  width: 2px;
  height: 14px;
  transition: transform 180ms var(--ease-out);
}

.project__row:hover .project__toggle {
  background: var(--cap);
}

.project__details[open] .project__toggle {
  background: var(--cap);
}

.project__details[open] .project__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.project__award {
  color: var(--accent-deep);
  font-weight: 600;
}

/* Browser-frame screenshot of a project. The hard shadow matches the keys. */
.preview {
  display: block;
  align-self: start;
  overflow: hidden;
  border: 2px solid var(--ink-key);
  border-radius: 0.875rem;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--ink-key);
  transition: transform 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

a.preview:hover {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--ink-key);
}

.preview__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--ink-key);
  background: var(--tint-lilac);
}

.preview__dots {
  display: flex;
  gap: 0.3rem;
}

.preview__dots i {
  width: 0.6rem;
  height: 0.6rem;
  border: 1.5px solid var(--ink-key);
  border-radius: 50%;
  background: #ffb7d5;
}

.preview__dots i:nth-child(2) { background: #ffd98e; }
.preview__dots i:nth-child(3) { background: #b9f2df; }

.preview__url {
  min-width: 0;
  overflow: hidden;
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview__shot {
  width: 100%;
  height: auto;
}

.project__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 1.5rem;
}

.project__summary {
  max-width: 40rem;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
}

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(8.5rem, 100%), 1fr));
  gap: 1.25rem 1.5rem;
  max-width: 44rem;
}

.figure {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.figure dt {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}

.figure dd {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.project__stack {
  max-width: 44rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.project__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.project__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.project__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.project__panel > .project__body {
  max-width: 48rem;
}

@media (min-width: 900px) {
  .project__panel--preview {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
    align-items: start;
  }

  .project__panel--preview > .project__body {
    max-width: none;
  }
}

/* Also built -------------------------------------------------------- */
.also {
  padding-top: clamp(2.5rem, 5vw, 4rem);
}

.also__list {
  display: grid;
  gap: 1.5rem 3rem;
  margin-top: 1.25rem;
}

.also__title {
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.also__meta {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (min-width: 760px) {
  .also__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* About ------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding-top: clamp(2rem, 4vw, 3.25rem);
}

.about__statement {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.2vw, 2.625rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.about__statement em {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 1.08em;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.about__lead {
  display: grid;
  align-content: start;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

/* Framed like the project previews: hard outline and key-style shadow. */
.about__photo {
  width: 100%;
  max-width: 14rem;
  overflow: hidden;
  border: 2px solid var(--ink-key);
  border-radius: 1.5rem;
  background: var(--tint-lilac);
  box-shadow: 0 5px 0 var(--ink-key);
}

@media (min-width: 600px) {
  .about__photo { max-width: 18rem; }
}

@media (min-width: 900px) {
  .about__photo { max-width: 24rem; }
}

.about__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
}

.about__body {
  display: grid;
  gap: 1.1rem;
  max-width: 38rem;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
}

/* Recognition ------------------------------------------------------- */
.recognition {
  margin-top: 1.25rem;
}

.recognition__list {
  margin-top: 0.75rem;
}

.recognition__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.15rem 1.5rem;
  padding-block: 0.9rem;
  border-top: 1px solid var(--rule);
}

.recognition__row dt {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.recognition__row dd {
  font-size: 1rem;
}

@media (min-width: 600px) {
  .recognition__row {
    grid-template-columns: 8rem minmax(0, 1fr);
  }
}

.education {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 1rem;
}

.education__school {
  margin-top: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.3125rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.education__detail {
  color: var(--muted);
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 3rem;
  }
}

/* Experience -------------------------------------------------------- */
.role {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem 3rem;
  padding-block: clamp(2rem, 4vw, 3.25rem);
  border-bottom: 1px solid var(--rule);
}

.role__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.role__meta {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.role__points {
  display: grid;
  gap: 0.9rem;
  max-width: 44rem;
}

.role__points li {
  position: relative;
  padding-left: 1.5rem;
}

.role__points li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.7rem;
  height: 2px;
  background: var(--accent);
}

@media (min-width: 900px) {
  .role {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}

/* Toolkit ----------------------------------------------------------- */
.toolkit {
  display: grid;
  gap: 1.75rem 3rem;
  padding-top: clamp(2rem, 4vw, 3.25rem);
}

.toolkit__group dt {
  margin-bottom: 0.5rem;
}

.toolkit__group dd {
  font-size: clamp(1rem, 1.25vw, 1.125rem);
}

@media (min-width: 900px) {
  .toolkit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 4rem;
  }
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  transition: border-color 160ms ease, transform 160ms var(--ease-out);
}

.chip:hover {
  border-color: var(--ink-key);
  transform: translateY(-2px);
}

.chip__icon {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
}

/* Logos ------------------------------------------------------------- */
.role__logo {
  width: auto;
  height: 1.875rem;
}

.education__logo {
  width: auto;
  height: 2.5rem;
}

/* Tabs -------------------------------------------------------------- */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding-top: clamp(1.25rem, 2.4vw, 2rem);
}

/* Each tab is a small keycap; the selected one sits pressed down. */
.tab {
  min-height: 2.75rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid var(--ink-key);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-key);
  font: 600 0.9375rem/1 var(--font-body);
  box-shadow: 0 3px 0 var(--ink-key);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease;
}

.tab:hover {
  background: var(--tab-fill);
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink-key);
}

.tab[aria-selected="true"] {
  background: var(--tab-fill);
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink-key);
}

.tab:nth-child(1) { --tab-fill: #ffb7d5; }
.tab:nth-child(2) { --tab-fill: #b9f2df; }
.tab:nth-child(3) { --tab-fill: #ffd98e; }

.tabs__panel:focus-visible {
  outline-offset: 6px;
}
