:root {
  --bg: #121212;
  --text: #ffffff;
  --muted: #888888;
  --border: #888888;
  --font: Arial, Helvetica, sans-serif;

  --grid-max-width: 1920px;
  --grid-margin: 48px;
  --grid-columns: 12;
  --grid-gap: 20px;

  --breakpoint: 900px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: normal;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.page {
  max-width: var(--grid-max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 56px;
  padding: 48px 24px 96px;
}

/* Intro (title) */

.intro {
  margin-bottom: 24px;
}

/* Photo (sits directly on top of the accordion table) */

.photo {
  margin: 0;
  aspect-ratio: 345 / 201;
  overflow: hidden;
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 80%;
}

/* Contact (footer) */

.contact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--text);
  color: var(--text);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible {
  background: var(--text);
  color: var(--bg);
}

.contact__label {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.contact__block + .contact__block {
  margin-top: 16px;
}

.contact__value {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
}

.contact__value a {
  color: var(--muted);
  text-decoration: none;
}

.contact__value a:hover,
.contact__value a:focus-visible {
  text-decoration: underline;
}

.intro__name {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  animation: blink-slow 1.4s ease-in-out infinite;
}

.intro__role {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  animation: blink-fast 0.35s ease-in-out infinite;
}

/* Dips once per 0.4s cycle, fading between 75% and 100% opacity; the fade itself is quick, holding at full opacity the rest of the beat */
@keyframes blink-fast {
  0%,
  40%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.75;
  }
  60% {
    opacity: 1;
  }
}

/* 4 beats of 0.4s per cycle; dips only once, on the 4th beat */
@keyframes blink-slow {
  0%,
  75% {
    opacity: 1;
  }
  87.5% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

/* 2 beats of 0.35s per cycle; dips only once, on the 2nd beat */
@keyframes blink-dot {
  0%,
  50% {
    opacity: 1;
  }
  75% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

/* Accordion */

.accordion {
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.accordion-item {
  width: 100%;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 40px;
  padding: 0;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.accordion-header__label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.accordion-header__name {
  color: var(--text);
  white-space: nowrap;
}

.accordion-header__separator {
  flex: none;
  color: var(--muted);
}

.accordion-header__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  animation: blink-dot 0.7s ease-in-out infinite;
}

.accordion-header__tag {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.accordion-header__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.accordion-header__chevron {
  flex: none;
  width: 16px;
  height: 8.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform 0.15s ease;
  transform: rotate(0deg);
}

.accordion-item[data-open="true"] .accordion-header__chevron {
  transform: rotate(180deg);
}

.accordion-panel-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows 0.25s ease, opacity 0.2s ease;
}

.accordion-item[data-open="true"] .accordion-panel-wrapper {
  grid-template-rows: 1fr;
  opacity: 1;
}

.accordion-item[data-open="true"] .accordion-panel td {
  color: var(--muted);
}

.accordion-panel-wrapper > .accordion-panel {
  min-height: 0;
}

.accordion-panel {
  width: 100%;
  border-collapse: collapse;
}

.accordion-panel tr {
  height: 40px;
}

.accordion-panel td {
  border-top: 1px solid var(--border);
  padding: 0;
  font-weight: 400;
  white-space: nowrap;
}

.accordion-panel td:first-child {
  width: 100%;
  padding-left: 16px;
  color: var(--text);
}

.accordion-panel td:last-child {
  text-align: right;
  color: var(--text);
  padding-left: 16px;
}

.accordion-panel td[colspan] {
  text-align: left;
}

.row-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.row-range__start-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-range__chevron {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.row-range__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

/* Desktop: 12-column grid (margin 48px, gutter 20px, matching the Figma frame) */

@media (min-width: 900px) {
  .page {
    padding-top: 96px;
    padding-left: var(--grid-margin);
    padding-right: var(--grid-margin);
  }

  .content {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    column-gap: var(--grid-gap);
    align-items: start;
  }

  .intro {
    grid-column: 3 / span 4;
    margin-bottom: 0;
  }

  .photo {
    grid-column: 7 / span 4;
    aspect-ratio: 381 / 199;
  }

  .photo img {
    object-position: 50% 50%;
  }

  .accordion {
    grid-column: 7 / span 4;
    min-width: 0;
  }

  .contact {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    column-gap: var(--grid-gap);
    align-items: end;
  }

  .button {
    grid-column: 3 / span 4;
    justify-self: start;
  }
}
