/* ------------------------------------------------------------
   luketomasovic.com
   One centered column, nav across the top, icons in the footer.
   Sans-serif body with monospace accents. Accent: #4292c6.
   Colors switch automatically with the visitor's light/dark setting.
   ------------------------------------------------------------ */

:root {
  --bg: #fbfcfd;
  --fg: #1b2430;
  --muted: #5d6a79;
  --line: #e2e7ed;
  --accent: #4292c6;
  --accent-soft: #eaf3fa;

  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --measure: 640px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161b;
    --fg: #e4e9ef;
    --muted: #94a2b2;
    --line: #252d37;
    --accent: #6baed6;
    --accent-soft: #172530;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12161b;
  --fg: #e4e9ef;
  --muted: #94a2b2;
  --line: #252d37;
  --accent: #6baed6;
  --accent-soft: #172530;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.page {
  max-width: var(--measure);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 32px 0;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark:hover { color: var(--accent); }

.site-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-nav a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

/* ---------- main content ---------- */

main { flex: 1; padding-block: 56px 64px; }

h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  text-wrap: balance;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}

.tagline {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 28px;
}

.intro { margin-bottom: 40px; }

section + section { margin-top: 48px; }

.muted { color: var(--muted); }

/* ---------- home ---------- */

.hello { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.hello h1 { margin: 0; }
.hello .tagline { margin: 4px 0 0; }

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--accent-soft);
}

.now {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  margin-top: 44px;
}
.now ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.now li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; }
.now li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.7em;
}
.now .updated { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 16px; }

/* ---------- icon links ---------- */

.links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0 -10px; padding: 0; list-style: none; }
.links.small { margin: 0 -6px 0 0; }
.links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s, background-color .15s;
}
.links a:hover { color: var(--accent); background: var(--accent-soft); }
.icon { width: 20px; height: 20px; fill: currentColor; display: block; }

.links.small a { width: 32px; height: 32px; }
.links.small .icon { width: 16px; height: 16px; }

/* ---------- research areas ---------- */

.area { display: grid; gap: 4px; }
.area .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}
.keywords {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.paper {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.paper a { color: var(--muted); }
.paper a:hover { color: var(--accent); }

/* ---------- lists (writing, other) ---------- */

.entries { list-style: none; margin: 0; padding: 0; }
.entries li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.entries li:first-child { padding-top: 0; }
.entries .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.entries .title { font-weight: 600; }
.entries .sub { color: var(--muted); margin: 2px 0 0; }

.soon {
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  color: var(--muted);
  margin-bottom: 20px;
}

.button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--fg);
  text-decoration: none;
}
.button:hover { background: var(--accent-soft); color: var(--fg); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 18px 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.site-footer small { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- small screens ---------- */

@media (max-width: 520px) {
  body { font-size: 16px; }
  main { padding-block: 40px 48px; }
  h1 { font-size: 1.7rem; }
  .avatar { width: 68px; height: 68px; }
}

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