/* JetBrains Mono 2.211, SIL Open Font License 1.1: fonts/jetbrains-mono/OFL.txt */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
}

/* IBM Plex Sans 3.201, SIL Open Font License 1.1: fonts/ibm-plex-sans/OFL.txt */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("fonts/ibm-plex-sans/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
}

/* Tokens from design/brief.md */
:root {
  color-scheme: light dark;
  --background: light-dark(#f6f7f9, #081425);
  --surface: light-dark(#eef2f6, #111c26);
  --text: light-dark(#161b22, #e6edf3);
  --muted: light-dark(#57606a, #8ba2b9);
  --accent: light-dark(#0969da, #00d8ff);
  --on-accent: light-dark(#ffffff, #081425);

  --font-headings: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-details: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 25%, transparent) 1px, transparent 1px);
  background-size: 1.25rem 1.25rem;
}

/* View transitions */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}

/* Base reset and layout */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

main {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  box-sizing: border-box;
  padding: 3rem 1.25rem 2rem;
  flex: 1;
}

footer {
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  box-sizing: border-box;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  color: var(--muted);
  font-family: var(--font-details);
  font-size: 0.875rem;
  margin-block-start: 3.5rem;
}

footer a {
  color: var(--accent);
}

#colophon {
  margin-block-start: 0.75rem;
  line-height: 1.5;
}

/* Section spacing & structure */
.section + .section {
  margin-block-start: 3.5rem;
}

/* Personal detail: Subtle chef knife divider detail inspired by cooking */
.section + .section::before {
  content: "";
  display: block;
  width: 100%;
  height: 1.25rem;
  margin-block-end: 2.5rem;
  background-color: var(--muted);
  mask-image: url("knife.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 2.25rem auto;
  -webkit-mask-image: url("knife.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 2.25rem auto;
  opacity: 0.4;
  border-top: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  padding-top: 0.75rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-headings);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0;
  text-wrap: balance;
}

h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

/* Section headings: monospace comment syntax // */
h2 {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h2::before {
  content: "// ";
  content: "// " / "";
  color: var(--accent);
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  text-wrap: pretty;
}

/* Links & interactive focus */
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: opacity 0.15s ease-out;
}

a:hover {
  text-decoration-thickness: 2px;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Bio Section */
#bio .photo {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 0;
  border: 1px solid color-mix(in srgb, var(--muted) 40%, transparent);
  margin-bottom: 1.25rem;
  display: block;
  object-fit: cover;
  background-color: var(--surface);
}

#bio .headline {
  font-family: var(--font-details);
  font-size: 0.9375rem;
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

#bio .pitch {
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-inline-start: 3px solid var(--accent);
}

#bio .availability {
  font-family: var(--font-details);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  border-radius: 2px;
}

#bio .availability::before {
  content: "status: ";
  color: var(--muted);
}

#bio .availability a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font-weight: 600;
  border-radius: 2px;
  margin-inline-start: auto;
}

#bio .availability a:hover {
  opacity: 0.9;
}

#bio .facts {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--font-details);
  font-size: 0.875rem;
  color: var(--muted);
}

#bio .facts li {
  background: var(--surface);
  padding: 0.25rem 0.625rem;
  border: 1px solid color-mix(in srgb, var(--muted) 30%, transparent);
  border-radius: 2px;
}

#bio .fact-label {
  color: var(--text);
  font-weight: 600;
}

#bio .fact-label::after {
  content: ":";
}

/* Event list & talks */
#events h3 {
  font-family: var(--font-details);
  font-size: 0.9375rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-block: 1.5rem 0.75rem;
}

.events {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  padding: 1rem 1.25rem;
  border-radius: 2px;
  transition: transform 0.2s ease-out, border-color 0.2s ease-out, opacity 0.2s ease-out;
}

.event:hover,
.event:focus-within {
  border-color: var(--accent);
}

/* Signature Move: Other cards step back on hover and focus */
@media (prefers-reduced-motion: no-preference) {
  .events:has(.event:hover, .event:focus-within) .event:not(:hover, :focus-within) {
    transform: scale(0.98);
    opacity: 0.7;
    border-color: color-mix(in srgb, var(--muted) 20%, transparent);
  }
}

.event-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 1.0625rem;
  margin-bottom: 0.375rem;
}

.event-badge a {
  text-decoration: none;
  font-weight: 600;
}

.event-badge a:hover {
  text-decoration: underline;
}

.role {
  font-family: var(--font-details);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 2px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.period {
  font-family: var(--font-details);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.sessions {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  font-size: 0.9375rem;
}

.session {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}

.session-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
}

.type {
  font-family: var(--font-details);
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  background: color-mix(in srgb, var(--muted) 20%, transparent);
  color: var(--text);
  border-radius: 2px;
  text-transform: uppercase;
}

.session-badge a {
  text-decoration: none;
  font-weight: 500;
}

.session-badge a:hover {
  text-decoration: underline;
}

.session a:not(.session-badge a) {
  font-family: var(--font-details);
  font-size: 0.8125rem;
}

/* CV Section */
#cv h3 {
  font-family: var(--font-details);
  font-size: 0.9375rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-block: 1.5rem 0.75rem;
}

.cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cv-list li {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  padding: 1rem 1.25rem;
  border-radius: 2px;
}

.cv-list h4 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

/* Skills array-like tag cloud: [ "HTML", "CSS" ] */
.skills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-details);
  font-size: 0.875rem;
}

.skills li {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  color: var(--text);
  transition: border-color 0.15s ease-out;
}

.skills li:hover {
  border-color: var(--accent);
}

.skills li::before {
  content: '"';
  content: '"' / "";
  color: var(--muted);
}

.skills li::after {
  content: '"';
  content: '"' / "";
  color: var(--muted);
}

/* Links Section */
.links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.links li a {
  display: block;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  padding: 0.75rem 1rem;
  border-radius: 2px;
  font-family: var(--font-details);
  font-size: 0.9375rem;
  text-decoration: none;
  transition: border-color 0.15s ease-out, background-color 0.15s ease-out;
}

.links li a::before {
  content: "-> ";
  content: "-> " / "";
  color: var(--accent);
}

.links li a:hover {
  border-color: var(--accent);
}

/* Projects & Optional modules (for future expansion) */
.projects {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.25rem;
}

.project {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--muted) 35%, transparent);
  padding: 1.25rem;
  border-radius: 2px;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  margin-bottom: 0;
  font-family: var(--font-details);
  font-size: 0.875rem;
}
