:root {
  color-scheme: light;
  --bg: #f7f0e4;
  --paper: #fffaf1;
  --paper-strong: #f0dfc7;
  --ink: #28241f;
  --muted: #675e52;
  --soft: #8c7b68;
  --line: rgba(83, 65, 45, 0.22);
  --terracotta: #a95435;
  --olive: #59633c;
  --ochre: #b88534;
  --clay: #c98964;
  --shadow: 0 24px 70px rgba(70, 49, 26, 0.14);
  --radius: 8px;
  --max: 1180px;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(169, 84, 53, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(89, 99, 60, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, var(--bg), #fbf6ec 48%, #ead8bf);
  background-size: 84px 84px, 84px 84px, auto;
  color: var(--ink);
  line-height: 1.7;
  min-width: 320px;
}

html[lang="en"] body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

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

.skip-link {
  background: var(--olive);
  color: white;
  font-weight: 800;
  inset-inline-start: 1rem;
  padding: 0.75rem 1rem;
  position: fixed;
  text-decoration: none;
  top: -5rem;
  z-index: 50;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 241, 0.9);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr auto;
  inset-inline: 0;
  min-height: 4.6rem;
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 0.7rem;
  font-weight: 900;
  min-width: max-content;
  text-decoration: none;
}

.brand-mark {
  background: var(--terracotta);
  color: white;
  display: grid;
  height: 2.4rem;
  place-items: center;
  width: 2.4rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  justify-content: center;
}

nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 800;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--terracotta);
}

.language-toggle {
  background: #eadbc7;
  border: 1px solid var(--line);
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  min-width: 11.5rem;
  padding: 0.25rem;
}

.lang-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  min-height: 2.35rem;
  padding: 0.42rem 0.65rem;
}

.lang-button.active {
  background: var(--ink);
  color: var(--paper);
}

.lang-button:focus-visible,
.button:focus-visible {
  outline: 3px solid rgba(169, 84, 53, 0.42);
  outline-offset: 3px;
}

.hero,
.section,
.integrity-note,
.contact,
footer {
  margin-inline: auto;
  max-width: var(--max);
  width: min(calc(100% - 2rem), var(--max));
}

.hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 0.95fr) minmax(19rem, 1.05fr);
  min-height: calc(100svh - 4.6rem);
  padding-block: clamp(3rem, 7vw, 6rem) 2.25rem;
}

.eyebrow,
.section-label {
  color: var(--terracotta);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0;
  margin: 0 0 0.8rem;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.8rem);
  letter-spacing: 0;
  line-height: 1.04;
  margin-bottom: 1.25rem;
  max-width: 13ch;
}

h2 {
  font-size: clamp(2rem, 4.1vw, 4.1rem);
  letter-spacing: 0;
  line-height: 1.08;
  margin-bottom: 0;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 0.7rem;
}

.lead,
.body-copy,
.cv-card p,
.feature-card p,
.timeline p,
.contact p,
footer {
  color: var(--muted);
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  max-width: 40rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button {
  align-items: center;
  border: 1px solid var(--line);
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.05rem;
  text-decoration: none;
}

.button.primary {
  background: var(--olive);
  border-color: var(--olive);
  color: white;
}

.button.secondary {
  background: rgba(255, 250, 241, 0.72);
  color: var(--ink);
}

.hero-visual {
  margin: 0;
}

.hero-visual img {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  object-fit: cover;
  width: 100%;
}

.hero-visual figcaption {
  color: var(--soft);
  font-size: 0.86rem;
  margin-top: 0.75rem;
}

.integrity-note {
  align-items: start;
  background: rgba(255, 250, 241, 0.7);
  border-block: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  margin-bottom: clamp(3rem, 7vw, 6rem);
  padding: 1.1rem 0;
}

.integrity-note p {
  margin: 0;
}

.note-mark {
  background: var(--terracotta);
  height: 0.75rem;
  margin-top: 0.5rem;
  width: 0.75rem;
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.split {
  display: grid;
  gap: clamp(2rem, 7vw, 6rem);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.body-copy {
  font-size: clamp(1.02rem, 1.4vw, 1.16rem);
}

.section-heading {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: 58rem;
}

.section-heading.compact {
  max-width: 44rem;
}

.cv-grid,
.portfolio-grid {
  display: grid;
  gap: 1rem;
}

.cv-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cv-card,
.feature-card {
  background: rgba(255, 250, 241, 0.78);
  border: 1px solid var(--line);
  min-height: 16rem;
  padding: clamp(1rem, 2vw, 1.35rem);
}

.cv-card ul {
  color: var(--muted);
  margin: 0;
  padding-inline-start: 1.1rem;
}

[dir="rtl"] .cv-card ul {
  padding-inline-end: 1.1rem;
  padding-inline-start: 0;
}

.muted-card {
  background: rgba(240, 223, 199, 0.62);
}

.portfolio-section {
  border-block: 1px solid var(--line);
}

.portfolio-grid {
  grid-template-columns: 1.2fr repeat(2, minmax(0, 0.9fr));
}

.image-card {
  display: grid;
  grid-row: span 2;
  padding: 0;
}

.image-card img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
}

.image-card div {
  padding: 1.35rem;
}

.feature-card {
  display: flex;
  flex-direction: column;
}

.card-icon {
  display: block;
  height: 4.8rem;
  margin-bottom: 1.3rem;
  width: 4.8rem;
}

.book-icon {
  background:
    linear-gradient(90deg, transparent 48%, rgba(40, 36, 31, 0.34) 49% 51%, transparent 52%),
    linear-gradient(var(--paper-strong), var(--paper-strong)) 0 0 / 48% 100% no-repeat,
    linear-gradient(#ead4b8, #ead4b8) 100% 0 / 48% 100% no-repeat;
  border: 2px solid var(--terracotta);
}

.chart-icon {
  align-items: end;
  border-bottom: 2px solid var(--olive);
  border-inline-start: 2px solid var(--olive);
  display: flex;
  gap: 0.45rem;
  padding: 0.45rem;
}

.chart-icon::before,
.chart-icon::after,
.doc-icon::before {
  content: "";
  display: block;
}

.chart-icon::before {
  background: var(--terracotta);
  height: 38%;
  width: 1rem;
}

.chart-icon::after {
  background: var(--ochre);
  height: 78%;
  width: 1rem;
}

.doc-icon {
  background:
    linear-gradient(var(--terracotta), var(--terracotta)) 28% 34% / 48% 2px no-repeat,
    linear-gradient(var(--olive), var(--olive)) 28% 50% / 58% 2px no-repeat,
    linear-gradient(var(--ochre), var(--ochre)) 28% 66% / 38% 2px no-repeat,
    var(--paper-strong);
  border: 2px solid var(--olive);
}

.roadmap-section {
  display: grid;
  gap: 2rem;
  grid-template-columns: 0.8fr 1.2fr;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  align-items: start;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 4rem 1fr;
  padding: 1.15rem 0;
}

.timeline span {
  color: var(--terracotta);
  font-weight: 950;
}

.timeline p {
  margin: 0;
}

.contact {
  align-items: center;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  margin-bottom: 4rem;
  padding: clamp(1.3rem, 4vw, 2.4rem);
}

.contact .section-label {
  color: var(--clay);
}

.contact h2 {
  max-width: 21ch;
}

.contact p {
  color: #d9cdbd;
  margin-bottom: 0;
  max-width: 48rem;
}

footer {
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  padding: 1.4rem 0 2.5rem;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    order: 3;
  }

  [dir="rtl"] nav {
    justify-content: flex-end;
  }

  .hero,
  .split,
  .roadmap-section {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 14ch;
  }

  .cv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }

  .image-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .site-header {
    align-items: stretch;
    display: flex;
    flex-direction: column;
  }

  .brand,
  nav {
    justify-content: center;
  }

  .language-toggle {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding-top: 2.2rem;
  }

  h1 {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
    max-width: 12ch;
  }

  .hero-actions,
  .contact {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .cv-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .cv-card,
  .feature-card {
    min-height: auto;
  }

  .timeline li {
    grid-template-columns: 3rem 1fr;
  }
}

