/* ============================================
   Alessia M. Vlasceanu — Personal site styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,500&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --text: #201f2b;
  --text-muted: #63606f;
  --accent: #6a5fa8;
  --accent-dark: #4d4380;
  --accent-soft: #efeaf9;
  --border: #e8e3f0;
  --radius: 14px;
  --shadow: 0 10px 30px -15px rgba(40, 30, 70, 0.25);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-w: 860px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

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

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
header.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.logo:hover { text-decoration: none; color: var(--accent-dark); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-dark);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    display: none;
    padding: 8px 24px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
}

.hero-photo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 4px solid var(--surface);
  flex-shrink: 0;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.hero p.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 62ch;
}

@media (max-width: 560px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-grid .hero-photo { margin: 0 auto; }
}

/* ---------- Buttons ---------- */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-dark); }

/* ---------- Social row ---------- */
.social-row {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.social-row a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.social-row a:hover { color: var(--accent-dark); }

/* ---------- Sections ---------- */
section { padding: 48px 0; }
section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { margin-bottom: 32px; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-head p { color: var(--text-muted); max-width: 62ch; }

/* ---------- Cards / grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 760px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3 { margin-bottom: 8px; font-size: 1.05rem; }
.card p { color: var(--text-muted); font-size: 0.94rem; margin-bottom: 0; }

/* ---------- Timeline (experience/education) ---------- */
.timeline {
  border-left: 2px solid var(--border);
  padding-left: 28px;
  margin-left: 6px;
}

.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.timeline-item .meta {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.timeline-item h3 { margin-bottom: 2px; }
.timeline-item .org { color: var(--accent-dark); font-weight: 500; margin-bottom: 8px; }

.timeline-item ul { margin: 8px 0 0; padding-left: 20px; color: var(--text-muted); }
.timeline-item li { margin-bottom: 6px; font-size: 0.95rem; }

/* ---------- Publication list ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}
.pub-item:first-child { padding-top: 0; }
.pub-item .pub-title { font-weight: 600; font-size: 1.02rem; margin-bottom: 4px; }
.pub-item .pub-meta { color: var(--text-muted); font-size: 0.9rem; }
.pub-item .pub-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

/* ---------- Chips (skills/tags) ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
}

/* ---------- Blog ---------- */
.post-card {
  display: block;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.post-card:first-child { padding-top: 0; }
.post-card:hover { text-decoration: none; }
.post-card .post-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.post-card h3 { color: var(--text); margin-bottom: 6px; }
.post-card:hover h3 { color: var(--accent-dark); }
.post-card p { color: var(--text-muted); margin-bottom: 0; }

.post-body {
  font-size: 1.05rem;
}
.post-body h2 { margin-top: 1.4em; }
.post-body p { margin-bottom: 1.2em; }
.post-hero-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.back-link { display: inline-block; margin-bottom: 24px; font-size: 0.9rem; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 20px;
}
footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
footer p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }
footer .social-row { margin-top: 0; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); border: none; margin: 40px 0; }
