/* ===== Custom Properties ===== */
:root {
  --color-white: #FFFFFF;
  --color-bg: #F7F8FA;
  --color-bg-alt: #EEF1F5;
  --color-navy: #1B2A4A;
  --color-navy-light: #243556;
  --color-teal: #0E7C7B;
  --color-teal-dark: #0a6261;
  --color-teal-light: #E6F4F4;
  --color-accent: #3B82F6;
  --color-accent-light: #EFF6FF;
  --color-text: #3A3F47;
  --color-text-muted: #6B7280;
  --color-border: #D1D5DB;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-width: 1140px;
  --nav-height: 64px;
  --radius: 8px;
  --radius-lg: 12px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.625;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-navy); }
ul { list-style: none; }

/* ===== Skip Link ===== */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--color-teal); color: var(--color-white);
  padding: 0.5rem 1rem; border-radius: var(--radius);
  z-index: 200; font-size: 0.875rem;
}
.skip-link:focus { top: 0.5rem; }

/* ===== Layout ===== */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.section { padding: 3.5rem 0; }
.section--alt { background: var(--color-bg-alt); }
.section--dark { background: var(--color-navy); color: var(--color-white); }

/* ===== Typography ===== */
h1, h2, h3, h4 { color: var(--color-navy); letter-spacing: -0.02em; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-white); }

.page-header {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 50%, var(--color-teal-dark) 100%);
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(14,124,123,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59,130,246,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.page-header h1 {
  font-size: 2.25rem; font-weight: 700; color: var(--color-white);
  margin-bottom: 0.75rem; position: relative;
}
.page-header p {
  font-size: 1.125rem; color: rgba(255,255,255,0.7);
  max-width: 600px; margin: 0 auto; position: relative; line-height: 1.7;
}

.section-heading {
  font-size: 1.875rem; font-weight: 700; color: var(--color-navy);
  margin-bottom: 0.75rem;
}
.section-intro {
  font-size: 1.0625rem; color: var(--color-text-muted);
  max-width: 640px; margin-bottom: 2.5rem; line-height: 1.75;
}

/* ===== Navigation ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav-container {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-height); max-width: var(--max-width);
  margin: 0 auto; padding: 0 1rem;
}
.nav-logo {
  font-size: 1.2rem; font-weight: 700; color: var(--color-navy);
  letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem;
}
.nav-logo:hover { color: var(--color-teal); }
.nav-logo-icon {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--color-teal), var(--color-navy));
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 0.7rem; font-weight: 700;
}
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--color-navy);
  border-radius: 2px; transition: transform 0.2s, opacity 0.2s;
}
.nav-links {
  display: none; position: absolute; top: var(--nav-height);
  left: 0; right: 0; background: rgba(255,255,255,0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem; flex-direction: column; gap: 0.25rem;
}
.nav-links--open { display: flex; }
.nav-links a {
  display: block; padding: 0.625rem 1rem; color: var(--color-text);
  font-size: 0.9375rem; font-weight: 500; border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-teal); background: var(--color-teal-light);
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-block; background: var(--color-teal); color: var(--color-white);
  padding: 0.75rem 1.75rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--color-teal-dark); color: var(--color-white); transform: translateY(-1px); }
.btn-outline {
  display: inline-block; border: 2px solid var(--color-teal); color: var(--color-teal);
  padding: 0.625rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--color-teal); color: var(--color-white); }

/* ===== Hero (Home) ===== */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 40%, #1a3a5c 100%);
  padding: 5rem 0 4rem;
  position: relative; overflow: hidden;
  min-height: 80vh; display: flex; align-items: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 75% 40%, rgba(14,124,123,0.2) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 20% 70%, rgba(59,130,246,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
  align-items: center; position: relative; z-index: 1;
}
.hero-content h1 {
  font-size: 2.5rem; font-weight: 700; color: var(--color-white);
  line-height: 1.15; margin-bottom: 1.25rem;
}
.hero-content h1 span { color: var(--color-teal); display: inline; }
.hero-tagline {
  font-size: 1.125rem; color: rgba(255,255,255,0.75);
  line-height: 1.7; margin-bottom: 2rem; max-width: 520px;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-hero-outline {
  display: inline-block; border: 2px solid rgba(255,255,255,0.3); color: var(--color-white);
  padding: 0.625rem 1.5rem; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem;
  transition: background 0.2s, border-color 0.2s;
}
.btn-hero-outline:hover { border-color: var(--color-white); color: var(--color-white); background: rgba(255,255,255,0.08); }

/* Hero Infographic */
.hero-visual { display: flex; justify-content: center; }
.hero-infographic {
  width: 100%; max-width: 480px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(8px);
}
.info-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.info-stat {
  text-align: center; padding: 1rem 0.5rem;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
}
.info-stat-number {
  font-size: 2rem; font-weight: 700; color: var(--color-teal);
  line-height: 1.1; margin-bottom: 0.25rem;
}
.info-stat-label {
  font-size: 0.75rem; color: rgba(255,255,255,0.55);
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500;
}
.info-bar {
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.info-bar-label {
  font-size: 0.75rem; color: rgba(255,255,255,0.5);
  margin-bottom: 0.625rem; font-weight: 500;
}
.info-bar-track {
  height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px;
  overflow: hidden; display: flex; gap: 2px;
}
.info-bar-seg {
  height: 100%; border-radius: 3px;
  transition: width 0.6s ease;
}

/* ===== Stat Cards Row ===== */
.stats-row {
  display: grid; grid-template-columns: 1fr; gap: 1rem;
  margin-top: -2rem; position: relative; z-index: 2;
  padding: 0 1rem;
}
.stat-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  display: flex; align-items: flex-start; gap: 1rem;
  border: 1px solid var(--color-border);
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon--teal { background: var(--color-teal-light); color: var(--color-teal); }
.stat-icon--blue { background: var(--color-accent-light); color: var(--color-accent); }
.stat-icon--navy { background: #E8EBF0; color: var(--color-navy); }
.stat-card h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.stat-card p { font-size: 0.8125rem; color: var(--color-text-muted); line-height: 1.5; }

/* ===== Client Work ===== */
.category-block { margin-bottom: 3rem; }
.category-block:last-child { margin-bottom: 0; }
.category-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem; padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-teal-light);
}
.category-icon-wrap {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--color-teal-light); color: var(--color-teal);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.category-icon-wrap svg { width: 22px; height: 22px; }
.category-title {
  font-size: 1.375rem; font-weight: 600; color: var(--color-navy);
  border: none; padding: 0;
}
.category-desc {
  font-size: 0.875rem; color: var(--color-text-muted); margin-top: 0.125rem;
}
.project-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.project-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  padding: 1.5rem; border: 1px solid var(--color-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s, transform 0.15s;
  position: relative;
}
.project-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: linear-gradient(90deg, var(--color-teal), var(--color-accent));
  opacity: 0; transition: opacity 0.2s;
}
.project-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.project-card:hover::before { opacity: 1; }
.project-card h4 { font-size: 1.0625rem; font-weight: 600; color: var(--color-navy); margin-bottom: 0.5rem; }
.project-card p { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.6; margin-bottom: 0.75rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag {
  background: var(--color-teal-light); color: var(--color-teal);
  font-size: 0.75rem; font-weight: 500;
  padding: 0.1875rem 0.625rem; border-radius: 9999px;
}

/* ===== Research ===== */
.research-area {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
  padding-bottom: 3rem; margin-bottom: 3rem;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}
.research-area:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.research-text h3 {
  font-size: 1.375rem; font-weight: 600; color: var(--color-navy); margin-bottom: 0.75rem;
}
.research-label {
  display: inline-block; font-size: 0.6875rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.1875rem 0.5rem; border-radius: 4px;
  margin-bottom: 0.625rem;
}
.research-label--foundational { background: var(--color-teal-light); color: var(--color-teal); }
.research-label--frontier { background: #FEF3C7; color: #92400E; }
.research-text p {
  font-size: 1rem; color: var(--color-text); line-height: 1.7; margin-bottom: 1rem;
}
.research-topics {
  list-style: none; padding-left: 0;
  display: flex; flex-direction: column; gap: 0.375rem;
}
.research-topics li {
  font-size: 0.9375rem; color: var(--color-text-muted);
  padding-left: 1.25rem; position: relative;
}
.research-topics li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--color-teal); opacity: 0.6;
}
.research-diagram {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-bg); border-radius: var(--radius-lg);
  padding: 1.5rem; min-height: 200px;
  border: 1px solid var(--color-border);
}
.research-diagram svg { width: 100%; max-width: 360px; height: auto; }

/* Frontier / cutting-edge section */
.frontier-intro {
  text-align: center; max-width: 700px; margin: 0 auto 3rem;
}
.frontier-intro h2 {
  font-size: 1.875rem; font-weight: 700; color: var(--color-navy); margin-bottom: 0.75rem;
}
.frontier-intro p {
  font-size: 1.0625rem; color: var(--color-text-muted); line-height: 1.75;
}
.frontier-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
.frontier-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  padding: 2rem; border: 1px solid var(--color-border);
  transition: box-shadow 0.2s, transform 0.15s;
  position: relative; overflow: hidden;
}
.frontier-card::after {
  content: ''; position: absolute; top: 0; left: 0; bottom: 0;
  width: 4px;
}
.frontier-card:nth-child(1)::after { background: var(--color-teal); }
.frontier-card:nth-child(2)::after { background: var(--color-accent); }
.frontier-card:nth-child(3)::after { background: #8B5CF6; }
.frontier-card:nth-child(4)::after { background: #F59E0B; }
.frontier-card:nth-child(5)::after { background: #EC4899; }
.frontier-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); }
.frontier-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.frontier-card h3 { font-size: 1.125rem; font-weight: 600; color: var(--color-navy); margin-bottom: 0.5rem; }
.frontier-card p { font-size: 0.9375rem; color: var(--color-text-muted); line-height: 1.65; }
.frontier-topics {
  margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.375rem;
}
.frontier-tag {
  font-size: 0.6875rem; font-weight: 500; padding: 0.1875rem 0.5rem;
  border-radius: 4px; background: var(--color-bg-alt); color: var(--color-text-muted);
}

/* ===== About ===== */
.about-content {
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
  margin-bottom: 3rem;
}
.about-text h3 { font-size: 1.375rem; font-weight: 600; margin-bottom: 0.75rem; }
.about-text p { font-size: 1rem; color: var(--color-text); line-height: 1.75; margin-bottom: 1rem; }
.about-values { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
.about-value {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem; background: var(--color-white);
  border-radius: var(--radius); border: 1px solid var(--color-border);
}
.about-value-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; background: var(--color-teal-light); color: var(--color-teal);
}
.about-value-icon svg { width: 16px; height: 16px; }
.about-value h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.125rem; }
.about-value p { font-size: 0.8125rem; color: var(--color-text-muted); line-height: 1.5; }
.about-visual {
  display: flex; align-items: center; justify-content: center;
}
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem;
}
.team-card {
  background: var(--color-white); border-radius: var(--radius-lg);
  padding: 1.5rem 1rem; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); border: 1px solid var(--color-border);
  transition: transform 0.15s, box-shadow 0.2s;
}
.team-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.team-avatar {
  width: 72px; height: 72px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.team-avatar svg { width: 40px; height: 40px; color: var(--color-text-muted); }
.team-name { font-size: 1rem; font-weight: 600; color: var(--color-navy); margin-bottom: 0.25rem; }
.team-role { font-size: 0.8125rem; font-weight: 500; color: var(--color-teal); margin-bottom: 0.375rem; }
.team-expertise { font-size: 0.75rem; color: var(--color-text-muted); line-height: 1.4; }

/* ===== Contact ===== */
.contact-section {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 50%, var(--color-teal-dark) 100%);
  text-align: center; padding: 5rem 0;
  position: relative; overflow: hidden;
}
.contact-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(14,124,123,0.12) 0%, transparent 60%);
  pointer-events: none;
}
.contact-inner { position: relative; z-index: 1; }
.contact-section .section-heading { color: var(--color-white); }
.contact-text { font-size: 1.125rem; color: rgba(255,255,255,0.65); margin-bottom: 2rem; }
.contact-email {
  font-size: 1.5rem; font-weight: 600; color: var(--color-teal-light);
  border-bottom: 2px solid transparent; transition: border-color 0.2s, color 0.2s;
}
.contact-email:hover { color: var(--color-white); border-bottom-color: var(--color-white); }
.contact-sub {
  margin-top: 2rem; font-size: 0.875rem; color: rgba(255,255,255,0.4);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-navy); border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0; text-align: center;
}
.footer-inner {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.footer p { font-size: 0.8125rem; color: #64748B; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.8125rem; color: #64748B; transition: color 0.2s; }
.footer-links a:hover { color: var(--color-teal-light); }

/* ===== Decorative grid pattern ===== */
.grid-pattern {
  position: absolute; pointer-events: none; opacity: 0.03;
}

/* ===== Responsive — Tablet (640px+) ===== */
@media (min-width: 640px) {
  .container { padding: 0 1.5rem; }
  .section { padding: 4.5rem 0; }
  .hero { padding: 6rem 0 5rem; }
  .page-header { padding: 6rem 0 4.5rem; }
  .page-header h1 { font-size: 2.5rem; }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); padding: 0; margin-top: -2.5rem; }
  .frontier-grid { grid-template-columns: repeat(2, 1fr); }
  .about-values { grid-template-columns: 1fr 1fr; }
}

/* ===== Responsive — Desktop (1024px+) ===== */
@media (min-width: 1024px) {
  .section { padding: 5rem 0; }
  .hero-content h1 { font-size: 3.25rem; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: none; }
  .nav-links {
    display: flex; position: static; border-bottom: none;
    padding: 0; flex-direction: row; gap: 0.25rem; background: transparent;
    backdrop-filter: none;
  }
  .project-grid { grid-template-columns: repeat(3, 1fr); }
  .research-area { grid-template-columns: 3fr 2fr; }
  .research-area:nth-child(even) { direction: rtl; }
  .research-area:nth-child(even) > * { direction: ltr; }
  .team-grid { grid-template-columns: repeat(5, 1fr); }
  .stats-row { grid-template-columns: repeat(4, 1fr); margin-top: -3rem; }
  .frontier-grid { grid-template-columns: repeat(3, 1fr); }
  .about-content { grid-template-columns: 3fr 2fr; }
}
