:root {
  --bg: #f3f5f2;
  --text: #1d2b2a;
  --muted: #556765;
  --accent: #2f6f6b;
  --on-accent: #ffffff;
  --surface: #e4ebe7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14201f;
    --text: #eef3f1;
    --muted: #a8bbb7;
    --accent: #7cc4bd;
    --on-accent: #0f1a19;
    --surface: #1b2c2b;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

/* Welcome */

.welcome {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 2rem 1.25rem;
  text-align: center;
}

.portrait {
  width: min(70vw, 280px);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 6px solid var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Education */

.education {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 1.25rem 6rem;
}

.education h2 {
  margin: 0 0 2.5rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 400;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.75rem;
  border-left: 2px solid var(--accent);
}

.entry {
  position: relative;
  padding-bottom: 2.5rem;
}

.entry:last-child {
  padding-bottom: 0;
}

.entry::before {
  content: "";
  position: absolute;
  left: calc(-1.75rem - 7px);
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.entry p,
.entry h3 {
  margin: 0;
}

.years {
  color: var(--muted);
  font-size: 0.95rem;
}

.entry h3 {
  margin-top: 0.15rem;
  font-size: 1.4rem;
  font-weight: 400;
}

.school {
  margin-top: 0.1rem;
  color: var(--accent);
}

.details {
  margin-top: 0.6rem;
  max-width: 34rem;
}

/* Contact */

.contact {
  background: var(--surface);
  text-align: center;
  padding: 4.5rem 1.25rem 5rem;
  border-top: 4px solid var(--accent);
}

.contact h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 400;
}

.contact-text {
  margin: 0 auto 2rem;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.1rem;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.6rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  font-size: 1.1rem;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.contact-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.contact-button:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 4px;
}

.contact-button svg {
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .contact-button {
    transition: none;
  }
  .contact-button:hover {
    transform: none;
  }
}

/* Language button */

.lang-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  padding: 0.5rem 1.1rem;
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-toggle:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.lang-toggle:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .lang-toggle {
    transition: none;
  }
}
