@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --background: #f6f8fa;
  --surface: #ffffff;
  --surface-soft: #eaf5ed;
  --text: #1f2328;
  --text-muted: #4b5560;
  --border: #c7cfd8;
  --primary: #146c2e;
  --on-primary: #ffffff;
  --link: #0969da;
  --code: #6639ba;
  --warning: #9a6700;
  --focus-ring: 0 0 0 3px rgb(9 105 218 / 30%);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #0d1117;
    --surface: #161b22;
    --surface-soft: #172d20;
    --text: #f0f6fc;
    --text-muted: #aab4be;
    --border: #3d444d;
    --primary: #56d364;
    --on-primary: #0d1117;
    --link: #79c0ff;
    --code: #bc8cff;
    --warning: #d29922;
    --focus-ring: 0 0 0 3px rgb(121 192 255 / 35%);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

.shell {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.panel {
  width: min(100%, 62rem);
}

.brand {
  width: min(100%, clamp(23.25rem, 64vw, 31.5rem));
  margin: 0 0 clamp(2rem, 4vw, 3.5rem);
  font-size: inherit;
  font-weight: inherit;
}

.brand picture,
.brand img {
  display: block;
  width: 100%;
  height: auto;
}

@media (max-width: 30rem) {
  .brand {
    width: min(calc(100% + 1.25rem), 23.25rem);
    margin-bottom: 2.5rem;
  }
}

.links {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.links li {
  border-bottom: 1px solid var(--border);
}

.projects {
  margin-top: 0;
  padding-bottom: clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--border);
}

.section-heading {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 3.25rem;
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
  padding: clamp(0.9rem, 2.6vw, 1.6rem) 0;
  color: var(--text);
  font-size: clamp(1.15rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.project-list {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  width: 100%;
}

.project-card {
  width: min(100%, 52rem);
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--code);
  border-radius: 0.75rem;
  transition: border-color 160ms ease;
}

.project-summary {
  display: block;
  padding: clamp(1.25rem, 4vw, 2rem);
  color: inherit;
  text-decoration: none;
}

.repository-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.7rem;
  color: var(--primary);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-arrow {
  display: inline-block;
  color: var(--link);
  font-size: 1rem;
  transition: transform 160ms ease;
}

.project-card:has(.project-summary:hover),
.project-card:has(.project-summary:focus-visible) {
  border-color: var(--link);
  border-left-color: var(--code);
}

.project-summary:hover h3,
.project-summary:focus-visible h3 {
  color: var(--link);
}

.project-summary:hover .summary-arrow,
.project-summary:focus-visible .summary-arrow {
  transform: translate(0.15rem, -0.15rem);
}

.project-summary h3 {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.repository-description {
  max-width: 62ch;
  margin: 0.85rem 0 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.project-actions {
  border-top: 1px solid var(--border);
}

.project-action {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  font-weight: 500;
  text-decoration: none;
}

.live-action {
  color: var(--primary);
  background: var(--surface-soft);
}

.action-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
}

.action-copy > span:first-child {
  font-size: 1.125rem;
  line-height: 1.25;
}

.action-note {
  color: var(--warning);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
}

.action-arrow {
  flex: 0 0 auto;
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.project-action:hover,
.project-action:focus-visible {
  text-decoration: underline;
}

.links a {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  min-height: 3.25rem;
  padding: clamp(0.9rem, 2.6vw, 1.6rem) 0;
  color: inherit;
  font-size: clamp(1.15rem, 3vw, 2.2rem);
  font-weight: 400;
  letter-spacing: -0.025em;
  text-decoration: none;
  transition: color 160ms ease, padding-inline 160ms ease;
}

.links a:hover,
.links a:focus-visible {
  padding-inline: 0.75rem;
  color: var(--link);
}

.index {
  color: var(--primary);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.arrow {
  color: var(--link);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 36rem) {
  .section-heading,
  .links a {
    align-items: start;
  }

  .section-heading .index,
  .links .index {
    margin-top: 0.4rem;
  }

  .links .arrow {
    margin-top: 0.15rem;
  }
}
