/* ============================================================
   OLGA KALININA PORTFOLIO — Shared Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
  --font: 'Inter', sans-serif;
  --dark: #292b2d;
  --gray: #707379;
  --light-gray: #ebebeb;
  --bg-soft: #fafafa;
  --blue-accent: #1947f5;
  --radius-card: 24px;
  --radius-pill: 9999px;
  --shadow-nav: 0 4px 12.8px rgba(68,130,255,0.1);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  color: var(--dark);
  background: white;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Home page — white background, no gradient */
body.home {
  background: white;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.page-content { flex: 1; padding-top: 120px; }
.container { max-width: 1187px; margin: 0 auto; padding: 0 40px; }

/* ============================================================
   NAVIGATION — Desktop
   ============================================================ */
.nav {
  position: fixed;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 16px;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(7.5px);
  -webkit-backdrop-filter: blur(7.5px);
  border: 1px solid #F5F5F5;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-nav);
  white-space: nowrap;
}

.nav-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity var(--transition);
  background: linear-gradient(135deg, #c4b5fd, #818cf8);
}
.nav-avatar:hover { opacity: 0.85; }

/* nav-links wrapper */
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* FIX: explicitly Medium weight by default, Bold only on hover/active */
.nav-links a {
  font-size: 15px;
  font-weight: 500;      /* Medium — default */
  color: var(--dark);
  transition: color var(--transition), font-weight var(--transition);
}
.nav-links a:hover  { color: var(--dark); font-weight: 600; }  /* Bold on hover */
.nav-links a.active { color: var(--dark); font-weight: 600; }  /* Bold when active */

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  flex-shrink: 0;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
}

/* ============================================================
   MOBILE MENU — frosted glass card, matches Figma
   ============================================================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 300;
  background: rgba(255,255,255,0.4);
  backdrop-filter: blur(7.5px);
  -webkit-backdrop-filter: blur(7.5px);
  border: 1px solid #F5F5F5;
  border-radius: 24px;
  box-shadow: var(--shadow-nav);
  padding: 16px 24px 24px;
  flex-direction: column;
  gap: 0;
}
.mobile-menu.open { display: flex; }

/* Top row: avatar + close button */
.mobile-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.mobile-menu-top img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.mobile-menu-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--light-gray);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  color: var(--dark);
  line-height: 1;
}

/* Menu links */
.mobile-menu-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu-links a {
  font-size: 20px;
  font-weight: 500;
  color: var(--dark);
  padding: 16px 0;
  border-bottom: 1px solid var(--light-gray);
  transition: color var(--transition);
  text-align: left;
}
.mobile-menu-links a:last-child { border-bottom: none; }
.mobile-menu-links a.active { font-weight: 600; }
.mobile-menu-links a:hover { color: var(--blue-accent); }

/* Backdrop behind mobile menu */
.mobile-menu-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 299;
}
.mobile-menu-backdrop.open { display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--bg-soft); padding: 24px 0 40px; margin-top: auto; }
.footer-inner { max-width: 1187px; margin: 0 auto; padding: 0 40px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-social-row { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; justify-content: center; }
.footer-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 16px; font-weight: 500; color: var(--dark); transition: color var(--transition); }
.footer-links a:hover { color: var(--blue-accent); }
.footer-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gray); opacity: 0.5; display: inline-block; }
.footer-socials { display: flex; align-items: center; gap: 14px; }
.footer-socials a { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; overflow: hidden; transition: opacity var(--transition); }
.footer-socials a:hover { opacity: 0.75; }
.footer-socials img { width: 32px; height: 32px; object-fit: cover; border-radius: 5px; filter: grayscale(1); opacity: 0.5; }
.footer-socials a:last-child img { opacity: 0.3; }
.footer-copy { font-size: 14px; font-weight: 500; color: var(--gray); text-align: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-dark { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; background: var(--dark); color: white; border-radius: var(--radius-pill); font-size: 18px; font-weight: 500; transition: opacity var(--transition), transform var(--transition); cursor: pointer; border: none; font-family: var(--font); }
.btn-dark:hover { opacity: 0.85; transform: translateY(-1px); }

/* ============================================================
   SECTION LABELS
   ============================================================ */
.section-label { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border: 2px solid var(--light-gray); border-radius: var(--radius-pill); font-size: 16px; font-weight: 500; color: var(--dark); }
.section-label img { width: 24px; height: 24px; object-fit: contain; }

/* ============================================================
   NDA MODAL
   ============================================================ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: white; border-radius: 20px; padding: 40px; max-width: 440px; width: 90%; box-shadow: 0 24px 64px rgba(0,0,0,0.15); display: flex; flex-direction: column; gap: 16px; }
.modal-icon { width: 48px; height: 48px; background: #f5f5f5; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.modal h2 { font-size: 20px; font-weight: 600; }
.modal p { font-size: 15px; color: var(--gray); line-height: 1.6; }
.modal-actions { display: flex; gap: 12px; margin-top: 8px; }
.modal-cancel { flex: 1; padding: 12px; border: 1.5px solid var(--light-gray); border-radius: var(--radius-pill); font-size: 15px; font-weight: 500; background: white; cursor: pointer; font-family: var(--font); color: var(--dark); transition: border-color var(--transition); }
.modal-cancel:hover { border-color: var(--dark); }
.modal-submit { flex: 1; padding: 12px; background: var(--dark); color: white; border: none; border-radius: var(--radius-pill); font-size: 15px; font-weight: 500; cursor: pointer; font-family: var(--font); transition: opacity var(--transition); text-decoration: none; display: flex; align-items: center; justify-content: center; }
.modal-submit:hover { opacity: 0.85; }

/* ============================================================
   MOBILE — max-width: 768px
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .page-content { padding-top: 96px; }

  /* Nav: shrink, show hamburger, hide links */
  .nav {
    top: 16px;
    left: 16px;
    right: 16px;
    transform: none;
    width: calc(100% - 32px);
    justify-content: space-between;
    padding: 12px 16px;
  }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }

  /* Footer */
  .footer-inner { padding: 0 20px; }
  .footer-social-row { flex-direction: column; gap: 20px; }
  .footer-links { gap: 6px; }
  .footer-links a { font-size: 14px; }

  /* Buttons */
  .btn-dark { font-size: 16px; width: 100%; justify-content: center; }

  /* Section labels */
  .section-label { font-size: 14px; padding: 10px 18px; }

  /* ── Home: hero ── */
  .hero { padding: 40px 0 0 !important; gap: 28px !important; }
  .hero-title { font-size: 24px !important; line-height: 1.4 !important; }
  .hero-sub { font-size: 16px !important; }
  .hero-photo { height: 220px !important; border-radius: 20px !important; }
  .client-logos { gap: 16px !important; flex-wrap: wrap !important; }
  .client-logos img { height: 28px !important; }

  /* ── Home: case study carousel ── */
  .carousel-slide { grid-template-columns: 1fr !important; }
  .cs-card-img img { height: 200px !important; }
  .cs-section-title { font-size: 22px !important; }
  .cs-section-sub { font-size: 16px !important; }
  .cs-section { padding: 48px 0 0 !important; }

  /* ── Home: services ── */
  .services-cards { grid-template-columns: 1fr !important; }
  .svc-card { min-height: unset !important; }
  .svc-card-title { font-size: 18px !important; }
  .svc-card-desc { font-size: 16px !important; }
  .services-section { padding: 48px 0 0 !important; }

  /* ── Home: blog ── */
  .blog-cards { grid-template-columns: 1fr !important; }
  .blog-card { height: auto !important; }
  .blog-section { padding: 48px 0 60px !important; }
  .blog-section-title { font-size: 22px !important; }
  .blog-section-sub { font-size: 16px !important; }

  /* ── Case Studies page ── */
  .cs-grid { grid-template-columns: 1fr !important; padding: 40px 0 60px !important; }
  .cs-card-full { grid-column: auto !important; }

  /* ── Blog page ── */
  .blog-grid { grid-template-columns: 1fr !important; }
  .blog-page { padding: 40px 0 60px !important; }

  /* ── Contacts page ── */
  .contacts-wrap { grid-template-columns: 1fr !important; gap: 32px !important; padding: 40px 0 60px !important; }

  /* ── About page ── */
  .about-wrap { padding: 40px 0 60px !important; gap: 32px !important; }
  .about-section h2 { font-size: 22px !important; }

  /* ── Services page ── */
  .service-title { font-size: 18px !important; }
  .service-subtitle { font-size: 16px !important; }
  .service-body { grid-template-columns: 1fr !important; }
  .tools-section { padding: 40px 0 60px !important; }
  .tools-grid { gap: 8px !important; }
  .tool-pill { font-size: 13px !important; padding: 8px 14px !important; }
}
