@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --background: hsl(240 10% 3.9%);
  --foreground: hsl(0 0% 98%);
  --muted-foreground: hsl(240 5% 64.9%);
  --border: hsl(240 3.7% 15.9%);
  --hover-bg: hsl(240 3.7% 8%);

  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  --page-max: 1050px;
  --side-pad: clamp(24px, 8vw, 160px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--background);
}

body {
  margin: 0;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  display: block;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--foreground);
  color: var(--background);
  padding: 8px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: var(--side-pad);
}

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

.wrap {
  padding-left: var(--side-pad);
  padding-right: 24px;
}

/* Header */

.site-header {
  padding-top: clamp(40px, 6vw, 80px);
  max-width: var(--page-max);
}

.header-top {
  display: grid;
  grid-template-columns: max-content auto;
  grid-template-areas:
    "title  avatar"
    "intro  avatar";
  align-items: start;
  column-gap: clamp(20px, 4vw, 40px);
  margin-bottom: 40px;
}

h1 {
  grid-area: title;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(48px, 9vw, 96px);
  letter-spacing: -0.055em;
  line-height: 0.92;
  margin: 0 0 24px;
}

.avatar {
  grid-area: avatar;
  align-self: center;
  justify-self: start;
}
.avatar img {
  width: clamp(64px, 9vw, 120px);
  height: clamp(64px, 9vw, 120px);
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.intro {
  grid-area: intro;
  color: var(--muted-foreground);
  font-size: 18px;
  max-width: 620px;
  margin: 0;
}
.intro strong {
  color: var(--foreground);
  font-weight: 600;
}

.site-nav {
  display: flex;
  gap: clamp(20px, 4vw, 48px);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  overflow-x: auto;
}
.site-nav a {
  color: var(--muted-foreground);
  font-size: 15px;
  white-space: nowrap;
}
.site-nav a.active {
  color: var(--foreground);
  font-weight: 600;
}

/* Sections */

main {
  max-width: var(--page-max);
}

.section {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 64px 0;
  border-bottom: 1px solid var(--border);
}
.section:last-child {
  border-bottom: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.section-content p {
  margin: 0;
  max-width: 620px;
}

/* Skills accordion */

.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-item:first-child {
  border-top: 1px solid var(--border);
}

.accordion-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  color: var(--foreground);
  font-family: var(--font-sans);
  cursor: pointer;
  padding: 20px 0;
  gap: 20px;
  text-align: left;
}

.accordion-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
  width: 20px;
}

.accordion-title {
  flex: 1;
  font-size: 18px;
}

.accordion-icon {
  font-family: var(--font-mono);
  color: var(--muted-foreground);
  transition: transform 0.2s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(45deg);
}

.accordion-panel {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}
.accordion-panel ul {
  list-style: none;
  margin: 0;
  padding: 0 0 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.accordion-panel a {
  color: var(--muted-foreground);
  font-size: 15px;
}
.accordion-panel a:hover {
  color: var(--foreground);
}

.cv-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
  margin: 0 0 16px 40px;
}
.accordion-panel ul li {
  color: var(--muted-foreground);
  font-size: 15px;
  line-height: 1.5;
}

.cv-mission {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cv-mission-title {
  color: var(--foreground);
  font-weight: 600;
  font-size: 15px;
  margin: 0;
}
.cv-mission-result {
  color: var(--muted-foreground);
  font-size: 14px;
  margin: 0;
}
.accordion-panel ul.cv-mission-actions {
  list-style: disc;
  margin: 4px 0 0;
  padding: 0 0 0 20px;
  gap: 6px;
}
.cv-mission-actions li {
  font-size: 14px;
  line-height: 1.5;
}

/* Projects */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.project-card {
  padding: 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
a.project-card:hover {
  color: var(--foreground);
  background: var(--hover-bg);
}
.project-title {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}

.project-desc {
  color: var(--muted-foreground);
  font-size: 14px;
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  color: var(--muted-foreground);
  font-size: 15px;
}
.more-link:hover {
  color: var(--foreground);
}

.arrow {
  font-size: 0.85em;
}

/* Elsewhere */

.elsewhere-links {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 40px);
}
.elsewhere-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-foreground);
  font-size: 15px;
}
.elsewhere-links a:hover {
  color: var(--foreground);
}

/* Footer */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--page-max);
  border-top: 1px solid var(--border);
  padding: 24px 24px 40px 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}
.site-footer a:hover {
  color: var(--foreground);
}

/* Responsive */

@media (max-width: 900px) {
  .header-top {
    grid-template-areas:
      "title  avatar"
      "intro  intro";
    row-gap: 24px;
  }
  h1 {
    margin-bottom: 0;
  }
}

@media (max-width: 720px) {
  :root {
    --side-pad: 20px;
  }
  .header-top {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "avatar title"
      "intro  intro";
    align-items: center;
    column-gap: 16px;
  }
  .section {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 40px 0;
  }
  .projects {
    grid-template-columns: 1fr;
  }
}
