@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/static/fonts/plex-300.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url('/static/fonts/plex-300-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/static/fonts/plex-600.woff2') format('woff2');
}

:root {
  --bg: #fafaf8;
  --fg: #1c1c1c;
  --muted: #6b6b6b;
  --rule: #dedcd6;
  --accent: #2357cd;
  --selection: #ffef9e;
  --active: #74d274;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131413;
    --fg: #e6e7e5;
    --muted: #9a9c9a;
    --rule: #333533;
    --accent: #7bb8ff;
    --selection: #19446b;
  }
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0;
  padding: 2.5rem 1.5rem;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

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

header, main {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
}

.h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

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

p { margin: 1em 0; }

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

/* Home links */

.links ul {
  list-style: none;
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}

.links a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.links a::after {
  content: "↗" / "";
  display: inline-block;
  margin-left: 0.2em;
  font-size: 0.8em;
  color: var(--muted);
  transition: transform 0.15s, color 0.15s;
}

.links a[href^="mailto:"]::after { content: "→" / ""; }

.links a:hover,
.links a:focus-visible {
  color: var(--accent);
  border-color: currentColor;
}

.links a:hover::after,
.links a:focus-visible::after {
  color: currentColor;
  transform: translate(1px, -1px);
}

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

/* Language switcher (only rendered with 2+ languages) */

nav.lang {
  font-family: var(--mono);
  font-size: 0.8rem;
  display: inline-flex;
  margin-top: 2em;
  white-space: nowrap;
  border: 1px solid var(--rule);
  border-radius: 0.4em;
  overflow: auto;
  max-width: 100%;
  gap: 1em;
  padding: 0 0.5em;
}

nav.lang a {
  color: var(--muted);
  padding: 0.5em;
  text-decoration: none;
}

nav.lang a::before {
  content: "○";
  color: var(--rule);
  padding-right: 10px;
}

nav.lang a:hover::before { content: "●"; }

nav.lang a[aria-current="true"]::before {
  content: "●";
  color: var(--active);
}

/* cv.magjan.dev */

.inline-hr {
  display: inline-block;
  border: 0;
  border-left: 0.3rem solid var(--rule);
  height: 0.3rem;
  margin: 0 0.4rem;
  vertical-align: middle;
}

.inline-nav { margin: 1em 0; }

.cv-tabs a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cv-pdf {
  width: 100%;
  aspect-ratio: 612 / 792;
  border: 0;
  margin: 1em 0;
}

.cv-download {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.cv-download a { color: inherit; }
