/* =========================================================
   Dan Mitrea — Personal Website
   Modern-minimal theme. Edit the variables below to retheme.
   ========================================================= */

/* ---- Design tokens ---- */
:root {
  --bg:        #ffffff;
  --surface:   #f6f7f9;
  --surface-2: #eef0f3;
  --text:      #16181d;
  --muted:     #5f6571;
  --border:    #e4e7ec;
  --accent:    #2f54eb;
  --accent-soft: rgba(47, 84, 235, 0.10);
  --shadow:    0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  --maxw: 880px;
  --radius: 12px;
  --gap: clamp(1rem, 2.5vw, 1.6rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

h1, h2, h3 { line-height: 1.2; font-weight: 650; letter-spacing: -0.02em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* mono eyebrow label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.6rem;
}

/* hairline divider */
.rule { height: 1px; background: var(--border); border: 0; margin: 3rem 0; }

/* ---- Top navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav__brand {
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-right: auto;
}
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.nav__links a {
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav__links a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav__links a.is-active { color: var(--text); background: var(--accent-soft); }

/* ---- Page wrappers ---- */
main { padding: 3rem 0 1rem; }
.page-title { font-size: clamp(1.7rem, 4vw, 2.3rem); margin: 0.2rem 0 0.4rem; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }

/* ---- Hero (home) ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem;
  align-items: center;
  padding: 1rem 0 0.5rem;
}
.hero__name { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0.3rem 0 0.6rem; }
.hero__role { color: var(--muted); font-size: 1.15rem; margin: 0 0 1.2rem; }
.hero__intro { max-width: 54ch; }
.hero__photo {
  width: 168px; height: 168px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero__photo { width: 120px; height: 120px; }
}

/* ---- Profile / social links ---- */
.links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 0; padding: 0; list-style: none; }
.links a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.links a:hover { text-decoration: none; border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }

/* ---- Affiliation row ---- */
.affil { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; color: var(--muted); font-size: 0.9rem; }
.affil span { display: inline-flex; align-items: center; gap: 0.5rem; }

/* ---- Cards ---- */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.2rem 1.3rem;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- Project / list items ---- */
.item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
}
.item:first-of-type { border-top: 0; }
.item__meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted); padding-top: 0.15rem; }
.item h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.item p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.item .tag {
  display: inline-block; font-size: 0.72rem; font-family: var(--font-mono);
  color: var(--accent); background: var(--accent-soft);
  padding: 0.1rem 0.5rem; border-radius: 6px; margin-top: 0.5rem;
}
@media (max-width: 560px) {
  .item { grid-template-columns: 1fr; gap: 0.3rem; }
}

/* ---- Publications ---- */
.pub-year {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--accent);
  margin: 2.2rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  padding: 0.7rem 0 0.7rem 1.1rem;
  position: relative;
  font-size: 0.96rem;
  border-bottom: 1px solid var(--border);
}
.pub-list li::before {
  content: "";
  position: absolute; left: 0; top: 1.2rem;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.pub-list li:last-child { border-bottom: 0; }
.pub-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.05em; color: var(--muted);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 0.02rem 0.4rem; margin-left: 0.4rem; vertical-align: middle;
}
.pub-badge--domain {
  font-family: var(--font-sans); letter-spacing: 0;
  color: var(--fg); background: var(--surface-alt, #f0f0f0);
}

/* ---- Contact ---- */
.contact-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.contact-list .label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.15rem; }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: var(--radius); }

/* ---- Footer ---- */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

/* ---- Misc prose ---- */
.prose p { margin: 0 0 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.section { margin: 2.5rem 0; }
.section > h2 { font-size: 1.35rem; margin: 0 0 1rem; }
