:root {
  --bg: #f3f1e8;
  --ink: #182423;
  --muted: #536360;
  --surface: #fffdf8;
  --accent: #0d8f6f;
  --accent-strong: #06634d;
  --line: #d8d2c2;
  --shadow: 0 14px 40px rgba(10, 32, 28, 0.08);
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

.site-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% -10%, #d6efe7 0, transparent 35%),
    radial-gradient(circle at 85% 0%, #f0d8be 0, transparent 32%),
    linear-gradient(180deg, #f3f1e8 0%, #efe8d9 100%);
  z-index: -1;
}

.container {
  width: min(1020px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(9px);
  background: rgba(243, 241, 232, 0.84);
  border-bottom: 1px solid rgba(24, 36, 35, 0.08);
}

.topbar .container {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 1.1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

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

.hero {
  padding: 5.6rem 0 3.8rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: center;
  gap: 2rem;
}

.hero-copy > p {
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.kicker {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0.8rem 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.08;
  max-width: 15.5ch;
}

.hero-photo-wrap {
  margin: 0;
  justify-self: end;
  width: min(300px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(150deg, #0d8f6f, #b8d8d1);
  box-shadow: var(--shadow);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1.2rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-strong);
}

.button-ghost {
  background: transparent;
  color: var(--accent-strong);
  border-color: rgba(13, 143, 111, 0.5);
}

.button-muted {
  border-color: #b9c1bf;
  color: #6b7674;
  pointer-events: none;
}

.panel {
  margin-bottom: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 1.6rem;
}

.panel h2 {
  margin-top: 0;
  font-family: "Space Grotesk", sans-serif;
  letter-spacing: -0.01em;
}

.pill-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.pill-list li {
  border-radius: 999px;
  border: 1px solid #a9b9b5;
  color: #314441;
  padding: 0.38rem 0.8rem;
  font-size: 0.89rem;
  font-weight: 600;
}

.cv-head {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cv-head p {
  margin: 0.45rem 0 0;
  color: var(--muted);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #c6d2cf;
  border-radius: 999px;
  padding: 0.2rem;
  background: #f4f8f7;
}

.lang-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #45615d;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  min-width: 2.4rem;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
}

.lang-btn.is-active {
  background: var(--accent);
  color: #fff;
}

.works-list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.85rem;
}

.work-card {
  grid-column: span 6;
  border: 1px solid #d8d3c5;
  border-radius: 14px;
  padding: 1rem;
  background: #fffcf5;
}

.work-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.04rem;
}

.work-meta {
  margin: 0.2rem 0 0.55rem;
  font-size: 0.86rem;
  color: #5e6e6b;
  font-weight: 700;
}

.work-card p {
  margin: 0;
  color: #2e403d;
}

.cv-content {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.cv-content h1,
.cv-content h2,
.cv-content h3,
.cv-content h4 {
  font-family: "Space Grotesk", sans-serif;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
  line-height: 1.2;
  max-width: none;
}

.cv-content h1 {
  font-size: 1.6rem;
}

.cv-content h2 {
  font-size: 1.3rem;
}

.cv-content h3 {
  font-size: 1.1rem;
}

.cv-content p,
.cv-content li {
  color: #273634;
}

.cv-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0 1rem;
  font-size: 0.95rem;
}

.cv-content th,
.cv-content td {
  border: 1px solid #d8d3c5;
  text-align: left;
  padding: 0.45rem 0.55rem;
  vertical-align: top;
}

.cv-content a {
  color: #095947;
}

.cv-content blockquote {
  border-left: 4px solid #bfd9d3;
  margin-left: 0;
  padding: 0.2rem 1rem;
  color: #314441;
}

.footer {
  padding: 1.8rem 0 2.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-photo-wrap {
    justify-self: start;
    width: min(260px, 70vw);
  }

  .work-card {
    grid-column: span 12;
  }
}

@media (max-width: 720px) {
  .topbar .container {
    min-height: 60px;
  }

  .nav {
    gap: 0.65rem;
  }

  .nav a {
    font-size: 0.82rem;
  }

  .panel {
    padding: 1.1rem;
    border-radius: 16px;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --line: #d6d6d6;
  }

  .site-bg,
  .topbar,
  .hero,
  #profile,
  #focus,
  #works,
  .footer {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    line-height: 1.35;
    font-size: 11pt;
  }

  .container {
    width: 100%;
    margin: 0;
  }

  #cv.panel {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
  }

  .cv-head p {
    display: none;
  }

  .cv-content {
    border-top: 0;
    padding-top: 0;
  }

  .cv-content a {
    color: #000;
    text-decoration: none;
  }

  .cv-content table,
  .cv-content th,
  .cv-content td {
    border-color: #aaa;
  }
}
