:root {
  --accent: #0054a6;
  --accent-dark: #003d7a;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --border: #e2e6ea;
  --max-width: 780px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Language switcher */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.lang-switch a.active {
  color: var(--accent);
  font-weight: 600;
}

.lang-switch a:hover {
  background: var(--bg-alt);
}

/* Header */
header.profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

header.profile img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  flex-shrink: 0;
  border: 3px solid var(--bg-alt);
}

header.profile h1 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
  font-weight: 700;
}

header.profile p.headline {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Quick links (email / LinkedIn / GitHub) under the headline */
.profile-links {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.7rem;
}

.profile-links a {
  display: inline-flex;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.profile-links a:hover,
.profile-links a:focus-visible {
  color: var(--accent);
}

.profile-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* Narrative */
section.narrative p {
  margin: 0 0 1rem;
  font-size: 1.02rem;
}

/* Sections */
h2 {
  font-size: 1.15rem;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.4rem;
  margin: 2.5rem 0 1.2rem;
}

/* Project cards */
.project {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bg-alt);
}

.project img {
  width: 100%;
  display: block;
  border-bottom: 1px solid var(--border);
}

.project-body {
  padding: 1rem 1.25rem 1.25rem;
}

.project-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.project-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-body h3 a:hover {
  color: var(--accent);
}

.project-body p {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-body .repo-link {
  font-size: 0.88rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.project-body .repo-link:hover {
  text-decoration: underline;
}

/* Contact */
.contact-section {
  text-align: center;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem 1.6rem;
}

.contact-list a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.contact-list a:hover {
  text-decoration: underline;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* Responsive */
@media (max-width: 480px) {
  header.profile {
    flex-direction: column;
    text-align: center;
  }

  .profile-links {
    justify-content: center;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #e8eaed;
    --text-muted: #a0a6ad;
    --bg: #14171a;
    --bg-alt: #1c2024;
    --border: #2a2f35;
    --accent: #4a9eff;
  }
}
