/* =========================
   Variables
   ========================= */

:root {
  --color-bg: #f7f7f5;
  --color-text: #222;
  --color-muted: #666;
  --color-accent: #158037;

  --font-ui: "Inter", sans-serif;
  --font-body: "Source Serif 4", serif;
  --text-small: 0.875rem;

  --page-width: 900px;
  --sidebar-width: 150px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
}

/* =========================
   Reset and base styles
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-ui);
  line-height: 1.3;
}

p {
  margin: 0 0 var(--space-2);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: var(--color-accent);
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

img {
  display: block;
  max-width: 100%;
}

/* =========================
   Page layout
   ========================= */

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: var(--space-3);
  min-height: 100vh;
}

.site-header {
  margin-bottom: 4rem;
}

.main-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.sidebar {
  flex: 0 0 var(--sidebar-width);
}

.content {
  flex: 1;
  min-width: 0;
}

/* =========================
   Header navigation
   ========================= */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-family: var(--font-ui);
}

.nav-logo {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.language-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--color-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
  font: inherit;
  font-size: var(--text-small);
  line-height: 1.2;
}

.language-toggle:hover,
.language-toggle:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.language-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.language-toggle [data-language-option].is-active {
  color: var(--color-accent);
  font-weight: 700;
}

/* =========================
   Profile photo
   ========================= */

.logo {
  display: block;
  width: 150px;
  height: 150px;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   Social links
   ========================= */

.social-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.social-links a {
  color: var(--color-muted);
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.social-links a:hover {
  color: var(--color-accent);
}

/* =========================
   Sections
   ========================= */

.section {
  display: none;
}

.section.is-active {
  display: block;
}

/* =========================
   About
   ========================= */

#about strong {
  color: var(--color-accent);
}

/* =========================
   Projects
   ========================= */

.project-title {
  margin-bottom: var(--space-1);
  font-size: 1.25rem;
  font-weight: 600;
}

.project-desc {
  margin-bottom: var(--space-1);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  color: var(--color-muted);
  font-family: var(--font-ui);
  font-size: var(--text-small);
}

/* =========================
   Responsive layout
   ========================= */

@media (max-width: 800px) {
  .site-header {
    margin-bottom: var(--space-4);
  }

  .main-content {
    flex-direction: column;
  }

  .sidebar {
    flex: none;
    width: 100%;
  }

  .content {
    width: 100%;
  }
}
