:root {
  color-scheme: dark;
  --accent: #ee843e;
  --background: #2c2c2c;
  --surface: #222;
  --text: #dedede;
  --muted: #aaa;
  --border: #3b3b3b;
  --content-width: 1120px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--background);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: #ffac74;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 16px;
  padding: 8px 16px;
  background: var(--surface);
  transform: translateY(-200%);
  z-index: 1;
}

.skip-link:focus {
  transform: translateY(0);
}

html {
  scroll-padding-top: 88px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 3px solid var(--accent);
}

.header-inner {
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
  text-decoration: none;
}

.logo-name {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.bracket {
  color: var(--text);
  font-size: 64px;
  line-height: 1;
}

.social {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

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

.social svg {
  width: 23px;
  height: 23px;
}

.content {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 40px 32px 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 28px;
  flex: 1;
}

section {
  min-width: 0;
  padding: 28px;
  background: var(--surface);
  border-radius: 6px;
}

h1,
h2 {
  margin: 0 0 24px;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.4px;
}

p {
  margin: 0 0 20px;
}

.profile-photo {
  float: right;
  width: 144px;
  height: 144px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 0 20px 24px;
}

#about {
  display: flow-root;
}

.experience-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding-block: 16px;
  border-bottom: 1px solid var(--border);
}

.experience-item:first-child {
  padding-top: 0;
}

.experience-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.experience-dates {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  align-self: center;
}

h3,
h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.subsection-heading {
  margin-top: 32px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 21px;
}

.section-note {
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.work-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.work-list li + li {
  margin-top: 20px;
}

.work-list h3 {
  margin-bottom: 6px;
}

.work-list p,
.earlier-role > p:last-child:not(.section-note) {
  margin: 0;
  font-size: 15px;
}

.earlier-role {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.earlier-role h4 {
  margin-bottom: 8px;
}

.unlinked-employer {
  color: var(--accent);
}

.expertise-list {
  margin: 0;
  font-size: 15px;
}

.expertise-list dt {
  margin-top: 16px;
  font-weight: 600;
}

.expertise-list dt:first-child {
  margin-top: 0;
}

.expertise-list dd {
  margin: 4px 0 0;
}

.site-footer {
  width: 100%;
  max-width: var(--content-width);
  margin-inline: auto;
  padding: 20px 32px 28px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 28px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 20px;
    gap: 12px;
  }

  .logo {
    gap: 4px;
  }

  .logo-name {
    font-size: 19px;
  }

  .bracket {
    font-size: 52px;
  }

  .social {
    gap: 0;
  }

  .content {
    padding: 24px 16px 32px;
    gap: 20px;
  }

  section {
    padding: 24px 20px;
  }

  .profile-photo {
    width: 104px;
    height: 104px;
    margin-left: 16px;
    margin-bottom: 12px;
  }

  .site-footer {
    padding-inline: 20px;
  }
}

@media (max-width: 360px) {
  .header-inner {
    padding-inline: 16px;
  }

  .profile-photo {
    float: none;
    margin: 0 0 20px;
  }
}

.employer-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}

.employer-parent {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

#experience h3 {
  font-size: 20px;
  line-height: 1.4;
}

#experience h4 {
  font-weight: 500;
}

/* Compact pinned header, toggled by the scroll script in index.html */
.header-inner,
.logo,
.logo-name,
.bracket {
  transition: padding 0.2s ease, font-size 0.2s ease, gap 0.2s ease;
}

.site-header.is-compact .header-inner {
  padding-block: 8px;
}

.site-header.is-compact .logo-name {
  font-size: 16px;
}

.site-header.is-compact .bracket {
  font-size: 36px;
}

@media (prefers-reduced-motion: reduce) {
  .header-inner,
  .logo,
  .logo-name,
  .bracket {
    transition: none;
  }
}
