/* ==========================================================
   DESIGN SYSTEM — K. Beronov
   Extracted from Carrd template, extended for multi-page site.
   Font: Source Sans 3 (Google Fonts)
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  --color-page-bg:       #EDE7DD;
  --color-card-bg:       #FFFFFF;
  --color-section-bg:    #FAF8F2;
  --color-section-alt:   #F7F5ED;
  --color-heading:       #474542;
  --color-body:          #474542;
  --color-subtitle:      #8C857A;
  --color-border:        #E8E2D8;
  --color-btn-solid-bg:  #EDE7DD;
  --color-btn-solid-hover: #E6DFD3;
  --color-btn-outline-border: #BAB3A8;
  --color-icon:          #8C857A;
  --color-icon-hover:    #474542;

  --font-family:         'Source Sans 3', 'Source Sans Pro', -apple-system, sans-serif;
  --font-size-base:      16px;
  --card-max-width:      37rem;
  --section-padding-h:   2.5rem;
  --section-padding-v:   2.5rem;
  --content-gap:         1.5rem;
  --border-radius:       0.375rem;
}

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

html { font-size: var(--font-size-base); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-family);
  font-weight: 300;
  color: var(--color-body);
  background-color: var(--color-page-bg);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

/* --- CARD --- */
.card {
  background: var(--color-card-bg);
  max-width: var(--card-max-width);
  width: 100%;
  align-self: center;
}

/* --- SITE NAV --- */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem var(--section-padding-h);
  border: 1px solid var(--color-border);
  border-bottom: none;
  background: var(--color-section-bg);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-subtitle);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-heading);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-subtitle);
  text-decoration: none;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  padding: 0.2rem 0.5rem;
  transition: color 0.2s, border-color 0.2s;
}

.lang-toggle:hover {
  color: var(--color-heading);
  border-color: var(--color-btn-outline-border);
}

.lang-toggle svg {
  width: 0.875rem;
  height: 0.875rem;
  fill: currentColor;
  opacity: 0.7;
}

/* --- SECTIONS --- */
.section {
  background: var(--color-section-bg);
  border: 1px solid var(--color-border);
  padding: var(--section-padding-v) var(--section-padding-h);
}

.section + .section { border-top: none; }

.section--footer { background: var(--color-section-alt); }

/* --- LAYOUT --- */
.columns {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.col-main   { flex: 1; }
.col-aside  { flex: 0 0 27%; }
.col-icons  { flex: 0 0 55%; }
.col-action { flex: 0 0 45%; text-align: right; }

.content-stack {
  display: flex;
  flex-direction: column;
  gap: var(--content-gap);
}

/* --- TYPOGRAPHY --- */
.heading-1 {
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-heading);
  letter-spacing: -0.075em;
  line-height: 1.5;
}

.heading-2 {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-heading);
  letter-spacing: -0.025em;
  line-height: 1.625;
  margin-top: 0.5rem;
}

.subtitle {
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-subtitle);
  line-height: 1.5;
}

.body-text {
  font-size: 1rem;
  font-weight: 300;
  color: var(--color-body);
  line-height: 1.75;
}

.body-text a { color: var(--color-body); text-decoration: underline; }
.body-text a:hover { color: var(--color-heading); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  font-family: var(--font-family);
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  white-space: nowrap;
}

.btn:hover { transform: scale(1.02); }

.btn--solid {
  background: var(--color-btn-solid-bg);
  color: var(--color-heading);
  font-weight: 300;
  border: none;
  padding: 0.5rem 1.5rem;
  min-height: 2rem;
}

.btn--solid:hover { background: var(--color-btn-solid-hover); }

.btn--outline {
  background: transparent;
  color: var(--color-heading);
  font-weight: 400;
  border: 1px solid var(--color-btn-outline-border);
  padding: 0.625rem 1.5rem;
  min-height: 2.5rem;
}

.btn--outline:hover {
  background: var(--color-heading);
  color: var(--color-card-bg);
  border-color: var(--color-heading);
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-group--row {
  flex-direction: row;
  flex-wrap: wrap;
}

/* --- ICONS --- */
.icon-row {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.icon-link {
  display: inline-flex;
  color: var(--color-icon);
  transition: color 0.25s ease, transform 0.25s ease;
}

.icon-link:hover {
  color: var(--color-icon-hover);
  transform: scale(1.1);
}

.icon-link svg {
  width: 1.375rem;
  height: 1.375rem;
  fill: currentColor;
}

/* --- AVATAR --- */
.avatar {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  object-fit: cover;
  object-position: center;
  border-radius: var(--border-radius);
}

/* --- RESOURCE LIST --- */
.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.resource-item:first-child { padding-top: 0; }
.resource-item:last-child  { border-bottom: none; padding-bottom: 0; }

.resource-info { flex: 1; }

.resource-title {
  font-weight: 400;
  color: var(--color-heading);
  font-size: 1rem;
}

.resource-desc {
  font-size: 0.875rem;
  color: var(--color-subtitle);
  line-height: 1.5;
}

.resource-action .btn {
  font-size: 0.8125rem;
  padding: 0.375rem 1rem;
  min-height: 1.75rem;
}

/* --- COMPETENCY ITEMS --- */
.competency {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.competency:last-child { border-bottom: none; }

.competency-title {
  font-weight: 400;
  color: var(--color-heading);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.competency-text {
  font-size: 0.9375rem;
  font-weight: 300;
  color: var(--color-subtitle);
  line-height: 1.65;
}

/* --- MOBILE --- */
@media (max-width: 680px) {
  body { padding: 0; align-items: flex-start; }
  .card { max-width: 100%; }
  .columns { flex-direction: column; }
  .col-aside  { flex: none; width: 40%; order: -1; }
  .col-action { flex: none; width: 100%; text-align: left; }
  .col-icons  { flex: none; width: 100%; }
  .heading-1  { font-size: 2rem; }
  .section    { padding: 2rem; }
  .site-nav   { padding: 0.75rem 1.5rem; }
  .nav-links  { gap: 1rem; }
}

@media (max-width: 480px) {
  .heading-1 { font-size: 1.75rem; }
  .section   { padding: 1.5rem; }
  .resource-item { flex-direction: column; align-items: flex-start; }
}
