/* Margaux Vasilescu — personal site */
:root {
  --paper: #f6f2ea;
  --ink: #1b1a17;
  --muted: #6b665c;
  --rule: #d9d2c3;
  --accent: #2f4bd8;
  --accent-soft: #e4e8fb;
  --card: #fffdf8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --max: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141413;
    --ink: #eeeae1;
    --muted: #a19b8f;
    --rule: #34322d;
    --accent: #8ea0ff;
    --accent-soft: #23284a;
    --card: #1c1b19;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.nav .mark { font-family: var(--serif); font-weight: 600; font-size: 20px; text-decoration: none; letter-spacing: -0.01em; }
.nav ul { list-style: none; display: flex; gap: 26px; }
.nav ul a { text-decoration: none; font-size: 15px; color: var(--muted); }
.nav ul a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { padding: 110px 0 90px; border-bottom: 1px solid var(--rule); }
.eyebrow {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lede { font-size: clamp(19px, 2.2vw, 23px); max-width: 640px; color: var(--muted); line-height: 1.5; }
.hero p.lede strong { color: var(--ink); font-weight: 500; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 64px; align-items: center; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  background: var(--accent-soft); border: 1px solid var(--rule);
  transform: rotate(1.5deg); box-shadow: 0 24px 50px -28px rgba(0,0,0,.35);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait .initials { display: none; }
.portrait.empty .initials {
  display: flex; position: absolute; inset: 0; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 96px; font-style: italic; color: var(--accent);
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border: 1px solid var(--ink); transition: all .15s ease;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:hover { border-color: var(--accent); }

/* ---------- Sections ---------- */
section.block { padding: 90px 0; border-bottom: 1px solid var(--rule); }
.block-head { display: grid; grid-template-columns: 220px 1fr; gap: 40px; }
.block-head h2 {
  font-family: var(--serif); font-weight: 500; font-size: 30px;
  letter-spacing: -0.015em; line-height: 1.15;
}
.block-head h2 span { display: block; font-family: var(--sans); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }

.about p { font-size: 19px; margin-bottom: 18px; max-width: 680px; }
.about p:last-child { margin-bottom: 0; }

/* ---------- Projects ---------- */
.projects { display: grid; gap: 22px; }
.project {
  background: var(--card); border: 1px solid var(--rule); border-radius: 14px;
  padding: 30px 32px; transition: transform .15s ease, border-color .15s ease;
}
.project:hover { transform: translateY(-2px); border-color: var(--accent); }
.project .meta { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.project h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: -0.01em; margin-bottom: 10px; }
.project p { color: var(--muted); margin-bottom: 16px; }
.project.featured { border-width: 2px; border-color: var(--ink); }
.badge {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tags li { list-style: none; font-size: 13px; border: 1px solid var(--rule); border-radius: 999px; padding: 3px 11px; color: var(--muted); }
.project .link { font-weight: 500; font-size: 15px; }

/* ---------- Experience ---------- */
.timeline { list-style: none; }
.timeline li { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--rule); }
.timeline li:first-child { border-top: none; padding-top: 0; }
.timeline .when { font-size: 14px; color: var(--muted); padding-top: 3px; }
.timeline h3 { font-size: 18px; font-weight: 600; margin-bottom: 2px; }
.timeline .org { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.timeline p { font-size: 16px; }

/* ---------- Skills / education ---------- */
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.cols h3 { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.cols ul { list-style: none; }
.cols li { padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.school { margin-bottom: 36px; }
.school h3 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin-bottom: 4px; }
.school p { color: var(--muted); }

/* ---------- Contact ---------- */
.contact { padding: 110px 0; text-align: left; }
.contact h2 { font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 6vw, 64px); letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 22px; }
.contact h2 a { text-decoration: none; border-bottom: 3px solid var(--accent); }
.contact p { color: var(--muted); font-size: 19px; max-width: 560px; margin-bottom: 30px; }
.socials { display: flex; flex-wrap: wrap; gap: 12px; }

footer { border-top: 1px solid var(--rule); padding: 28px 0; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav ul { gap: 16px; }
  .nav ul li.hide-sm { display: none; }
  .hero { padding: 56px 0 60px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait { order: -1; max-width: 260px; transform: none; }
  section.block { padding: 64px 0; }
  .block-head { grid-template-columns: 1fr; gap: 24px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .project { padding: 24px 22px; }
  .project .meta { flex-direction: column; gap: 2px; }
}

/* ---------- Beyond the code ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.tile { background: var(--card); border: 1px solid var(--rule); border-radius: 14px; padding: 24px 26px; }
.tile-k { font-family: var(--serif); font-size: 22px; font-weight: 500; margin-bottom: 8px; letter-spacing: -0.01em; }
.tile p { color: var(--muted); font-size: 16px; }
@media (max-width: 760px) { .tiles { grid-template-columns: 1fr; } }