:root {
  --ink: #181818;
  --body: #242424;
  --muted: #666666;
  --frame: #f0f0f0;
  --paper: #ffffff;
  --content-width: 600px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  scroll-behavior: smooth;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  min-width: 320px;
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a,
button { font: inherit; }

a { color: inherit; }

button { color: inherit; }

img { display: block; max-width: 100%; }

h1,
h2,
h3,
p { margin: 0; }

h1,
h2,
h3 { color: var(--ink); font-weight: 500; }

h1 { font-size: 15px; line-height: 1.35; }

h2 { font-size: 14px; line-height: 1.4; }

h3 { font-size: 14px; line-height: 1.45; }

.top-fade {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 80px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(255, 255, 255, .84) 43%, rgba(255, 255, 255, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(#000 0 48%, transparent 100%);
}

.site-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 112px 0 0;
}

.site-shell section { scroll-margin-top: 96px; }

.about { padding-bottom: 92px; }

.identity-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.portrait {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 30%;
  background: var(--frame);
}

.identity-copy { display: grid; gap: 2px; }

.identity-copy p,
.section-heading p,
.experience-entry p,
.work-card figcaption span:last-child { color: var(--muted); }

.social-links { display: flex; gap: 2px; }

.social-links a {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--ink);
  background: var(--frame);
  outline: none;
}

.intro-copy {
  display: grid;
  max-width: 565px;
  gap: 16px;
  margin-top: 36px;
  font-size: 15px;
  line-height: 1.65;
}

.intro-copy p:last-of-type { color: var(--muted); }

.contact-button {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s ease, transform .2s ease;
}

.contact-button:hover {
  background: #303030;
  color: #ffffff;
}

.contact-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.contact-button:active {
  transform: translateY(1px);
}

.experience { padding-bottom: 112px; }

.experience > h2 { margin-bottom: 24px; }

.experience-list { border-top: 1px solid var(--frame); }

.experience-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--frame);
}

.experience-entry > div { display: grid; gap: 3px; }

.experience-entry__company-link {
  text-decoration: none;
}

.experience-entry__company-link:hover,
.experience-entry__company-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.experience-entry__company-link:focus-visible,
.project-entry__link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.experience-entry__date {
  white-space: nowrap;
  text-align: right;
}

.awards { padding-bottom: 112px; }

.awards > h2 { margin-bottom: 24px; }

.project-entry {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.project-entry__frame {
  width: 98px;
  height: 74px;
  border-radius: 8px;
  background: #F2F4F6;
}

.project-entry__content { display: grid; gap: 4px; }

.project-entry__content p { color: var(--muted); }

.project-entry__link { text-decoration: none; }

.project-entry__link:hover,
.project-entry__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-scramble] {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

.scramble-link__label.is-scrambling { color: transparent; }

.scramble-link__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  white-space: pre;
}

.selected-work { padding-bottom: 32px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: baseline;
  margin-bottom: 24px;
}

.work-list { display: grid; gap: 56px; }

.work-card { margin: 0; }

.work-card__frame {
  width: 100%;
  aspect-ratio: 5 / 3;
  background: #F2F4F6;
}

.work-card figcaption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-top: 12px;
  font-size: 13px;
}

.work-card figcaption span:first-child {
  color: var(--ink);
  font-weight: 500;
}

.site-footer {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 120px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: center;
}

.floating-nav {
  position: fixed;
  z-index: 50;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(24, 24, 24, .06);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 10px 30px rgba(24, 24, 24, .08);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.floating-nav__link {
  min-width: 68px;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.floating-nav__link:hover,
.floating-nav__link:focus-visible {
  color: var(--ink);
  outline: none;
}

.floating-nav__link.is-active {
  color: var(--ink);
  background: rgba(24, 24, 24, .06);
}

.gmt-clock {
  position: fixed;
  z-index: 40;
  right: 24px;
  bottom: 51.5px;
  display: inline-flex;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  pointer-events: none;
  text-align: right;
  transform: translateY(50%);
  white-space: nowrap;
}

@media (min-width: 641px) {
  .site-shell { padding-bottom: 120px; }

  .site-footer {
    position: fixed;
    z-index: 40;
    left: 24px;
    bottom: 51.5px;
    width: auto;
    margin: 0;
    padding: 0;
    pointer-events: none;
    text-align: left;
    transform: translateY(50%);
  }
}

@media (max-width: 640px) {
  .site-shell { padding-top: 88px; }

  .about { padding-bottom: 72px; }

  .identity-row {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 14px;
  }

  .portrait {
    width: 56px;
    height: 56px;
    border-radius: 10px;
  }

  .social-links {
    grid-column: 1 / -1;
    margin-top: 6px;
  }

  .intro-copy {
    margin-top: 28px;
    font-size: 14px;
  }

  .experience { padding-bottom: 88px; }

  .experience-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .experience-entry__date { text-align: left; }

  .awards { padding-bottom: 88px; }

  .project-entry {
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
  }

  .selected-work { padding-bottom: 32px; }

  .section-heading { display: grid; gap: 4px; }

  .work-list { gap: 44px; }

  .work-card figcaption { display: grid; gap: 2px; }

  .site-footer { padding-bottom: 0; }

  .gmt-clock {
    position: static;
    right: auto;
    bottom: auto;
    display: flex;
    width: fit-content;
    margin: 16px auto 120px;
    text-align: center;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .scramble-link__label.is-scrambling { color: inherit; }

  .scramble-link__overlay { display: none; }
}
