:root {
  color-scheme: dark;
  --bg: #101010;
  --surface: #161616;
  --text: #f0f0ee;
  --muted: #b2b2ae;
  --faint: #90908b;
  --border: #2d2d2b;
  --accent: #ff5b5b;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --container: 1040px;
  --gutter: 28px;
  --header-height: 64px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  isolation: isolate;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

body.lightbox-open {
  overflow: hidden;
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
}

ul {
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  color: inherit;
  font: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
  transform: translate(-50%, -160%);
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.is-stuck {
  border-bottom-color: var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: 28px;
}

.logo {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.logo-mark {
  display: none;
}

.primary-nav {
  margin-inline: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--muted);
  font-size: 13px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.resume-link {
  font-size: 13px;
  color: var(--muted);
}

.resume-link:hover {
  color: var(--text);
}

.resume-link svg {
  display: none;
}

.menu-toggle {
  display: none;
  width: 30px;
  height: 30px;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  margin-block: 4px;
  background: var(--text);
}

/* Hero */

.hero {
  padding-block: 100px 112px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: clamp(48px, 9vw, 112px);
  align-items: center;
}

.hero-kicker {
  margin-bottom: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 650;
}

.hero-lede {
  max-width: 630px;
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
}

.hero-availability {
  margin-top: 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.company-link {
  padding-bottom: 1px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  color: var(--text);
}

.company-link::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.25em;
  color: var(--accent);
  font-size: 0.65em;
  transition: transform 160ms ease;
  vertical-align: 0.25em;
}

.company-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.company-link:hover::after,
.external-arrow-link:hover::after {
  transform: translate(2px, -2px);
}

.external-arrow-link::after,
.down-arrow-link::after {
  display: inline-block;
  margin-left: 0.3em;
  color: var(--accent);
  transition: transform 160ms ease;
}

.external-arrow-link::after {
  content: "↗";
}

.down-arrow-link::after {
  content: "↓";
}

.down-arrow-link:hover::after {
  transform: translateY(2px);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 32px;
}

.hero-links a,
.contact-links a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.hero-links a:hover,
.contact-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.portrait {
  position: relative;
  width: 250px;
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 3px;
}

.hero-fact {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 220px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.hero-fact span {
  margin-bottom: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-fact strong {
  font-size: 13px;
  font-weight: 600;
}

.hero-fact small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.hero-fact-education {
  top: 18px;
  right: -54px;
}

.hero-fact-current {
  bottom: -18px;
  left: -54px;
}

/* Shared sections */

.section {
  padding-block: 84px;
}

.section-head {
  margin-bottom: 42px;
}

.section-head h2 {
  font-size: 20px;
  font-weight: 620;
}

.section-head p {
  margin-top: 10px;
  color: var(--muted);
}

.eyebrow {
  display: none;
}

/* Experience */

.timeline {
  max-width: 820px;
}

.timeline-item {
  padding: 0;
}

.role-head,
.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}

.role-head h3 {
  font-size: 26px;
  font-weight: 620;
}

.role-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.role-logo {
  width: clamp(140px, 17vw, 168px);
  height: auto;
}

.role-logo-link span {
  color: var(--accent);
  font-size: 13px;
  transition: transform 160ms ease;
}

.role-logo-link:hover span {
  transform: translate(2px, -2px);
}

.role-meta,
.project-date {
  flex-shrink: 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.role-title {
  margin-top: 7px;
  color: var(--accent);
  font-size: 14px;
}

.role-summary,
.project-summary {
  max-width: 700px;
  margin-top: 18px;
  color: var(--muted);
}

.bullets {
  display: grid;
  gap: 9px;
  max-width: 740px;
  margin-top: 22px;
  padding-left: 19px;
  color: var(--muted);
  font-size: 14px;
}

.bullets strong {
  color: var(--text);
  font-weight: 600;
}

/* Projects */

.projects {
  display: grid;
  gap: 0;
}

.project {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 20px;
  padding-block: 38px;
  border-top: 1px solid var(--border);
}

.project:first-child {
  padding-top: 0;
  border-top: 0;
}

.project-index {
  padding-top: 5px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

.project-head h3 {
  font-size: clamp(23px, 3vw, 30px);
  font-weight: 620;
}

.project-summary {
  font-size: 15px;
}

.project-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-top: 24px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

.tag {
  display: inline;
}

.tag + .tag::before {
  content: "·";
  margin-inline: 7px;
}

.demo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}

.demo-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.demo-link svg {
  display: block;
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.demo-link:hover svg {
  transform: translateX(3px);
}

/* Tools */

.skills-grid {
  max-width: 820px;
  border-bottom: 1px solid var(--border);
}

.skill-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  align-items: baseline;
  gap: 30px;
  padding-block: 18px;
  border-top: 1px solid var(--border);
}

.skill-card h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.skill-icon {
  display: none;
}

.skill-card .tag-row {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 14px;
}

/* Photos */

.photos-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}

.photos-intro .section-head {
  margin-bottom: 0;
}

.gallery-filters {
  display: flex;
  gap: 18px;
}

.gallery-filter {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  font-size: 12px;
  cursor: pointer;
}

.gallery-filter span {
  margin-left: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.gallery-filter:hover {
  color: var(--text);
}

.gallery-filter.active {
  border-bottom-color: var(--accent);
  color: var(--text);
}

.photo-grid {
  columns: 4 200px;
  column-gap: 10px;
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  break-inside: avoid;
  border: 0;
  border-radius: 2px;
  background: var(--surface);
  cursor: zoom-in;
}

.photo-card[hidden] {
  display: none;
}

.photo-card::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 180ms ease;
}

.photo-card img {
  width: 100%;
  height: auto;
  transition: transform 300ms ease;
}

.photo-location {
  position: absolute;
  right: 13px;
  bottom: 11px;
  left: 13px;
  z-index: 2;
  display: block;
  color: #fff;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.photo-card:hover::after,
.photo-card:focus-visible::after,
.photo-card:hover .photo-location,
.photo-card:focus-visible .photo-location {
  opacity: 1;
}

.photo-card:hover .photo-location,
.photo-card:focus-visible .photo-location {
  transform: none;
}

.photo-card:hover img,
.photo-card:focus-visible img {
  transform: scale(1.015);
}

.camera-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  margin: 28px auto 0;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 11px;
}

.camera-note[hidden] {
  display: none;
}

.camera-note svg {
  width: 13px;
  height: 13px;
}

/* Contact and footer */

.contact-simple {
  max-width: 660px;
}

.contact-simple > p {
  color: var(--muted);
  font-size: 18px;
}

.contact-email {
  display: inline-block;
  margin-top: 24px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--accent);
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 550;
}

.contact-email:hover {
  color: var(--accent);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 28px;
}

.site-footer {
  padding-block: 28px 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  gap: 9px;
  align-items: baseline;
  font-size: 12px;
}

.footer-brand strong {
  font-weight: 600;
}

.footer-brand span {
  color: var(--faint);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a {
  color: var(--muted);
  font-size: 12px;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: 2px;
}

.footer-social-link {
  display: grid;
  place-items: center;
  width: 20px;
  height: 24px;
  transition: color 160ms ease, transform 160ms ease;
}

.footer-social-link svg {
  width: 16px;
  height: 16px;
}

.footer-social-link:hover {
  transform: translateY(-2px);
}

/* Lightbox */

.lightbox {
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: #fff;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.93);
}

.lightbox-stage {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 52px 22px 22px;
}

.lightbox figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.lightbox-image {
  width: auto;
  max-width: min(100%, 1100px);
  height: auto;
  max-height: calc(100dvh - 110px);
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.lightbox-close,
.lightbox-nav {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-close svg,
.lightbox-nav svg {
  width: 18px;
  height: 18px;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
}

.lightbox-prev {
  justify-self: start;
}

.lightbox-next {
  justify-self: end;
}

/* Responsive */

@media (max-width: 860px) {
  :root {
    --gutter: 22px;
  }

  .primary-nav {
    position: absolute;
    top: var(--header-height);
    right: var(--gutter);
    left: var(--gutter);
    display: none;
    padding: 14px;
    border: 1px solid var(--border);
    background: var(--bg);
  }

  .primary-nav.open {
    display: block;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-links a {
    display: block;
    padding: 8px;
  }

  .nav-links a.active::after {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    padding-block: 72px 82px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 210px;
    gap: 44px;
  }

  .portrait {
    width: 210px;
  }

  .photo-grid {
    columns: 3 170px;
  }
}

@media (max-width: 620px) {
  :root {
    --gutter: 18px;
  }

  .resume-link {
    display: none;
  }

  .hero {
    padding-block: 54px 68px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .hero-copy {
    order: 1;
  }

  .portrait {
    order: 0;
    width: clamp(190px, 60vw, 230px);
  }

  .hero-fact {
    padding: 9px 11px;
  }

  .hero-fact-education {
    top: 12px;
    right: -100px;
  }

  .hero-fact-current {
    bottom: -16px;
    left: 84px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .section {
    padding-block: 62px;
  }

  .role-head,
  .project-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .project {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  .project-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .skill-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .photos-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-filters {
    width: 100%;
    gap: 16px;
    overflow-x: auto;
  }

  .gallery-filter {
    flex: 0 0 auto;
  }

  .photo-grid {
    columns: 2 130px;
    column-gap: 7px;
  }

  .photo-card {
    margin-bottom: 7px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .lightbox-stage {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    padding-inline: 8px;
  }

  .lightbox-nav {
    width: 34px;
    height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .portrait,
  .photos-section,
  .site-footer {
    display: none;
  }
}
