/* Fonts: self-hosted latin subsets (SIL OFL).
   Inter files are variable fonts covering the full weight range. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-600-latin.woff2") format("woff2");
}

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

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

:root {
  --bg: #faf7f1;
  --fg: #26211c;
  --muted: #787064;
  --accent: #9a4a2e;
  --accent-strong: #7c3a22;
  --rule: #e6dfd3;
  --rule-strong: #26211c;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171310;
    --fg: #e9e3d9;
    --muted: #a1988a;
    --accent: #d98d64;
    --accent-strong: #e8a983;
    --rule: #332c25;
    --rule-strong: #e9e3d9;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.65;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

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

header,
main,
footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

header {
  padding-top: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--rule-strong);
  margin-bottom: 2.75rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.site-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--fg);
}

.nav-links a {
  margin-left: 1.25rem;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

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

main a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

main a:hover {
  color: var(--accent-strong);
  text-decoration-color: currentColor;
}

h1,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 2.4rem;
  letter-spacing: -0.015em;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Section labels: small caps with a short trailing rule */
h2 {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
}

h2::after {
  content: "";
  flex: 0 0 3.5rem;
  height: 1px;
  background: var(--rule);
}

h3 {
  font-size: 1.25rem;
  margin-top: 2.25rem;
  margin-bottom: 0.35rem;
}

/* CV entry meta line: company/location left, dates right */
.job-meta p {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  column-gap: 1rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.job-meta .dates {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

h3 + p > em:first-child {
  color: var(--muted);
  font-style: normal;
  font-size: 0.95rem;
}

p {
  margin: 0 0 1.1rem;
}

ul {
  padding-left: 1.25rem;
  margin: 0 0 1.1rem;
}

li {
  margin-bottom: 0.4rem;
}

li::marker {
  color: var(--muted);
}

/* Brand icons (Simple Icons paths) via currentColor masks */
.icon-link::before {
  content: "";
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.55em;
  vertical-align: -0.18em;
  background-color: currentColor;
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
}

.icon-gmail {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z'/></svg>");
}

.icon-github {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/></svg>");
}

.icon-linkedin {
  --icon: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/></svg>");
}

hr {
  border: none;
  height: 1px;
  width: 5rem;
  margin: 2.5rem auto;
  background: var(--rule);
}

strong {
  font-weight: 600;
}

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  margin: 0 0 0.4rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 1.1rem;
}

.footer-links .icon-link::before {
  width: 1.5rem;
  height: 1.5rem;
  margin-right: 0;
}

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

@media (max-width: 480px) {
  h1 {
    font-size: 1.9rem;
  }

  .job-meta p {
    flex-direction: column;
    row-gap: 0.1rem;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --fg: #000000;
    --muted: #444444;
    --accent: #000000;
    --accent-strong: #000000;
    --rule: #bbbbbb;
    --rule-strong: #000000;
  }

  header,
  footer {
    display: none;
  }

  body {
    font-size: 11pt;
  }

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

  h3 {
    break-after: avoid;
  }
}
