/* ── Variables ── */
:root {
  --bg:       #f4f1ec;
  --surface:  #ffffff;
  --ink:      #1a1a1a;
  --ink-2:    #6b6b6b;
  --accent:   #c8553d;
  --accent-2: #e8a87c;
  --border:   #e0dbd4;
  --radius:   12px;
  --shadow:   0 2px 12px rgba(0,0,0,0.06);
  --max-w:    900px;
  --header-h: 72px;
}

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

/* ── Background pattern (visible on sides of box in desktop) ── */
html {
  scroll-behavior: smooth;
  background-color: #b8aa9a;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%221.5%22%20fill%3D%22%23887060%22%20fill-opacity%3D%220.28%22%2F%3E%3C%2Fsvg%3E");
}

/* ── Body = the box ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
}

/* Box shadow only when viewport is clearly wider than the box */
@media (min-width: 940px) {
  body {
    box-shadow:
      0 0 0 1px rgba(0,0,0,0.06),
      0 8px 60px rgba(0,0,0,0.18),
      0 2px 12px rgba(0,0,0,0.08);
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ── Utilities ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 52px 0;
}

/* Sticky header anchor compensation */
section[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ── Language Switcher ── */
.lang-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.lang-nav button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  line-height: 1;
}

.lang-nav button:hover,
.lang-nav button.active {
  color: var(--accent);
  background: rgba(200, 85, 61, 0.08);
}

/* ── Header (sticky, part of document flow) ── */
header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(244, 241, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar img,
.avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Navigation ── */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  align-items: center;
  justify-content: flex-end;
}

nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 6px 10px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.02em;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  background: rgba(200, 85, 61, 0.07);
}

/* ── Hero ── */
.hero {
  padding-top: 56px;
  padding-bottom: 44px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
}

.hero-avatar {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(200, 85, 61, 0.25);
}

.hero-avatar img,
.hero-avatar svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1.05rem;
  color: var(--ink-2);
  max-width: 620px;
  font-weight: 300;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #b04732;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 85, 61, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Section headings ── */
.section-title {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 0.88rem;
  color: var(--ink-2);
  margin-bottom: 30px;
  font-family: 'Space Mono', monospace;
  line-height: 1.6;
}

/* Fine-tuning per section */
#approach {
  padding-top: 42px;
}

#contact {
  padding-bottom: 70px;
}

/* ── Intro / text blocks ── */
.intro-block,
.text-block,
.placeholder-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.7;
  text-align: left;
  box-shadow: var(--shadow);
}

/* ── AI Questions block ── */
.ai-questions {
  margin-bottom: 28px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-questions p {
  font-size: 0.97rem;
  color: var(--ink);
  font-style: italic;
  line-height: 1.5;
  opacity: 0.82;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card p {
  font-size: 0.84rem;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ── Contact Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 520px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
}

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  min-height: 120px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-2);
  opacity: 0.6;
}

.form-status {
  font-size: 0.82rem;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}

.form-status.info {
  display: block;
  background: rgba(200, 85, 61, 0.08);
  color: var(--accent);
}

.form-status.success {
  display: block;
  background: rgba(60, 140, 80, 0.1);
  color: #3c8650;
}

.form-status.error {
  display: block;
  background: rgba(200, 60, 60, 0.1);
  color: #c83c3c;
}

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  margin-top: 16px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--ink-2);
}

/* ── Responsive ── */
@media (max-width: 600px) {

  .section {
    padding: 42px 0;
  }

  .container {
    padding: 0 20px;
  }

  .header-top {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px 0;
  }

  .avatar {
    order: 1;
  }

  .lang-nav {
    order: 2;
    gap: 8px;
  }

  .lang-nav button {
    font-size: 0.88rem;
    padding: 8px 12px;
    border-radius: 6px;
    letter-spacing: 0.06em;
  }

  nav {
    order: 3;
    justify-content: flex-start;
    gap: 2px 6px;
    width: 100%;
  }

  nav a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  /* No header compensation needed — sticky header is in flow */
  .hero {
    padding-top: 36px;
    padding-bottom: 36px;
  }

  .hero-inner {
    gap: 22px;
  }

  .hero-avatar {
    width: 146px;
    height: 146px;
  }

  .hero-text p {
    font-size: 0.98rem;
  }

  .section-sub {
    margin-bottom: 24px;
  }

  .intro-block,
  .text-block,
  .placeholder-block {
    padding: 24px 22px;
  }

  .card {
    padding: 20px;
  }

  /* Taller sticky header on mobile needs more scroll margin */
  section[id] {
    scroll-margin-top: 130px;
  }

  #contact {
    padding-bottom: 56px;
  }

  footer {
    margin-top: 0;
    padding: 30px 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
