/* SECTIONS: styles for each part of the page, in page order. */

/* ---------- Shared by several sections ---------- */

/* Each section after the first screen: a centred column, with room above it */
.block { --col: 42rem; max-width: var(--col); margin: 0 auto; padding: 6rem 1rem 0; }
#projects, #github { --col: 60rem; }
main > .block:last-child { padding-bottom: 7rem; } /* keeps the tour button off the last line */
.block h2 {
  width: fit-content;
  margin-bottom: 1.25rem;
  color: var(--ink);
  font: 400 1.1rem var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.links { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 1rem; }
.links a {
  color: var(--ink);
  font: 400 0.8rem var(--mono);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}
.links a:hover { text-decoration-color: var(--ink); }

.block h2 span { color: var(--accent); }

/* Lists of entries: experience and certifications */
.rows { display: grid; }
.row { padding: 1rem 0; border-top: 1px solid var(--line); }
.row:first-child { padding-top: 0; border-top: 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.row h3 { font-size: 1rem; font-weight: 500; }
.row:hover h3 { color: var(--accent); }
.meta { flex: none; color: var(--faint); font: 400 0.75rem var(--mono); }
.org { color: var(--accent); font: 400 0.8rem var(--mono); }
.row p:not(.org) { margin-top: 0.3rem; color: var(--muted); }

/* Small labels: project tags and the stack list */
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.65rem; }
.tags li {
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  background: var(--soft);
  color: var(--muted);
  font: 400 0.72rem/1.6 var(--mono);
}

/* ---------- About: the landing hero ---------- */

/* The hero has its own colours for each mode, so the text always reads clearly over the video.
   --scrim is the colour of the fade laid over the video, and --a1 to --a3 and --ab say how strong it is. */
.home {
  --ink: #f4f4f5;
  --muted: rgb(244 244 245 / 0.78);
  --faint: rgb(244 244 245 / 0.52);
  --line: rgb(244 244 245 / 0.22);
  --paper: #0c0c0e;
  --soft: rgb(255 255 255 / 0.08);
  --scrim: 8 8 10;
  --a1: 0.9;
  --a2: 0.62;
  --a3: 0.08;
  --ab: 0.82;
}
:root[data-theme="light"] .home {
  --ink: #0a0a0a;
  --muted: #4a4a50;
  --faint: #6d6d72;
  --line: rgb(10 10 10 / 0.16);
  --paper: #fbf7f3;
  --soft: rgb(10 10 10 / 0.05);
  --accent-ink: #c23b32; /* the coral, a little darker, for small text on the light fade */
  --scrim: 251 247 243;
  --a1: 0.95;
  --a2: 0.78;
  --a3: 0.05;
  --ab: 0.92;
}
.home {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  min-height: calc(100dvh - 3.5rem);
  padding: 1.5rem 1rem 3.25rem;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
}

/* The video, with a fade over it so the text stays readable */
.hero-media { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--paper); }
.hero-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 56% 30%;
}
/* Covers the video while it fades out at the end and back in at the first frame (js/hero.js) */
.hero-dip { position: absolute; inset: 0; background: var(--paper); opacity: 0; transition: opacity 1s ease-in-out; pointer-events: none; }
.hero-media.dipped .hero-dip { opacity: 1; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(var(--scrim) / 0.96) 0%, rgb(var(--scrim) / 0.78) 42%, rgb(var(--scrim) / 0.22) 100%);
}

.home-main { display: flex; flex-direction: column; gap: 0.9rem; min-height: 0; }
.home-text { min-width: 0; }
.hello { color: var(--accent-ink, var(--accent)); font: 400 0.85rem var(--mono); }
h1 {
  width: fit-content;
  font: 400 clamp(2.4rem, 11vw, 4.6rem)/1.02 var(--display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
h1 br { display: none; }
.about { display: grid; gap: 0.75rem; margin-top: 1rem; color: var(--muted); line-height: 1.65; }
.about p { text-wrap: pretty; }
.about strong { color: var(--ink); font-weight: 600; white-space: nowrap; }

/* The changing role words, marked with a coral bar */
.role { position: relative; margin-top: 1rem; padding-left: 0.85rem; }
.role::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); transform-origin: top; }
.role-text {
  display: block;
  font: 400 clamp(1.4rem, 5.5vw, 2.2rem)/1.15 var(--display);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: opacity 0.26s, transform 0.26s;
}
.role-text.leaving { opacity: 0; transform: translateY(-8px); }

/* The two buttons */
.hero-buttons { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  backdrop-filter: blur(8px);
  font: 500 0.82rem/1 var(--mono);
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.hero-btn:hover { border-color: color-mix(in srgb, var(--ink) 55%, transparent); background: color-mix(in srgb, var(--ink) 14%, transparent); }
.hero-btn.primary { border-color: var(--accent); background: var(--accent); color: #0c0c0e; }
.hero-btn.primary:hover { background: color-mix(in srgb, var(--accent) 84%, #ffffff); border-color: transparent; }
.hero-btn span { transition: transform 0.18s; }
.hero-btn:hover span { transform: translateX(3px); }

/* "What I do": one panel with a row for each thing */
.home-side {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 62%, transparent);
  backdrop-filter: blur(12px);
}
.focus-label {
  padding: 0.6rem 0.9rem 0.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: 400 0.68rem var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.focus { display: grid; grid-template-columns: repeat(3, 1fr); }
.focus li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  font: 400 0.74rem/1.3 var(--mono);
}
.focus li + li { border-left: 1px solid var(--line); }
.focus .icon { color: var(--accent); }
.icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The strip under everything */
.home-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.home-bottom .links { margin-top: 0; }
.clock { display: flex; align-items: center; gap: 0.9rem; }
.clock-time {
  font: 400 2.4rem/1.1 var(--display);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.clock-place {
  color: var(--muted);
  font: 400 0.72rem/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Section buttons, on phones only: computers have the side menu */
.home-nav { display: flex; flex-wrap: wrap; gap: 0.4rem; width: 100%; }
.home-nav a {
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--faint);
  border-radius: 8px;
  font: 400 0.78rem var(--mono);
  text-decoration: none;
}

/* The entrance, in order. Each delay is the second it starts at, and the whole thing takes about four seconds.
   1. the video fades in and slowly settles   2. the menu slides in   3. the name rises, a line at a time
   4. the role bar draws, and the intro rises   5. the buttons, the panel and the strip pop up */
.hero-media { animation: enterFade 1.8s ease-out both; }
.hero-video { animation: enterSettle 3.2s var(--ease-out) both; }
.home .hello { animation: enterUp 1s var(--ease-out) 0.8s both; }
.line { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.08em 0.04em; margin: -0.08em -0.04em; }
.line > span { display: inline-block; animation: enterLine 1.3s var(--ease-out) both; animation-delay: calc(1s + var(--i, 0) * 0.28s); }
.role { animation: enterUp 1.1s var(--ease-out) 1.75s both; }
.role::before { animation: enterBar 1s var(--ease-out) 1.75s both; }
.about p:nth-child(1) { animation: enterUp 1.1s var(--ease-out) 2s both; }
.about p:nth-child(2) { animation: enterUp 1.1s var(--ease-out) 2.2s both; }
.hero-btn:nth-child(1) { animation: enterPop 1s var(--ease-pop) 2.5s both; }
.hero-btn:nth-child(2) { animation: enterPop 1s var(--ease-pop) 2.7s both; }
.home-side { animation: enterPop 1.1s var(--ease-pop) 2.9s both; }
.home-bottom { animation: enterUp 1.1s var(--ease-out) 3.1s both; }

/* Phones: the video takes the top of the screen and fades into the dark, so the text sits below the face */
@media (max-width: 1023px) {
  .hero-media {
    inset: 0 0 auto;
    height: 58%;
    -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent);
    mask-image: linear-gradient(180deg, #000 50%, transparent);
  }
  .hero-video { object-position: 50% 30%; }
  .hero-scrim { background: linear-gradient(0deg, rgb(var(--scrim) / 0.5) 0%, transparent 60%); }
}
@media (max-width: 640px) { .about p + p, .home-side { display: none; } }
@media (max-width: 1023px) and (max-height: 700px) { .about { display: none; } }

/* Computers: the video fills the page, with the text down the left and the tiles at the bottom right */
@media (min-width: 1024px) {
  .home {
    gap: 0;
    height: 100dvh;
    min-height: 0;
    padding: 0 0 0 var(--sidebar); /* the side menu sits in this space */
  }
  .hero-media { inset: 0 0 0 var(--sidebar); height: auto; -webkit-mask-image: none; mask-image: none; }
  .hero-video { object-position: 50% 30%; }
  .hero-scrim {
    background:
      linear-gradient(90deg, rgb(var(--scrim) / var(--a1)) 0%, rgb(var(--scrim) / var(--a2)) 32%, rgb(var(--scrim) / var(--a3)) 62%),
      linear-gradient(0deg, rgb(var(--scrim) / var(--ab)) 0%, transparent 34%);
  }
  .home-main {
    flex: 1;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 0 3rem;
  }
  .home-text { max-width: clamp(22rem, 36vw, 34rem); }
  .home-side { align-self: flex-end; width: clamp(12.5rem, 16vw, 15rem); margin-bottom: 1.75rem; }
  h1 { font-size: clamp(3.2rem, 5.6vw, 5.6rem); }
  h1 br { display: inline; }
  .hello { margin-bottom: 0.35rem; font-size: 0.95rem; }
  .role { margin-top: 1.25rem; }
  .role-text { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
  .about { max-width: 30rem; font-size: 1rem; }
  .hero-buttons { margin-top: 1.5rem; }
  .focus { grid-template-columns: 1fr; }
  .focus li { flex-direction: row; align-items: center; gap: 0.7rem; padding: 0.8rem 1rem; }
  .focus li + li { border-top: 1px solid var(--line); border-left: 0; }
  /* A thin line across the bottom holds the clock and the links */
  .home-bottom { margin: 0 3rem; padding: 1rem 0 1.5rem; }
  .clock-time { font-size: 2.4rem; }
  .home-nav { display: none; }
}

/* ---------- Projects ---------- */

/* An index of rows divided by thin lines, not a stack of rounded cards */
.works { display: grid; border-bottom: 1px solid var(--line); }
.work {
  display: grid;
  gap: 1.25rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
/* Wider screens: picture and details side by side, swapping sides every second row */
@media (min-width: 860px) {
  .work {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 2.75rem;
    align-items: stretch;
    padding: 2.75rem 0;
  }
  .work:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .work:nth-child(even) .work-text { order: -1; }
  .work .preview { align-self: center; } /* keeps its 16:10 shape when the text is taller */
}

/* The picture panel */
.preview {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  transition: border-color 0.2s;
}
.work:hover .preview { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.preview-scroll { height: 100%; overflow: hidden; }
.preview.open .preview-scroll { overflow-y: auto; overscroll-behavior: contain; }
.preview-scroll img { display: block; width: 100%; }
.preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #ffffff; }
.preview-phone { background: var(--soft); }
.preview.live .preview-scroll { visibility: hidden; }

/* An iPhone for mobile apps. js/previews.js sets --scale to fit the panel. */
.iphone {
  --scale: 0.6;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 417px;
  height: 876px;
  padding: 12px;
  border-radius: 62px;
  background: #0b0b0d;
  box-shadow: 0 0 0 2px #3c3c44, 0 24px 60px rgb(0 0 0 / 0.45);
  transform: translate(-50%, -50%) scale(var(--scale));
}
.iphone::before, .iphone::after {
  content: "";
  position: absolute;
  width: 4px;
  border-radius: 3px;
  background: #3c3c44;
}
.iphone::before { top: 190px; left: -5px; height: 120px; }
.iphone::after { top: 230px; right: -5px; height: 96px; }
.iphone-screen { position: relative; width: 393px; height: 852px; overflow: hidden; border-radius: 50px; background: #000000; }
.preview .iphone iframe, .preview .iphone img { position: absolute; inset: 0; width: 393px; height: 852px; object-fit: cover; }
.iphone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 118px;
  height: 34px;
  border-radius: 999px;
  background: #000000;
  pointer-events: none;
  transform: translateX(-50%);
}

.preview-press {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  border: 0;
  background: none;
}
.preview-press span {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgb(10 10 10 / 0.8);
  color: #ffffff;
  font: 400 0.75rem var(--mono);
  transition: transform 0.15s;
}
.preview-press:hover span { transform: translateY(-2px); }
.preview.open .preview-press { display: none; }

.preview-actions { position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2; display: flex; gap: 0.4rem; }
.preview-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 10px;
  background: rgb(10 10 10 / 0.85);
  color: #ffffff;
  font: 400 0.72rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.preview-actions .icon { width: 1rem; height: 1rem; }
.preview-close { display: none !important; }
.preview.open .preview-close { display: inline-flex !important; }

/* The details beside the picture */
.work-text { display: flex; flex-direction: column; min-width: 0; }
/* A big outlined number, then "/ 05" and the year */
.work-meta {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--faint);
  font: 400 0.72rem var(--mono);
  letter-spacing: 0.08em;
}
.work-index {
  color: transparent;
  font: 400 clamp(3rem, 8vw, 4.5rem)/0.85 var(--display);
  letter-spacing: 0.01em;
  -webkit-text-stroke: 1px var(--accent);
  transition: color 0.25s;
}
.work:hover .work-index { color: var(--accent); }
.work-year { margin-left: auto; padding: 0.1rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.work h3 {
  margin-top: 0.9rem;
  font: 400 clamp(1.9rem, 4.5vw, 2.6rem)/1 var(--display);
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.work-desc { margin-top: 0.7rem; color: var(--muted); text-wrap: pretty; }
/* The stack, as a spec line: a label, then the tools split by slashes */
.work-spec {
  display: grid;
  gap: 0.3rem;
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--line);
  font: 400 0.74rem/1.6 var(--mono);
}
.work-spec dt { color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.work-spec dd { color: var(--ink); }
.work-spec dd span + span::before { content: " / "; color: var(--faint); }
/* Live and Code: square buttons pinned to the bottom of the column */
.work-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; padding-top: 0; }
@media (min-width: 860px) { .work-links { margin-top: auto; padding-top: 1.5rem; } }
.work-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font: 400 0.74rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.work-links a:hover { border-color: var(--ink); }
.work-links a:first-child { border-color: var(--accent); background: var(--accent); color: #0c0c0e; }
.work-links a:first-child:hover { background: color-mix(in srgb, var(--accent) 84%, #ffffff); }
.work-links a span { transition: transform 0.15s; }
.work-links a:hover span { transform: translate(2px, -2px); }

/* ---------- Stack ---------- */

.stack-groups { display: grid; gap: 1.75rem; }
.stack-label {
  margin-bottom: 0.7rem;
  color: var(--accent);
  font: 400 0.78rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tools { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tools li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
  font: 400 0.85rem var(--mono);
  transition: border-color 0.15s;
}
.tools li:hover { border-color: var(--accent); }
.tools svg { flex: none; width: 1rem; height: 1rem; fill: currentColor; }

/* ---------- GitHub ---------- */

.github-activity { margin-bottom: 1.25rem; }
.github-activity[hidden] { display: none; }
.github-graph {
  padding: 0.75rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
}
.github-graph img { display: block; width: 100%; min-width: 640px; }
:root[data-theme="dark"] .for-light, :root[data-theme="light"] .for-dark { display: none; }
.github-note { color: var(--muted); }
.github-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; margin-bottom: 1.25rem; }
.github-stats li {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
  color: var(--muted);
  font: 400 0.72rem/1.4 var(--mono);
}
.github-stats strong { display: block; color: var(--ink); font: 400 1.25rem/1.25 var(--display); letter-spacing: 0.02em; }
.repos { display: grid; gap: 0.6rem; }
.repos a {
  display: block;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 60%, transparent);
  text-decoration: none;
  transition: border-color 0.15s;
}
.repos a:hover { border-color: var(--accent); }
.repos h3 { font-size: 1rem; font-weight: 500; overflow-wrap: anywhere; }
.repos h3 span { color: var(--accent); }
.repos p { margin-top: 0.15rem; color: var(--muted); font-size: 0.9rem; }
.repos .meta { display: block; margin-top: 0.25rem; }

@media (min-width: 720px) {
  .repos { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Contact ---------- */

.contact-list { display: grid; gap: 1.75rem 1.25rem; }
/* Each item is a column: label, link, then its card stretched so cards in a row match in height */
.contact-list li { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.contact-list li .profile { flex: 1; align-content: center; width: 100%; max-width: none; }
.contact-list .stack-label { display: block; margin-bottom: 0.25rem; }
/* Wider screens: email across the top, the rest side by side in pairs */
@media (min-width: 640px) {
  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-list li:first-child { grid-column: 1 / -1; }
}
.contact-list a {
  font: 400 clamp(1.25rem, 5vw, 1.6rem)/1.2 var(--display);
  letter-spacing: 0.015em;
  overflow-wrap: anywhere;
  text-decoration-color: var(--line);
  text-underline-offset: 5px;
  transition: text-decoration-color 0.15s;
}
.contact-list a:hover { text-decoration-color: var(--ink); }

/* A note above the list, and a small profile card under each link so visitors can check it's really you */
.contact-note { max-width: 32rem; margin-bottom: 1.5rem; color: var(--muted); font: 400 0.8rem/1.6 var(--mono); }
.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.85rem;
  max-width: 28rem;
  margin-top: 0.8rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--soft);
}
.profile-photo { position: relative; flex: none; width: 2.75rem; height: 2.75rem; }
.profile-initial {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent);
  font: 400 1.2rem/1 var(--display);
}
.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  object-fit: cover;
  object-position: 50% 18%;
}
/* The small platform icon on the corner of the photo */
.profile-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
}
.profile-badge .icon { width: 0.72rem; height: 0.72rem; }
.profile-info { min-width: 0; flex: 1 1 11rem; }
/* In the paired columns the tag always sits under the name, lined up with the text */
@media (min-width: 640px) {
  .contact-list li:not(:first-child) .profile-info { flex-basis: calc(100% - 3.6rem); }
  .contact-list li:not(:first-child) .profile-tag { margin-left: 3.6rem; }
}
.profile-name {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font: 600 0.92rem/1.3 var(--sans);
  overflow-wrap: anywhere;
}
.profile-check { display: inline-flex; color: var(--accent); }
.profile-check .icon { width: 0.95rem; height: 0.95rem; }
.profile-meta { color: var(--muted); font: 400 0.74rem/1.5 var(--mono); overflow-wrap: anywhere; }
.profile-tag {
  flex: none;
  margin-left: auto; /* on the right when it fits beside the name, otherwise it drops to its own line */
  padding: 0.15rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 999px;
  color: var(--accent);
  font: 400 0.66rem/1.5 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
/* The resume's card has a file icon where the photo would be */
.profile-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--accent);
}
.profile-icon .icon { width: 1.2rem; height: 1.2rem; }
@media (max-width: 520px) {
  .profile-tag { margin-left: 3.6rem; }
}

/* Short phones: tighter text so the about page still fits */
@media (max-width: 1023px) and (max-height: 700px) {
  .about { font-size: 0.87rem; line-height: 1.5; }
  .focus li { flex-direction: row; align-items: center; padding: 0.35rem 0.45rem; font-size: 0.66rem; }
  .focus .icon { flex: none; width: 0.95rem; height: 0.95rem; }
  .clock-time { font-size: 2rem; }
}
