/* =========================================
   Dyslexia-friendly + professional palette
   ========================================= */
:root {
  /* Core Base Colors */
  --bg: #f7f4ef;                /* Soft warm background */
  --surface: #fcfbf7;           /* Warm cream surface */
  --surface-hover: #f5f1ea;     /* Warm hover fill */
  --surface-active: #f0ebe3;    /* Pressed/active state */
  --text: #2c2420;              /* Soft dark brown text */
  --text-muted: #5c534c;        /* Secondary text */
  --border: #ddd5cb;            /* Warm soft border */
  --border-hover: #b8a99a;      /* Hover border */
  --accent: #4a3f35;            /* Dark warm accent */
  --focus: #c4a574;             /* Soft gold focus ring */

  /* Contact Cards Palette */
  --card-bg: #faf7f2;           /* Modified soft cream card background */

  /* Platform & Pictogram Brand Colors */
  --contact-bar-bg: #3c2f2f;
  --brand-location: #9E1B42; /* Rich Crimson */
  --brand-phone:    #1C5D42; /* Deep Jade Green */
  --brand-email:    #1B365D; /* Executive Slate Navy */
  --brand-whatsapp: #0E6B47; /* Deep Forest Emerald */
  --brand-telegram: #1D638B; /* Ocean Blue */
  --brand-viber:    #5B2D73; /* Royal Velvet Purple */ 

  /* Shared Overlays & Shadows */
  --overlay-light: rgba(255, 255, 255, 0.12);
  --overlay-active: rgba(255, 255, 255, 0.25);
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-card: rgba(0, 0, 0, 0.05);
  --shadow-dark: rgba(0, 0, 0, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
  color: var(--text);
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
  background: var(--bg);
}

header {
  margin-bottom: 2rem;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

header h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

/* Language switcher (Brown pill container) */
.lang-switch {
  display: flex;
  gap: 0.35rem;
  padding: 0.35rem;
  background: var(--contact-bar-bg);
  border-radius: 8px;
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.lang-btn img {
  display: block;
  border-radius: 2px;
}

.lang-btn[aria-pressed="true"] {
  background: var(--overlay-active);
  border-color: var(--focus);
}

.lang-btn:hover {
  background: var(--overlay-light);
}

/* ========== Hero / Bio Section Layout ========== */
.hero-section {
  margin-bottom: 2.5rem;
}

.hero-container {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.hero-photo {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 12px var(--shadow-light);
  border: 1px solid var(--border);
  justify-self: center;
}

.hero-bio {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-bio h2 {
  margin-bottom: 0.25rem;
}

.hero-intro {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

.hero-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.hero-bullets li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.hero-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: -0.1rem;
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: bold;
}

.hero-bullets strong {
  color: var(--text);
  margin-right: 0.3rem;
}

.hero-bullets span {
  color: var(--text-muted);
}

/* Sections */
section {
  margin-bottom: 2rem;
}

h2 {
  font-size: 1.4rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.3rem;
}

/* ========== Shared Brand Colors (Scoped DRY) ========== */
:is(.pictogram-box, .messenger-chip, .mobile-contact-btn)[data-contact="telegram"] { background-color: var(--brand-telegram); }
:is(.pictogram-box, .messenger-chip, .mobile-contact-btn)[data-contact="whatsapp"] { background-color: var(--brand-whatsapp); }
:is(.pictogram-box, .messenger-chip, .mobile-contact-btn)[data-contact="viber"]    { background-color: var(--brand-viber); }
:is(.pictogram-box, .messenger-chip, .mobile-contact-btn)[data-contact="phone"]    { background-color: var(--brand-phone); }
:is(.pictogram-box, .messenger-chip, .mobile-contact-btn)[data-contact="email"]    { background-color: var(--brand-email); }
:is(.pictogram-box, .messenger-chip, .mobile-contact-btn)[data-contact="location"] { background-color: var(--brand-location); }

/* ========== Contact Section Grid ========== */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.contact-card {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
}

.contact-card-align-top {
  align-items: flex-start;
}

.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-card);
}

.contact-card-link {
  cursor: pointer;
}

.contact-card-link:hover {
  text-decoration: none;
}

/* Pictogram Box */
.pictogram-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.contact-card:hover .pictogram-box {
  transform: scale(1.05);
}

.pictogram-box img {
  display: block;
  width: 20px;
  height: 20px;
}

.contact-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.phone-link {
  font-weight: 600;
  color: var(--text);
}

.phone-link:hover {
  color: var(--accent);
}

.email-link {
  font-weight: 600;
  color: var(--text);
}

.messenger-chips {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.messenger-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: transform 0.15s, opacity 0.15s;
}

.messenger-chip:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.messenger-chip img {
  display: block;
  width: 15px;
  height: 15px;
}

.contact-value {
  font-size: 1.05rem;
}

.contact-intro-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.1rem;
}

.contact-intro-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.consult-list {
  margin: 0 0 0.6rem 1.2rem;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.consult-list li {
  margin-bottom: 0.25rem;
}

.location-workplace {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
  margin-top: 0.4rem;
  line-height: 1.35;
}

.contact-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Accessibility Focus States */
a:focus-visible,
.lang-btn:focus-visible,
.mobile-contact-btn:focus-visible,
.messenger-chip:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 3rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ========== Navigation Bar / Sidebar ========== */
.mobile-contacts {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--contact-bar-bg);
  padding: 0.6rem 0.5rem;
  padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 12px var(--shadow-dark);
  transition: all 0.25s ease;
}

.mobile-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: var(--bg);
  transition: transform 0.15s, opacity 0.15s;
}

.mobile-contact-btn:active {
  transform: scale(0.92);
}

.mobile-contact-btn:hover {
  opacity: 0.9;
}

.mobile-contact-btn img {
  display: block;
  width: 20px;
  height: 20px;
}

.sidebar-divider {
  display: none;
}

/* Desktop & Wide Screens: Left Sidebar Strategy */
@media (min-width: 900px) {
  body {
    padding-left: calc(72px + 1.5rem);
    padding-bottom: 2rem;
  }

  .mobile-contacts {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 72px;
    height: 100vh;
    flex-direction: column;
    justify-content: center;
    gap: 0.85rem;
    padding: 1.5rem 0.5rem;
    box-shadow: 2px 0 12px var(--shadow-dark);
    border-radius: 0;
  }

  .sidebar-divider {
    display: block;
    width: 32px;
    height: 1px;
    background: var(--overlay-light);
    margin: 0.25rem 0;
  }

  .nav-anchor {
    background: var(--overlay-light);
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .hero-photo {
    max-width: 170px;
  }
}

@media (max-width: 520px) {
  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
