/* iulianserban.com
   One column, left-aligned. Inter for structure, Lora for reading.
   The amber 2x2 brick is the only accent; links are ink-blue. */

@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/inter-display-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/inter-display-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/lora.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/lora-italic.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --paper: #fbfcfb;
  --ink: #172131;
  --muted: #5d6776;
  --rule: #e1e5e9;
  --tint: #f1f3f5;
  --link: #1f56a8;
  --brick: #f29a00;
  --brick-top: #ffb52e;
  --brick-edge: #c97c00;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --text: 42rem;
  --wide: 56rem;
  --gutter: 1.25rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f151e;
    --ink: #e8ecf1;
    --muted: #9aa4b2;
    --rule: #263241;
    --tint: #172130;
    --link: #8db4f5;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--brick); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--gutter); top: 0.75rem; background: var(--paper); padding: 0.4rem 0.7rem; z-index: 10; }

/* ---------------------------------------------------------------- header and footer */
.site-header, main, .site-footer { max-width: 64rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem;
}
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; }
.wordmark:hover { text-decoration: none; }
.wordmark .brick { width: 1.35rem; height: 1.35rem; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--ink); }
.site-header nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brick); }

.brick rect { fill: var(--brick); }
.brick circle { fill: var(--brick-top); stroke: var(--brick-edge); stroke-width: 1.2; }

main { padding-bottom: 4rem; }

.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  padding-top: 1.5rem; padding-bottom: 2.5rem;
  background: linear-gradient(var(--rule), var(--rule)) no-repeat center top / calc(100% - 2 * var(--gutter)) 1px;
  color: var(--muted); font-size: 0.875rem;
}
.site-footer p { margin: 0; }
.site-footer p:last-child { display: flex; gap: 1.1rem; }
.site-footer a { color: var(--muted); }

/* ---------------------------------------------------------------- home */
.hero { display: grid; grid-template-columns: minmax(0, var(--text)) 15rem; gap: 1.5rem 4rem; align-items: start; padding: 3.5rem 0 1rem; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; margin-top: 0.4rem; background: var(--tint); }
.hero h1 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.75rem, 9vw, 5rem); line-height: 0.98; letter-spacing: -0.035em;
}
.hero-role { margin: 0.9rem 0 2rem; color: var(--muted); font-size: clamp(1.1rem, 2.6vw, 1.3rem); font-weight: 500; letter-spacing: -0.01em; }
.hero-bio p { margin: 0 0 1.1rem; font-family: var(--serif); font-size: 1.125rem; line-height: 1.72; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin: 1.75rem 0 0; font-weight: 500; }

.home-section { max-width: var(--text); margin-top: 3.5rem; padding-top: 1.75rem; border-top: 1px solid var(--rule); }
.home-section h2 { margin: 0 0 1.25rem; font-family: var(--display); font-weight: 600; font-size: 1.35rem; letter-spacing: -0.015em; }

/* lists of posts */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { margin: 0 0 1.75rem; }
.post-list a { text-decoration: none; color: var(--ink); }
.post-list a:hover .post-title { text-decoration: underline; text-decoration-color: var(--brick); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.post-title { font-family: var(--display); font-weight: 600; font-size: 1.3rem; line-height: 1.25; letter-spacing: -0.015em; }
.post-summary { margin: 0.4rem 0 0.35rem; font-family: var(--serif); color: var(--muted); line-height: 1.6; }
.post-list time { color: var(--muted); font-size: 0.875rem; }

/* year + item rows: home timeline and education */
.timeline, .cv-edu { list-style: none; margin: 0; padding: 0; }
.timeline li, .cv-edu li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; margin: 0 0 1.4rem; }
.when { color: var(--muted); font-size: 0.9rem; font-weight: 500; font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
.timeline div, .cv-edu div { font-weight: 600; }
.timeline p, .cv-edu p { margin: 0.25rem 0 0; font-family: var(--serif); font-weight: 400; color: var(--muted); line-height: 1.6; }

/* ---------------------------------------------------------------- pages and posts */
.page-header, .post-header { max-width: var(--text); padding: 2.75rem 0 0.5rem; }
.page-header h1, .post-header h1 {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(2.1rem, 5.5vw, 3.1rem); line-height: 1.06; letter-spacing: -0.028em;
}
.post-meta { margin: 0.9rem 0 0; color: var(--muted); font-size: 0.95rem; }

.prose { max-width: var(--text); font-family: var(--serif); font-size: 1.125rem; line-height: 1.75; }
.prose > :first-child { margin-top: 1.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25rem; }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin: 0 0 0.5rem; padding-left: 0.15rem; }
.prose li::marker { color: var(--muted); }
.prose h2 { margin: 2.75rem 0 0.8rem; font-family: var(--display); font-weight: 600; font-size: 1.55rem; line-height: 1.2; letter-spacing: -0.02em; }
.prose h3 { margin: 2rem 0 0.4rem; font-family: var(--sans); font-weight: 600; font-size: 1.1rem; line-height: 1.35; }
.prose strong { font-weight: 600; }

.prose figure { margin: 2.25rem 0; }
.prose figure.wide { width: min(var(--wide), calc(100vw - 2 * var(--gutter))); }
.prose img, .prose video { display: block; width: 100%; height: auto; border-radius: 6px; background: var(--tint); }
.prose figcaption { margin-top: 0.65rem; font-family: var(--sans); font-size: 0.875rem; line-height: 1.5; color: var(--muted); }

.prose blockquote.letter {
  margin: 1.75rem 0; padding: 1.25rem 1.5rem; background: var(--tint); border-radius: 6px;
  font-style: italic;
}
.prose blockquote.letter p { margin: 0 0 0.6rem; }
.prose blockquote.letter p:last-child { margin: 0; }

.prose table {
  display: block; overflow-x: auto; width: 100%; margin: 1.5rem 0 0.5rem; border-collapse: collapse;
  font-family: var(--sans); font-size: 0.9rem; line-height: 1.45; font-variant-numeric: tabular-nums;
}
.prose th, .prose td { padding: 0.55rem 0.9rem 0.55rem 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; border-bottom: 1.5px solid var(--ink); }
.prose td:not(:first-child), .prose th:not(:first-child) { white-space: nowrap; }
.table-note { font-family: var(--sans); font-size: 0.85rem !important; line-height: 1.5; color: var(--muted); }
.small { font-family: var(--sans); font-size: 0.8rem !important; line-height: 1.5; color: var(--muted); margin-top: 2.5rem !important; }

.post-end { max-width: var(--text); display: flex; gap: 1.6rem; margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-weight: 500; }

/* projects: the line under each heading saying when and where */
.prose .kicker { margin: -0.45rem 0 0.75rem; font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }

/* research */
.pubs { list-style: none; padding: 0 !important; margin: 1rem 0 0 !important; }
.pubs li { margin: 0 0 1.6rem; padding: 0; }
.pubs li > span { display: block; }
.pub-title { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.pub-authors { font-size: 0.98rem; line-height: 1.55; color: var(--muted); margin-top: 0.15rem; }
.pub-venue { font-family: var(--sans); font-size: 0.9rem; margin-top: 0.15rem; }
.pub-note { display: inline !important; color: var(--muted); }
.pub-note::before { content: "("; }
.pub-note::after { content: ")"; }
.pub-links { font-family: var(--sans); font-size: 0.9rem; margin-top: 0.1rem; }
.pub-links a { margin-right: 0.9rem; }

/* CV */
.cv-download { font-family: var(--sans); font-size: 1rem; }
.cv-skills { list-style: none; padding: 0 !important; display: flex; flex-wrap: wrap; gap: 0.5rem; font-family: var(--sans); font-size: 0.92rem; }
.cv-skills li { margin: 0; padding: 0.3rem 0.75rem; background: var(--tint); border-radius: 999px; }
.cv-download a { font-weight: 600; }
.cv-item { margin: 0 0 2rem; }
.cv-item h3 { margin: 0; }
.cv-item h3 span { display: block; font-weight: 500; color: var(--muted); font-size: 1rem; margin-top: 0.1rem; }
.cv-meta { margin: 0.25rem 0 0.6rem !important; font-family: var(--sans); font-size: 0.9rem; color: var(--muted); }
.cv-item ul { font-size: 1.02rem; line-height: 1.65; }
.cv-item li { margin-bottom: 0.3rem; }
.cv-edu { margin-top: 1rem !important; padding: 0 !important; font-family: var(--sans); }
.cv-edu li { padding: 0; }

/* contact */
.email { display: inline-block; vertical-align: middle; }
.email img { display: block; width: 255px; height: auto; background: none; border-radius: 0; }
.email-large img { width: min(340px, 100%); }
.email-line { margin: 1.25rem 0 0.5rem !important; }

@media (max-width: 56rem) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero-photo { order: -1; width: 9rem; aspect-ratio: 1; border-radius: 50%; object-position: 50% 30%; margin: 0; }
}

@media (max-width: 40rem) {
  :root { --gutter: 1rem; }
  .site-header { padding-top: 1rem; padding-bottom: 1rem; }
  .hero { padding-top: 2rem; }
  .hero-photo { width: 7.5rem; border-radius: 50%; aspect-ratio: 1; object-position: 50% 30%; margin: 0; }
  .prose, .hero-bio p { font-size: 1.0625rem; }
  .timeline li, .cv-edu li { grid-template-columns: 1fr; gap: 0.1rem; }
}

@media print {
  .site-header nav, .site-footer, .post-end { display: none; }
  body { background: #fff; color: #000; }
}

/* the blog index puts the post list inside .prose */
.prose .post-list { padding-left: 0; }
.prose .post-list li { padding-left: 0; margin-bottom: 1.75rem; }
.prose .post-list .post-summary { font-size: 1.05rem; }

/* research: the full list */
.pub-intro { font-family: var(--sans); font-size: 0.95rem !important; color: var(--muted); }
.prose h3.pub-year { margin: 2.25rem 0 0.75rem; padding-top: 0.9rem; border-top: 1px solid var(--rule); font-family: var(--display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pub-authors .me { color: var(--ink); font-weight: 600; }
.pub-award {
  display: inline-block !important; margin: 0.35rem 0 0.1rem; padding: 0.12rem 0.5rem;
  font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--ink);
  background: rgba(242, 154, 0, 0.18); border-radius: 4px;
}
.pub-award + .pub-links { margin-top: 0.25rem; }
