/* ========== CSS VARIABLES ========== */
:root {
  --primary: #006D6D;
  --primary-dark: #004D4D;
  --primary-light: #E0EFEF;
  --accent: #D4883A;
  --accent-light: #FFF3E0;

  --text: #1A1A2E;
  --text-secondary: #4A4A6A;
  --text-muted: #8888A0;

  --bg: #FFFFFF;
  --bg-alt: #F8F9FC;
  --bg-dark: #0F1629;

  --border: #E5E7EB;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --container: 1200px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

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

ul {
  list-style: none;
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 109, 109, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius);
}

/* ========== NAVBAR ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  z-index: 1000;
  transition: all var(--transition);
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition);
}

.lang-toggle:hover {
  border-color: var(--primary);
}

.lang-separator {
  color: var(--border);
}

.lang-option {
  transition: color var(--transition);
}

.lang-option.active {
  color: var(--primary);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.btn-nav {
  font-size: 0.85rem;
  padding: 8px 20px;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 109, 109, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 109, 109, 0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 109, 109, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 80px 24px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 600px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ========== SECTIONS ========== */
.section {
  padding: 100px 0;
}

.section:nth-child(even) {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== SERVICES ========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}

.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.service-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========== CASES ========== */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  position: relative;
  transition: all var(--transition);
}

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

.case-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.case-tag-dev {
  color: var(--accent);
  background: var(--accent-light);
}

.case-tag-exp {
  color: var(--primary-dark);
  background: var(--primary-light);
}

.case-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.case-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.case-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.case-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.case-features li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}

.case-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.5;
}

.case-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}

.case-link:hover {
  color: var(--primary-dark);
  gap: 4px;
}

/* Telegram CTA Button */
.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0088cc;
  color: white;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-telegram:hover {
  background: #006699;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
  color: white;
}

.btn-telegram svg {
  flex-shrink: 0;
}

/* Featured case card */
.case-card-featured {
  border-color: var(--primary);
  border-width: 2px;
}

.case-card-featured:hover {
  border-color: var(--primary-dark);
}

/* ========== ABOUT ========== */
.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 64px;
  align-items: start;
}

.photo-placeholder {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.photo-placeholder svg {
  width: 100%;
  height: 100%;
}

.founder-photo {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.about-text h3 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.about-role {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.about-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.credentials {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.credential {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text);
}

.credential svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.iacp-talk {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}

.talk-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 8px;
}

.talk-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  font-style: italic;
  margin-bottom: 4px;
}

.talk-event {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== LINKEDIN BUTTON ========== */
.btn-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #0A66C2;
  color: white;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  margin-top: 24px;
}

.btn-linkedin:hover {
  background: #004182;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 102, 194, 0.35);
  color: white;
}

.btn-linkedin svg {
  flex-shrink: 0;
}

/* ========== PUBLICATIONS ========== */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pub-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

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

.pub-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
}

.pub-type {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 4px;
}

.pub-card h3 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.pub-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition);
}

.pub-link:hover {
  color: var(--primary-dark);
  gap: 10px;
}

.publications-grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.publications-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.publications-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }

/* Publications section compact padding */
.publications {
  padding: 60px 0;
}

.publications .section-header {
  margin-bottom: 32px;
}

/* ========== SOCIAL CTA ========== */
.social-cta {
  text-align: center;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--primary-light), var(--bg));
  border-radius: var(--radius-xl);
  max-width: 700px;
  margin: 0 auto;
}

.social-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.social-cta p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.social-icons-row {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.social-icon-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ========== FOOTER ========== */
.footer {
  background: var(--bg-dark);
  color: #FFFFFF;
  padding: 80px 0 32px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 32px;
}

.footer-logo {
  height: 32px;
  width: auto;
  margin-bottom: 16px;
}

.footer-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}

.footer-cta {
  display: inline-flex;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a,
.footer-col li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ========== ANIMATIONS ========== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation for grid items */
.services-grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.services-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.services-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.services-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.services-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.services-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }
.services-grid .animate-on-scroll:nth-child(7) { transition-delay: 0.35s; }

.cases-grid .animate-on-scroll:nth-child(1) { transition-delay: 0s; }
.cases-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.cases-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }

/* ========== RESPONSIVE ========== */
@media (max-width: 968px) {
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child a {
    border-bottom: none;
  }

  .hamburger {
    display: flex;
  }

  .btn-nav {
    display: none;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .photo-placeholder,
  .founder-photo {
    max-width: 200px;
    margin: 0 auto;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .section {
    padding: 72px 0;
  }

  .hero-content {
    padding: 48px 24px;
  }

  .hero-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .stat-divider {
    display: none;
  }

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

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

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

  .footer-links {
    grid-template-columns: 1fr;
  }

  .social-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .service-card {
    padding: 24px;
  }

  .case-card {
    padding: 28px 24px;
  }
}
