@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bg: #fafaf6;
  --bg-card: #ffffff;
  --bg-elev: #ffffff;
  --text: #0d0d1f;
  --muted: #6b6b80;
  --accent: #ff5b3e;
  --accent-2: #6366f1;
  --accent-soft: rgba(255, 91, 62, 0.10);
  --accent-line: rgba(255, 91, 62, 0.25);
  --border: #ececec;
  --border-strong: #d8d8d8;
  --max-width: 940px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 15, 30, 0.04);
  --shadow-md: 0 8px 28px rgba(15, 15, 30, 0.06);
  --shadow-lg: 0 12px 40px rgba(15, 15, 30, 0.08);
}

* { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 90% 0%, rgba(255, 91, 62, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 5% 85%, rgba(99, 102, 241, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  position: relative;
  overflow-x: hidden;
}

/* Background Canvas */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 28px 96px;
  position: relative;
  z-index: 1;
}
}

/* ---------- Typography ---------- */
h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  color: var(--text);
}

h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 48px 0 24px;
  color: var(--text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-soft);
  display: inline-block;
}

h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 28px 0 12px;
  color: var(--text);
}

p {
  margin: 0 0 16px;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.7;
}

strong {
  font-weight: 600;
  color: var(--text);
}

/* ---------- Lists ---------- */
ul, ol {
  margin: 16px 0;
  padding-left: 24px;
}

li {
  margin: 10px 0;
  line-height: 1.7;
  color: var(--text);
}

li strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Nav ---------- */
nav.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

nav.top .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

nav.top .brand:hover {
  opacity: 0.7;
}

nav.top .brand .dot {
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(255, 91, 62, 0.15);
  flex-shrink: 0;
}

nav.top .links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  flex-wrap: wrap;
}

nav.top .links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

nav.top .links a:hover {
  color: var(--text);
}

nav.top .links a.current {
  color: var(--text);
  font-weight: 600;
}

nav.top .links a.current::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Hero (homepage) ---------- */
.hero {
  padding: 48px 0 56px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 32px;
  letter-spacing: 0.02em;
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 91, 62, 0.15);
  flex-shrink: 0;
}

.hero .name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  max-width: 780px;
}

.hero .name .accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 700;
}

.hero .tagline {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 700px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: #ff4a2a;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
}

/* ---------- Subtitle/Meta ---------- */
.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 24px;
  font-weight: 500;
}

.meta {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Entries (CV, Publications) ---------- */
.entry {
  margin: 28px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.entry:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.entry:last-child {
  border-bottom: 1px solid var(--border);
}

.entry .role {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.entry .role::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

.entry .meta {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  font-weight: 500;
  padding: 8px 0;
  border-left: 2px solid var(--accent-line);
  padding-left: 12px;
}

.entry p {
  margin-bottom: 12px;
  line-height: 1.7;
  font-size: 15px;
}

.entry ul {
  margin: 12px 0;
  padding-left: 24px;
}

.entry li {
  margin: 6px 0;
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Footer ---------- */
footer {
  font-size: 13px;
  color: var(--muted);
  margin-top: 64px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-top: 2px solid var(--accent-soft);
  font-weight: 500;
  text-align: center;
}

/* ---------- Sections & Content Areas ---------- */
section {
  margin-bottom: 48px;
}

section h2 {
  margin-top: 0;
}

/* Page intro styling */
h1 + .subtitle {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

/* ---------- About Header ---------- */
.about-header {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 32px;
}

.about-header h1 {
  margin: 0;
  flex: 1;
}

/* ---------- Profile Photo ---------- */
.profile-photo-circular {
  width: 140px;
  height: 140px;
  min-width: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--accent);
  display: block;
  flex-shrink: 0;
}

/* ---------- Horizontal Rule ---------- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- Code Block ---------- */
code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  color: var(--accent);
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 14px;
  line-height: 1.6;
  margin: 16px 0;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text);
}

/* ---------- Blockquote ---------- */
blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--muted);
  font-style: italic;
  background: var(--accent-soft);
  padding: 16px 16px 16px 20px;
  border-radius: 8px;
}

/* ---------- Contact Info ---------- */
.contact-section {
  margin: 32px 0;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.contact-section p {
  margin: 8px 0;
  line-height: 1.8;
}

.contact-section br {
  content: '';
  display: block;
  height: 8px;
}

/* ---------- About Section ---------- */
.about-intro {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 32px;
  padding: 24px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(99, 102, 241, 0.08) 100%);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

/* ---------- Hover Effects ---------- */
a {
  position: relative;
}

a:not(.btn):not(.brand)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

a:not(.btn):not(.brand):hover::after {
  width: 100%;
}

/* ---------- Visual Accents ---------- */
.accent-line {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .wrap {
    padding: 24px 20px 64px;
  }

  .about-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .about-header h1 {
    flex: none;
  }

  nav.top {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  nav.top .links {
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
  }

  h1 {
    font-size: 36px;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 24px;
    margin-top: 32px;
  }

  .hero .name {
    font-size: 48px;
  }

  .hero .tagline {
    font-size: 16px;
  }

  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 20px 16px 48px;
  }

  nav.top .brand {
    font-size: 16px;
  }

  nav.top .links {
    font-size: 13px;
    gap: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .hero .name {
    font-size: 36px;
    margin-bottom: 16px;
  }

  .hero .tagline {
    font-size: 15px;
  }

  .pill {
    font-size: 12px;
    padding: 6px 12px;
  }
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 91, 62, 0.15);
  flex-shrink: 0;
}

.hero .name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin: 0 0 24px;
  max-width: 760px;
}

.hero .name .accent {
  color: var(--accent);
  font-style: italic;
}

.hero .tagline {
  font-size: 19px;
  line-height: 1.55;
  color: var(--mut