:root {
  --bg-1: #f7f3ed;
  --bg-2: #e8e5dd;
  --surface: #fffdf9;
  --text: #1d1d1b;
  --muted: #5e5a52;
  --accent: #8e5f3c;
  --border: #d9d2c8;
  --shadow: 0 12px 30px rgba(42, 34, 24, 0.09);
  --radius: 14px;
  --space-xs: 0.4rem;
  --space-sm: 0.75rem;
  --space-md: 1.2rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background: linear-gradient(145deg, var(--bg-1), var(--bg-2));
  padding: var(--space-lg) var(--space-md);
  line-height: 1.65;
}

.site-bg {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 12% 14%, rgba(142, 95, 60, 0.1), transparent 45%),
    radial-gradient(circle at 88% 82%, rgba(30, 45, 64, 0.08), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

.site-header,
main,
.site-footer {
  width: min(var(--max-width), 100%);
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  margin-bottom: var(--space-lg);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}

.brand {
  text-decoration: none;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.72);
}

.site-nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--accent);
}

.language-toggle {
  display: inline-flex;
  padding: 0.22rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
}

.language-button {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0.45rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.language-button.is-active {
  background: var(--accent);
  color: #ffffff;
}

main {
  display: grid;
  gap: var(--space-md);
}

.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
}

.route-section[hidden] {
  display: none;
}

.route-home[hidden] {
  display: none;
}

.hero-role {
  margin: 0 0 var(--space-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.hero-name,
section h2,
.entry h3,
.skill-box h3 {
  font-family: "Source Sans 3", sans-serif;
  margin: 0;
}

.hero-name {
  font-size: clamp(2rem, 7vw, 3.2rem);
  line-height: 1.08;
}

.hero-description {
  margin: var(--space-sm) 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.contact-list {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}

.contact-list li {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.62rem 0.75rem;
}

.contact-list a {
  color: inherit;
}

.contact-label {
  color: var(--muted);
  font-weight: 700;
  margin-right: 0.3rem;
}

section h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-xs);
}

#summary-content {
  margin: var(--space-sm) 0 0;
  color: var(--muted);
  max-width: 70ch;
}

.entry {
  padding: var(--space-sm) 0;
  border-top: 1px solid var(--border);
}

.entry:first-child {
  border-top: 0;
  padding-top: 0;
}

.entry h3 {
  font-size: 1.2rem;
  margin-bottom: 0.15rem;
}

.meta {
  color: var(--muted);
  font-size: 0.96rem;
  margin-bottom: var(--space-xs);
}

.entry p {
  margin: 0;
}

.skills-grid {
  display: grid;
  gap: var(--space-sm);
}

.skill-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-md);
}

.skill-box h3 {
  font-size: 1.12rem;
  margin-bottom: 0.24rem;
}

.skill-box p {
  margin: 0;
  color: var(--muted);
}

.subsection-title {
  font-size: 1.2rem;
  margin: var(--space-md) 0 var(--space-xs);
}

.subsection-title:first-child {
  margin-top: 0;
}

.cv-frame-wrapper {
  margin-top: var(--space-md);
}

.cv-frame {
  display: block;
  width: 100%;
  min-height: 80vh;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
}

.cv-fallback {
  margin: var(--space-sm) 0 0;
  color: var(--muted);
}

.publication-list,
.conference-list,
.award-list {
  margin: var(--space-sm) 0 0;
  padding-left: 1.1rem;
}

.publication-list li,
.conference-list li,
.award-list li {
  margin-bottom: 0.45rem;
}

.site-footer {
  margin-top: var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-md) var(--space-lg);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

@media (min-width: 700px) {
  body {
    padding: var(--space-xl) var(--space-lg);
  }

  .skills-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.2rem;
  }
}

@media (max-width: 520px) {
  .section-card,
  .site-footer {
    padding: var(--space-md);
  }
}
