@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./assets/SourceSerif4-var.woff2") format("woff2");
}

:root {
  --paper: #f4ead7;
  --ink: #11100f;
  --blue: #2456c7;
  --red: #e9432d;
  --yellow: #f2b72c;
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--ink);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
}

body { overflow: hidden; }
a { color: inherit; }

.cover {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 650px;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper);
}

.portrait {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: url("./assets/agent-collage.png") center / cover no-repeat;
}

.identity {
  position: absolute;
  z-index: 3;
  top: clamp(22px, 3.5vw, 54px);
  left: clamp(24px, 5vw, 88px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: clamp(0.72rem, 0.9vw, 0.95rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
}

.identity span {
  font-weight: 500;
}

.identity strong {
  font-weight: 700;
}

.about-trigger {
  position: absolute;
  z-index: 5;
  top: 18px;
  right: clamp(28px, 3vw, 56px);
  min-height: 36px;
  padding: 5px 15px;
  border: 1px solid rgba(91, 70, 110, 0.28);
  border-radius: 100px;
  background: rgba(232, 221, 243, 0.68);
  color: var(--ink);
  font: 700 0.875rem/1 "Source Serif 4", Georgia, serif;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: color 160ms ease, background 160ms ease;
}

.about-trigger:hover,
.about-trigger:focus-visible {
  background: rgba(216, 198, 234, 0.84);
}

.about-trigger:focus-visible,
.about-close:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.about-dialog {
  width: min(420px, calc(100vw - 36px));
  max-width: none;
  padding: 34px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 12px 12px 0 var(--blue);
}

.about-dialog::backdrop { background: rgba(17, 16, 15, 0.62); }

.about-kicker {
  margin: 0 0 30px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.about-dialog h2 {
  margin: 0 0 14px;
  font-size: 2.25rem;
  line-height: 1;
}

.about-dialog p:last-child {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

.about-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1.75rem/1 "Source Serif 4", Georgia, serif;
  cursor: pointer;
}

.quote {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: clamp(24px, 5vw, 88px);
  width: max-content;
  max-width: min(33vw, 520px);
  margin: 0;
  transform: translateY(-50%);
}

.quote p {
  margin: 0;
  font-size: clamp(1.65rem, 2.5vw, 3.25rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.quote cite {
  display: block;
  margin-top: 18px;
  font-size: clamp(0.65rem, 0.9vw, 0.9rem);
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-align: right;
}

.projects {
  position: absolute;
  z-index: 4;
  left: 0;
  bottom: 0;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  color: #fff9ed;
  border-top: 1px solid rgba(244, 234, 215, 0.34);
  background: rgba(17, 16, 15, 0.72);
  backdrop-filter: blur(16px) saturate(0.85);
  -webkit-backdrop-filter: blur(16px) saturate(0.85);
}

.projects a {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px clamp(8px, 0.8vw, 12px);
  border-right: 1px solid rgba(244, 234, 215, 0.28);
  text-decoration: none;
  font-size: clamp(0.75rem, 1vw, 0.95rem);
  letter-spacing: 0.035em;
  transition: color 160ms ease, background 160ms ease;
}

.projects a:last-child { border-right: 0; }

.projects a:hover,
.projects a:focus-visible {
  color: var(--ink);
  background: var(--yellow);
  outline: none;
}

.project-logo {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 11px;
  object-fit: contain;
}

.project-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.project-heading {
  display: flex;
  align-items: baseline;
  line-height: 1.1;
}

.project-heading strong {
  font-weight: 700;
}

.projects small {
  font-size: clamp(0.75rem, 0.8vw, 0.84rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.025em;
  white-space: normal;
}

.orbit {
  position: absolute;
  z-index: 1;
  width: min(25vw, 360px);
  aspect-ratio: 1;
  right: -5vw;
  top: 14%;
  border: clamp(18px, 3vw, 42px) solid var(--yellow);
  border-radius: 50%;
  mix-blend-mode: multiply;
  opacity: 0.88;
}

@media (max-width: 760px) {
  body { overflow: auto; }

  .cover {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  .identity {
    position: relative;
    order: 0;
    top: auto;
    left: auto;
    z-index: 1;
    gap: 4px;
    padding: 24px 110px 20px 22px;
    background: var(--paper);
    font-size: clamp(0.78rem, 3.5vw, 0.9rem);
    line-height: 1.12;
  }

  .about-trigger {
    top: 20px;
    right: 22px;
    min-height: 34px;
    padding: 5px 12px;
    font-size: 0.8125rem;
  }

  .portrait {
    position: relative;
    order: 1;
    inset: auto;
    z-index: 0;
    flex: none;
    width: 100%;
    height: clamp(390px, 62svh, 680px);
    background-position: 66% center;
  }

  .quote {
    position: relative;
    order: 2;
    top: auto;
    left: auto;
    z-index: 1;
    width: 100%;
    max-width: none;
    padding: 32px 22px 36px;
    transform: none;
    background: var(--paper);
  }

  .quote p {
    max-width: 620px;
    font-size: clamp(1.45rem, 6.4vw, 2.15rem);
    line-height: 1.03;
  }

  .quote cite {
    margin-top: 18px;
    font-size: 0.75rem;
    text-align: right;
  }

  .projects {
    position: relative;
    order: 3;
    bottom: auto;
    grid-template-columns: 1fr;
    overflow: visible;
    border-top: 0;
    color: var(--ink);
    background: var(--paper) url("./assets/agent-collage.png") 18% center / cover no-repeat;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .projects a {
    min-height: 80px;
    gap: 12px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(17, 16, 15, 0.22);
    background: rgba(244, 234, 215, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 1rem;
    white-space: normal;
  }

  .projects a:last-child { border-bottom: 0; }

  .projects a:hover {
    color: var(--ink);
    background: rgba(244, 234, 215, 0.84);
  }

  .project-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }

  .projects small {
    max-width: none;
    overflow: visible;
    font-size: 0.875rem;
    white-space: normal;
  }

  .orbit { display: none; }
}
