:root {
  /* Motion tokens (Emil Kowalski principles: fast, ease-out, interruptible) */
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-instant: 120ms;
  /* Theme tokens */
  --accent: #0391FF;
  --accent-hover: #4db4ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #FCFCFC;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', sans-serif;
  font-size: 14px;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  color: rgba(0, 0, 0, 0.45);
  -webkit-font-smoothing: antialiased;
}

.main {
  max-width: 582px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 57px 24px 40px;
  display: flex;
  flex-direction: column;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  gap: 14px;
  /* on narrow screens the buttons wrap onto their own line */
  flex-wrap: wrap;
  row-gap: 16px;
}

.header img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.header h1 {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  line-height: 21.7px;
  letter-spacing: -0.15px;
}

.header p {
  color: rgba(0, 0, 0, 0.45);
}

/* CTA buttons: right-aligned inside the header row */
.cta-row {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 21.7px;
  letter-spacing: -0.15px;
  text-decoration: none;
  transition: background-color var(--duration-instant) var(--ease-out), color var(--duration-instant) var(--ease-out);
}

.btn-primary {
  background: var(--accent);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
  background: #f5f5f5;
  color: #000;
}

/* Intro */
.intro p {
  color: #000;
}

.intro p + p {
  padding-top: 14px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
  transition: color var(--duration-instant) var(--ease-out);
}

a:hover {
  color: var(--accent-hover);
}

/* Work */
.work h2,
.logos h2 {
  font-size: 12px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.25);
  line-height: 18.6px;
  letter-spacing: 0;
  padding-bottom: 14px;
}

.work ul {
  list-style: none;
}

.work li {
  transition: opacity var(--duration-fast) var(--ease-out);
}

/* Dim only when hovering a linked row; static rows are inert */
.work ul:has(a.row:hover) li {
  opacity: 0.3;
}

.work ul:has(a.row:hover) li:has(a.row:hover) {
  opacity: 1;
}

.work .row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 0;
  white-space: nowrap;
  text-decoration: none;
  color: inherit;
}

div.row {
  cursor: default;
}

/* Separators live on the rows themselves so the hover target is
   gapless: every pixel between rows belongs to exactly one row */
.work li + li .row {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.work li:last-child .row {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.work .company {
  color: #000;
  flex-shrink: 0;
}

.work a.row:hover .company {
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.work .role {
  color: rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
}

.work .period {
  color: rgba(0, 0, 0, 0.25);
  margin-left: auto;
  flex-shrink: 0;
}

/* Logo bar */
.logos ul {
  list-style: none;
  display: flex;
  align-items: center;
  /* first mark flush left, last one flush right */
  justify-content: space-between;
  gap: 30px;
}

.logos li {
  /* let wide marks shrink so the row never outgrows the column */
  min-width: 0;
  display: flex;
}

.logos img {
  max-height: 21px;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  /* client marks sit back as a quiet grey row */
  filter: grayscale(1) opacity(0.35);
}

/* Footer */
.footer {
  margin-top: auto;
  padding-top: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.footer p {
  font-size: 12px;
  line-height: 18.6px;
  letter-spacing: 0;
  color: rgba(0, 0, 0, 0.25);
}

.footer .details {
  position: relative;
  cursor: default;
  transition: color var(--duration-instant) var(--ease-out);
}

.footer .details:hover {
  color: rgba(0, 0, 0, 0.45);
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-underline-position: from-font;
}

.footer .tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  font-size: 12px;
  line-height: 18.6px;
  color: rgba(0, 0, 0, 0.45);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transform-origin: center bottom;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

.footer .details:hover .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Footer clock */
.footer .clock {
  font-variant-numeric: tabular-nums;
}

/* Mobile */
@media (max-width: 600px) {
  /* buttons drop under the name and start at the same left edge,
     with the same air above and below them */
  .header {
    /* the name block sits centred next to the taller avatar, so the row gap
       is 6px smaller than the space it actually renders */
    row-gap: 18px;
    margin-bottom: -32px;
  }

  .cta-row {
    margin-left: 0;
    width: 100%;
  }

  /* one row, tighter gaps so each mark can be a touch bigger */
  .logos ul {
    gap: 12px;
  }

  .logos img {
    max-height: 26px;
  }
}

/* Reduced motion: keep state changes, remove movement */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
