/* ========== RESET & VARIABLES ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --text-secondary: #57534e;
  --accent: #b45309;
  --accent-hover: #92400e;
  --border: #e7e5e4;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.08), 0 2px 10px rgba(0,0,0,.04);
  --radius: 16px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --surface: #1c1917;
    --text: #fafaf9;
    --text-secondary: #a8a29e;
    --accent: #f59e0b;
    --accent-hover: #fbbf24;
    --border: #292524;
    --shadow: 0 1px 3px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,.4);
  }
}

/* ========== BASE ========== */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

/* ========== HEADER BAR ========== */
.topbar .inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar h1 { margin-left: auto; margin-bottom: 0; }
h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.2;
}

h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

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

p, li {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

ul {
  margin-left: 0;
  padding-left: 1.5em;
  list-style-position: inside;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  font-size: 1.1rem;
  color: var(--text-secondary);
}
.breadcrumb a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.breadcrumb a:hover { border-bottom-color: currentColor; }

/* ========== PAGE CONTENT ========== */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  animation: fadeUp .6s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========== CARDS / ENTRIES ========== */
.paper, .cv-entry, .cv-task, .contact-card {
  border-radius: 10px;
  transition: background var(--transition);
}
.paper:hover, .cv-entry:hover, .cv-task:hover, .contact-card:hover {
  background: var(--border);
}

.paper { padding: 6px 16px; }

.paper-title {
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.paper-meta {
  font-size: .92rem;
  line-height: 1.6;
  margin-top: 2px;
}

.paper-doi {
  font-size: .88rem;
  margin-top: 1px;
}

.paper-note {
  font-size: .85rem;
  font-style: italic;
  color: var(--text-secondary);
  opacity: .7;
  margin-top: 2px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px 32px;
}
.contact-card p { margin-bottom: 0px; }
.contact-card p:last-child { margin-bottom: 0; }

/* ========== FOOTER ========== */
footer {
  text-align: center;
  padding: 40px 24px;
  font-size: .82rem;
  color: var(--text-secondary);
  opacity: .7;
  line-height: 1.6;
}
footer a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
footer a:hover { border-bottom-color: currentColor; }

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
  .main { padding: 32px 20px 60px; }
  h2 { font-size: 1.25rem; }
}
