/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:          #FAFAF8;
  --bg-alt:      #F3F3F0;
  --text:        #1A1A2E;
  --text-muted:  #5A5A72;
  --accent:      #6C63FF;
  --accent-soft: rgba(108, 99, 255, 0.12);
  --teal:        #00C9B1;
  --teal-soft:   rgba(0, 201, 177, 0.12);
  --white:       #FFFFFF;
  --border:      rgba(26, 26, 46, 0.08);
  --radius:      12px;
  --radius-lg:   24px;
  --shadow:      0 4px 24px rgba(26, 26, 46, 0.08);
  --shadow-hover:0 8px 40px rgba(108, 99, 255, 0.18);
  --nav-h:       72px;
  --section-gap: 120px;
  --max-w:       1160px;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'DM Serif Display', Georgia, serif;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { font-size: 1.05rem; color: var(--text-muted); }

.label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ─── Layout Helpers ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: var(--section-gap) 0; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
#nav.scrolled {
  background: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--text);
  letter-spacing: -0.03em;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 8px 20px;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: #5851e0 !important; transform: translateY(-1px); }

/* hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(250, 250, 248, 0.97);
  backdrop-filter: blur(16px);
  padding: 24px;
  z-index: 99;
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.mobile-menu a { font-size: 1.1rem; font-weight: 500; color: var(--text); }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/colored-network.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.hero-content h1 { margin: 16px 0 24px; }
.hero-content .accent-line { color: var(--accent); }
.hero-content p {
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 40px;
  color: var(--text-muted);
}
.hero-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 540px;
}
.hero-actions .btn { width: 100%; justify-content: center; text-align: center; }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}
.btn-primary:hover { background: #5851e0; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ─── Vision ─────────────────────────────────────────────────────────────── */
#vision { background: var(--bg); }
.vision-text h2 { margin: 12px 0 20px; }
.vision-text p { margin-bottom: 16px; }
.vision-img {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 48px;
}
.vision-img img {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  filter: saturate(0.8);
  transition: filter 0.4s;
}
.vision-img:hover img { filter: saturate(1); }

/* ─── Product (LumentisCBT) ──────────────────────────────────────────────── */
#product {
  background: var(--text);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
#product::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/mapper-tda.png');
  background-size: cover;
  background-position: center;
  opacity: 0.05;
  z-index: 0;
}
.product-inner { position: relative; z-index: 1; }
#product .label { color: var(--teal); }
#product h2 { color: var(--white); margin: 12px 0 16px; }
#product .tagline {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.7);
  max-width: 700px;
  margin-bottom: 60px;
}
.product-pillars { margin-bottom: 60px; }
.pillar {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.pillar-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--teal-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}
.pillar h3 { color: var(--white); margin-bottom: 10px; font-size: 1.15rem; }
.pillar p { color: rgba(255,255,255,0.6); font-size: 0.95rem; }
.product-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-teal {
  background: var(--teal);
  color: var(--text);
  box-shadow: 0 4px 20px rgba(0, 201, 177, 0.3);
}
.btn-teal:hover { background: #00b09c; transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-2px); }

/* ─── Services ───────────────────────────────────────────────────────────── */
#services { background: var(--bg-alt); }
#services h2 { margin: 12px 0 16px; }
#services > .container > p { max-width: 600px; margin-bottom: 56px; }
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
}
.service-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--accent-soft);
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 24px;
}
.service-card h3 { margin-bottom: 12px; }
.service-card p { font-size: 0.95rem; margin-bottom: 24px; }
.service-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.service-link:hover { gap: 10px; }

/* Center the lone 7th card when it's the only item on its row */
.service-cards.grid-3 .service-card:nth-child(7):nth-last-child(1) {
  grid-column: 2;
}

.services-cta { margin-top: 56px; text-align: center; }

/* ─── About ──────────────────────────────────────────────────────────────── */
#about { background: var(--bg); }
.about-header { text-align: center; margin-bottom: 80px; }
.about-header h2 { margin: 12px 0 16px; }
.about-header p { max-width: 600px; margin: 0 auto; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }

/* Education timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--teal));
  border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px; top: 6px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item:last-child { margin-bottom: 0; }
.timeline-year {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.timeline-item h4 { margin-bottom: 2px; font-size: 0.98rem; }
.timeline-item p { font-size: 0.88rem; color: var(--text-muted); }

/* Awards */
.awards { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.award-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow);
}
.badge-gold   { border-color: #F5C842; color: #8A6C00; background: #FFFBEB; }
.badge-silver { border-color: #B0B8C8; color: #4A5568; background: #F7F9FC; }
.badge-bronze { border-color: #C88B5A; color: #7A4A20; background: #FEF6EF; }

/* Experience */
.exp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.exp-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.exp-col ul { list-style: none; }
.exp-col li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}
.exp-col li:last-child { border-bottom: none; }

/* About image decoration */
.about-deco {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  padding: 40px;
}
.about-deco img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  filter: saturate(0.85);
}

/* Skills */
.skills { margin-top: 80px; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.skill-group h4 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

/* ─── Contact ────────────────────────────────────────────────────────────── */
#contact {
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}
#contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/penrose-tiling.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  z-index: 0;
}
.contact-inner { position: relative; z-index: 1; }
.contact-inner h2 { margin: 12px 0 16px; }
.contact-inner > p { max-width: 520px; margin-bottom: 56px; }

.contact-layout { display: grid; grid-template-columns: 1fr 1.4fr; gap: 80px; align-items: start; }

.contact-info { display: flex; flex-direction: column; gap: 28px; }
.info-item h4 { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.info-item p, .info-item a { font-size: 0.95rem; color: var(--text); }
.info-item a:hover { color: var(--accent); }

/* Netlify Form */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.form-field input,
.form-field select,
.form-field textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-field textarea { min-height: 120px; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: var(--text);
  color: rgba(255,255,255,0.5);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--white);
}
.footer-logo span { color: var(--teal); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.85rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-links a:hover { color: var(--teal); }
.footer-copy { font-size: 0.8rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-2, .grid-3, .about-grid, .contact-layout, .exp-cols, .form-row,
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .product-pillars.grid-3 { grid-template-columns: 1fr; }
  .service-cards.grid-3 .service-card:nth-child(7):nth-last-child(1) {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  :root { --section-gap: 80px; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-actions { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
