/* Radu Palade — personal site. Plain CSS, no build step. */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-text: #4338ca;
  --live: #047857;
  --live-soft: #ecfdf5;
  --pending: #a16207;
  --pending-soft: #fefce8;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --radius: 14px;
  --maxw: 1120px;
  --narrow: 820px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17; --bg-alt: #0f1520; --surface: #121a27; --text: #e7ecf3; --text-2: #b4bfcd; --muted: #8a97a8;
    --border: #1f2a3a; --accent: #818cf8; --accent-hover: #a5b4fc; --accent-soft: rgba(129, 140, 248, .12); --accent-text: #a5b4fc;
    --live: #34d399; --live-soft: rgba(52, 211, 153, .12); --pending: #fbbf24; --pending-soft: rgba(251, 191, 36, .12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f17; --bg-alt: #0f1520; --surface: #121a27; --text: #e7ecf3; --text-2: #b4bfcd; --muted: #8a97a8;
  --border: #1f2a3a; --accent: #818cf8; --accent-hover: #a5b4fc; --accent-soft: rgba(129, 140, 248, .12); --accent-text: #a5b4fc;
  --live: #34d399; --live-soft: rgba(52, 211, 153, .12); --pending: #fbbf24; --pending-soft: rgba(251, 191, 36, .12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container.narrow > * { max-width: var(--narrow); }
.footer .container.narrow > * { margin-left: auto; margin-right: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 13px; letter-spacing: .02em; }
:root[data-theme="dark"] .brand-mark { color: #0b0f17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-mark { color: #0b0f17; } }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--text); background: var(--bg-alt); text-decoration: none; }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
}
.theme-toggle:hover { color: var(--text); }
.icon-moon { display: block; } .icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; } :root[data-theme="dark"] .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; } :root:not([data-theme="light"]) .icon-sun { display: block; }
}

/* Hero */
.hero { padding-top: 112px; padding-bottom: 80px; }
.hero h1 { font-size: clamp(44px, 8vw, 80px); font-weight: 800; letter-spacing: -0.04em; }
.hero-role { font-size: clamp(20px, 3vw, 28px); font-weight: 600; color: var(--accent-text); margin-top: 8px; letter-spacing: -0.01em; }
.hero-summary { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 680px; margin-top: 20px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 10px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent; transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
:root[data-theme="dark"] .btn-primary { color: #0b0f17; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0b0f17; } }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.hero-facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 56px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.hero-facts li { background: var(--surface); padding: 20px; display: flex; flex-direction: column; gap: 2px; }
.hero-facts strong { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.hero-facts span { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { display: flex; align-items: baseline; gap: 14px; font-size: clamp(28px, 4vw, 36px); font-weight: 700; margin-bottom: 32px; }
.section-num { font-size: 14px; font-weight: 600; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.section-lead { color: var(--text-2); margin: -16px 0 32px; font-size: 17px; }
.prose p { color: var(--text-2); font-size: 18px; }
.prose p + p { margin-top: 16px; }
.prose strong { color: var(--text); font-weight: 600; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.job { position: relative; padding-bottom: 40px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: -28px; top: 7px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg-alt); border: 2px solid var(--accent);
}
.job:first-child::before { background: var(--accent); }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.job h3 { font-size: 19px; font-weight: 700; }
.job .at { color: var(--accent-text); font-weight: 600; }
.job-meta { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-context { font-size: 15px; color: var(--text-2); font-style: italic; margin-top: 4px; }
.bullets { margin-top: 12px; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 18px; color: var(--text-2); }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .7; }
.bullets.small li { font-size: 15px; }

/* Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags li {
  font-size: 13px; font-weight: 500; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px;
}

/* Project cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); transition: border-color .15s, transform .15s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.card-top { display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 21px; font-weight: 700; }
.card > p { color: var(--text-2); font-size: 15px; }
.card .tags { margin-top: 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-text); }
.badge-live { background: var(--live-soft); color: var(--live); }
.badge-pending { background: var(--pending-soft); color: var(--pending); }
.card-link { margin-top: auto; padding-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; }
.card-link.muted { color: var(--muted); font-weight: 500; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.skill-group h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.skill-group .tags li { background: var(--bg-alt); }

/* Education */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; display: grid; gap: 6px; align-content: start; }
.info-card h3 { font-size: 18px; font-weight: 700; }
.info-card p { color: var(--text-2); }
.langs { margin: 4px 0 0; display: grid; gap: 8px; }
.langs div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.langs div:last-child { border-bottom: 0; }
.langs dt { font-weight: 500; } .langs dd { margin: 0; color: var(--muted); }

/* Footer / contact */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 88px 0 40px; text-align: center; }
.contact-title { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.contact-lead { color: var(--text-2); max-width: 560px; margin: 14px auto 0; font-size: 17px; }
.contact-email { display: inline-block; margin-top: 24px; font-size: clamp(20px, 3.5vw, 28px); font-weight: 700; color: var(--accent-text); word-break: break-all; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 28px; }
.contact-links a, .contact-links span { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 500; font-size: 15px; }
.contact-links a:hover { color: var(--text); }
.copyright { margin-top: 56px; font-size: 13px; color: var(--muted); }

/* Responsive */
@media (max-width: 960px) {
  .cards, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero { padding-top: 56px; padding-bottom: 56px; }
  .section { padding: 64px 0; }
  .cards, .skills-grid, .two-col { grid-template-columns: 1fr; }
  .btn { flex: 1 1 auto; justify-content: center; }
  .hero-facts { margin-top: 40px; }
  .hero-facts li { padding: 16px; }
  .job-meta { white-space: normal; }
}
@media print {
  .site-header, .theme-toggle, .skip-link, .hero-actions { display: none; }
  .section, .footer { padding: 24px 0; }
}
