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

.html {
  font-size: 62.5%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.body {
  width: 100%;
  margin: 0 auto;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.6rem;
  line-height: 1.7;
  color: #2d3748;
  background-color: #f8fafb;
}

/* ===== Typography ===== */
a {
  text-decoration: none;
  color: #2d3748;
  transition: color 0.2s ease;
}
a:hover {
  color: #0d7377;
}

p {
  line-height: 1.8;
  margin-bottom: 0.5em;
}

/* ===== Layout ===== */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
@media screen and (min-width: 961px) {
  .wrapper {
    flex-direction: row;
  }
}

/* ===== Sidebar ===== */
.wrapper__sidebar {
  width: 100%;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #0d7377 0%, #14919b 100%);
  color: #fff;
}
@media screen and (min-width: 961px) {
  .wrapper__sidebar {
    width: 320px;
    min-width: 320px;
    padding: 0;
  }
}

.sidebar {
  text-align: center;
}
@media screen and (min-width: 961px) {
  .sidebar {
    position: fixed;
    width: 320px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0d7377 0%, #14919b 100%);
  }
}

@media screen and (min-width: 961px) {
  .sidebar__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
  }
}

.sidebar__introduction {
  text-align: center;
  padding: 1rem 0;
}
@media screen and (min-width: 961px) {
  .sidebar__introduction {
    padding: 2rem 1.5rem;
  }
}

.sidebar__introduction-profileimage {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.sidebar__introduction-title {
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  line-height: 1.2;
  margin: 1.2em 0.5em 0.4em;
}
.sidebar__introduction-title a {
  font-size: 2.2rem;
  color: #fff;
}
.sidebar__introduction-title a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.sidebar__introduction-description {
  margin: 0 1em;
  opacity: 0.85;
}
.sidebar__introduction-description p {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.5px;
  color: #fff;
}

.sidebar__list {
  list-style: none;
  padding: 1rem 0;
  text-align: center;
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.sidebar__list-item {
  display: inline-block;
}
.sidebar__list-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}
.sidebar__list-item a:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: #fff;
}
.sidebar__list-item svg {
  width: 1.2em;
  height: 1.2em;
  fill: currentColor;
}

/* ===== Main content area ===== */
.wrapper__main {
  width: 100%;
  flex: 1;
}
@media screen and (min-width: 961px) {
  .wrapper__main {
    margin-left: 0;
    flex: 1;
  }
}

/* ===== Header / Navigation ===== */
.header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 251, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
}
@media print {
  .header { display: none; }
}

.nav { display: none; }
@media screen and (min-width: 961px) {
  .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

.nav__list {
  margin: 0;
  list-style: none;
  padding: 0;
  width: 100%;
  background-color: #f0f4f7;
}
@media screen and (min-width: 961px) {
  .nav__list {
    display: flex;
    padding: 0 2rem;
    background-color: transparent;
  }
  .nav__list--end {
    flex-shrink: 1;
    justify-content: flex-end;
  }
}

.nav__list-item {
  text-align: center;
  white-space: nowrap;
}
.nav__list-item a,
.nav__list-item .optionswitch__label {
  display: block;
  padding: 1.2rem 1rem;
  font-size: 1.3rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #4a5568;
  transition: color 0.2s ease;
}
@media screen and (min-width: 961px) {
  .nav__list-item a,
  .nav__list-item .optionswitch__label {
    padding: 1.6rem 1rem;
    border-bottom: 2px solid transparent;
  }
  .nav__list-item a:hover,
  .nav__list-item .optionswitch__label:hover {
    color: #0d7377;
  }
  .nav__list-item:not(:last-child) {
    margin-right: 0.5rem;
  }
}

.nav__link--active { color: #0d7377 !important; }
@media screen and (min-width: 961px) {
  .nav__link--active { border-bottom: 2px solid #0d7377 !important; }
}

/* Hamburger */
#nav-toggle { display: none; }
#nav-toggle:checked ~ .nav { display: block; }

.navbar-burger {
  cursor: pointer;
  display: block;
  height: 3.25rem;
  position: relative;
  width: 3.25rem;
  margin-left: auto;
  padding: 6px;
}
.navbar-burger__line {
  display: block;
  height: 2px;
  left: calc(50% - 8px);
  position: absolute;
  transform-origin: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  width: 16px;
  background-color: #4a5568;
  border-radius: 1px;
}
.navbar-burger__line:nth-child(1) { top: calc(50% - 6px); }
.navbar-burger__line:nth-child(2) { top: calc(50% - 1px); }
.navbar-burger__line:nth-child(3) { top: calc(50% + 4px); }
@media screen and (min-width: 961px) {
  .navbar-burger { display: none; }
}

/* ===== Language picker ===== */
.optionswitch { position: relative; }
.optionswitch__label { cursor: pointer; white-space: nowrap; }
.optionswitch__list {
  display: none;
  list-style: none;
  padding: 0;
  position: relative;
}
@media screen and (min-width: 961px) {
  .optionswitch__list {
    border-radius: 8px;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 60px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
  }
}
.optionswitch__list-item {
  display: block;
  text-align: center;
  white-space: nowrap;
  padding-top: 1.6rem;
  color: #4a5568;
}
.optionswitch__list-item a { font-size: 1.3rem; }
@media screen and (min-width: 961px) {
  .optionswitch__list-item { padding: 0.8rem 1.2rem; }
}
.optionswitch__triangle { display: none; }
.optionswitch__picker:checked ~ .optionswitch__list { display: block; }

/* ===== Page content ===== */
.post {
  padding: 2rem 1.5rem;
}
@media screen and (min-width: 961px) {
  .post {
    padding: 3rem 4rem;
    max-width: 860px;
  }
}

.post__content a {
  color: #0d7377;
  font-weight: 500;
}
.post__content a:hover {
  color: #0a5c5f;
  text-decoration: underline;
}

.post__content h1 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  color: #1a202c;
  margin-bottom: 1rem;
}

.post__content h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.3;
  color: #1a202c;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}
.post__content h2:first-child {
  margin-top: 0;
}

.post__content h3 {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.4;
  color: #2d3748;
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}

.post__content ul,
.post__content ol {
  line-height: 1.8;
  font-weight: 400;
  padding-left: 1.5em;
  margin-bottom: 1.5rem;
}
.post__content li {
  margin-bottom: 0.4em;
}
.post__content li::marker {
  color: #0d7377;
}

.post__content img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  border-radius: 8px;
}

.post__content figure {
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  text-align: center;
}
.post__content figure img {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.post__content figure.medium { max-width: 75%; }
.post__content figure.small { max-width: 50%; }

/* ===== Hero banner ===== */
.hero {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  overflow: hidden;
}
.hero img {
  flex: 1;
  width: 50%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
}
@media screen and (min-width: 961px) {
  .hero img {
    height: 280px;
  }
}

/* ===== Intro text ===== */
.intro {
  font-size: 1.7rem;
  color: #4a5568;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.intro strong {
  color: #1a202c;
  font-weight: 600;
}

/* ===== Stats grid ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
@media screen and (min-width: 600px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.4rem 1rem;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: box-shadow 0.2s ease;
}
.stat-card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.stat-card__number {
  display: block;
  font-size: 2.6rem;
  font-weight: 800;
  color: #0d7377;
  line-height: 1.1;
}
.stat-card__label {
  display: block;
  font-size: 1.2rem;
  color: #718096;
  margin-top: 0.4rem;
  line-height: 1.3;
}

/* ===== Robot / featured image section ===== */
.featured-images {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
}
.featured-images figure {
  flex: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
.featured-images figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

/* ===== Timeline (CV) ===== */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.timeline__item {
  display: flex;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid #edf2f7;
  align-items: baseline;
}
.timeline__item:last-child {
  border-bottom: none;
}
.timeline__year {
  flex-shrink: 0;
  width: 90px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #0d7377;
  text-align: right;
}
.timeline__desc {
  flex: 1;
  font-size: 1.5rem;
  color: #4a5568;
  line-height: 1.6;
}
.timeline__desc a {
  font-size: 1.5rem;
}

/* ===== Logo grid ===== */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 1.5rem 0 2rem;
}
.logo-grid__item {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  transition: box-shadow 0.2s ease;
}
.logo-grid__item:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}
.logo-grid__item img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  border-radius: 0;
}

/* ===== Language tags ===== */
.lang-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 1rem 0;
}
.lang-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 100px;
  padding: 0.5rem 1.2rem;
  font-size: 1.4rem;
  color: #2d3748;
  font-weight: 500;
}

/* ===== Contact cards ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media screen and (min-width: 600px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.8rem;
}
.contact-card__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}
.contact-card__line {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
  font-size: 1.5rem;
  color: #4a5568;
  line-height: 1.5;
}
.contact-card__line svg {
  width: 1.6rem;
  height: 1.6rem;
  fill: #0d7377;
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #0d7377;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 1.4rem;
  font-weight: 600;
  transition: background 0.2s ease;
}
.contact-links a:hover {
  background: #0a5c5f;
  color: #fff;
  text-decoration: none;
}
.contact-links a svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

/* ===== Section spacing ===== */
.section {
  margin-bottom: 2.5rem;
}

/* ===== Image grid (legacy compat) ===== */
.row {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
}
.row::after { content: none; }
.column { flex: 1; padding: 0; }
.column img {
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  width: 100%;
  padding: 1.5rem 0;
}
.footer__list {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
}
.footer__item {
  font-size: 1.2rem;
  color: #a0aec0;
}
.footer__item:not(:first-of-type)::before {
  content: '\00B7';
  padding: 0 6px;
}
.footer__item a {
  font-size: 1.2rem;
  color: #a0aec0;
  transition: color 0.2s ease;
}
.footer__item a:hover { color: #0d7377; }

.footer__sidebar { display: none; }
.footer__sidebar .footer__item,
.footer__sidebar .footer__item a { color: rgba(255, 255, 255, 0.5); }
.footer__sidebar .footer__item a:hover { color: rgba(255, 255, 255, 0.8); }
@media screen and (min-width: 961px) {
  .footer__sidebar { display: block; padding-bottom: 2rem; }
}

.footer__base { padding: 2rem 0; border-top: 1px solid #e2e8f0; }
@media screen and (min-width: 961px) { .footer__base { display: none; } }
@media print {
  .footer__sidebar { display: block; }
  .footer__base { display: none; }
}

/* ===== Print ===== */
@media print {
  .wrapper__sidebar { width: 280px; min-width: 280px; }
  .sidebar { position: fixed; width: 280px; height: 100%; display: flex; flex-direction: column; }
  .sidebar__content { display: flex; flex-direction: column; flex-grow: 1; justify-content: center; }
  .wrapper__main { margin-left: 280px; width: calc(100% - 280px); }
}

/* ===== Dark mode ===== */
@media (prefers-color-scheme: dark) {
  .body { color: #e2e8f0; background-color: #1a202c; }
  a { color: #e2e8f0; }
  a:hover { color: #38b2ac; }

  .wrapper__sidebar,
  .sidebar { background: linear-gradient(135deg, #0a5c5f 0%, #0d7377 100%); }

  .header { background: rgba(26, 32, 44, 0.92); border-bottom-color: #2d3748; }
  .nav__list { background-color: #2d3748; }
  @media screen and (min-width: 961px) { .nav__list { background-color: transparent; } }

  .nav__list-item a,
  .nav__list-item .optionswitch__label { color: #cbd5e0; }
  .nav__list-item a:hover,
  .nav__list-item .optionswitch__label:hover { color: #38b2ac; }
  .nav__link--active { color: #38b2ac !important; }
  @media screen and (min-width: 961px) { .nav__link--active { border-bottom-color: #38b2ac !important; } }

  .navbar-burger__line { background-color: #cbd5e0; }

  .optionswitch__list { background: #2d3748; border-color: #4a5568; }
  .optionswitch__list-item { color: #cbd5e0; }

  .post__content a { color: #38b2ac; }
  .post__content a:hover { color: #4fd1c5; }
  .post__content h1 { color: #f7fafc; }
  .post__content h2 { color: #f7fafc; border-bottom-color: #4a5568; }
  .post__content h3 { color: #e2e8f0; }

  .intro { color: #cbd5e0; }
  .intro strong { color: #f7fafc; }

  .stat-card { background: #2d3748; border-color: #4a5568; }
  .stat-card__number { color: #38b2ac; }
  .stat-card__label { color: #a0aec0; }

  .featured-images figure { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }

  .timeline__item { border-bottom-color: #2d3748; }
  .timeline__year { color: #38b2ac; }
  .timeline__desc { color: #cbd5e0; }

  .logo-grid__item { background: #2d3748; border-color: #4a5568; }
  .lang-tag { background: #2d3748; border-color: #4a5568; color: #e2e8f0; }

  .contact-card { background: #2d3748; border-color: #4a5568; }
  .contact-card__title { color: #f7fafc; }
  .contact-card__line { color: #cbd5e0; }
  .contact-card__line svg { fill: #38b2ac; }
  .contact-links a { background: #0a5c5f; }
  .contact-links a:hover { background: #0d7377; }

  .column img { box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); }
  .post__content figure img { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }

  .footer__base { border-top-color: #2d3748; }
  .footer__item, .footer__item a { color: #4a5568; }
  .footer__item a:hover { color: #38b2ac; }
}

/* ===== Easter egg toast ===== */
.easter-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #2d3748;
  padding: 1.2rem 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  font-size: 1.5rem;
  font-weight: 500;
  z-index: 9999;
  transition: bottom 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  border-left: 4px solid #0d7377;
}
.easter-toast.visible {
  bottom: 2rem;
}
@media (prefers-color-scheme: dark) {
  .easter-toast { background: #2d3748; color: #e2e8f0; border-left-color: #38b2ac; }
}
