/* ================================================================
   AI4Science Studio — Custom CSS
   Minimalist, scientific, honest.
   ================================================================ */

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #F0F4FF;
  --bg-alt:     #E8EEFF;
  --bg-dark:    #0F172A;
  --text:       #1A1F36;
  --text-muted: #5B6782;
  --accent:     #4F46E5;       /* indigo — logo orbit colour */
  --accent-mid: #0E7C7B;       /* teal — logo nucleus colour */
  --accent-lt:  #EEF2FF;       /* light indigo */
  --accent-warm:#E8A020;       /* amber */
  --white:      #FFFFFF;
  --border:     #C7D2FE;

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;

  --max-w:      1100px;
  --narrow-w:   700px;

  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   2.5rem;
  --space-xl:   5rem;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Utility ── */
.container        { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-md); }
.container-narrow { max-width: var(--narrow-w); margin: 0 auto; padding: 0 var(--space-md); }

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-mid);
  margin-bottom: var(--space-sm);
}
.label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-mid);
  flex-shrink: 0;
}
.label-light { color: rgba(255,255,255,0.7); }
.label-light::before { background: rgba(255,255,255,0.7); }

.dot { color: var(--accent-mid); }

.about-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-lt);
  border: 1px solid rgba(79,70,229,0.2);
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.profile-link:hover {
  background: #dde3ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79,70,229,0.12);
}

.profile-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(79,70,229,0.25);
}
.btn-primary:hover { background: var(--accent-mid); transform: translateY(-1px); box-shadow: 0 4px 18px rgba(79,70,229,0.3); }

.btn-ghost {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.75rem 1rem;
  transition: color 0.2s;
}
.btn-ghost:hover { color: var(--text); }

.btn-light {
  background: var(--white);
  color: var(--accent);
}
.btn-light:hover { background: var(--accent-lt); }

.btn-linkedin {
  background: #0A66C2;
  color: #fff;
}
.btn-linkedin:hover { background: #0958a8; transform: translateY(-1px); }

/* ── Hero ── */
.hero {
  min-height: auto;
  display: flex;
  align-items: center;
  padding: var(--space-xl) var(--space-md) calc(var(--space-md) + 24px);
  background:
    radial-gradient(ellipse 70% 90% at 75% 50%, rgba(79,70,229,0.35) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 20% 80%, rgba(14,124,123,0.2) 0%, transparent 60%),
    #0F172A;
  position: relative;
  overflow: hidden;
}

/* Subtle grid background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}

.hero-text { min-width: 0; }

.hero-logo {
  width: clamp(180px, 22vw, 300px);
  height: auto;
  flex-shrink: 0;
  opacity: 1;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5EEAD4;
  background: rgba(94,234,212,0.1);
  border: 1px solid rgba(94,234,212,0.25);
  padding: 0.3rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #F0EFEC;
  margin-bottom: 1.75rem;
  max-width: 800px;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 600px;
  margin-bottom: 1.75rem;
}

.hero-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.hero-cta-link:hover { color: rgba(255,255,255,0.8); }

.hero-avail {
  font-size: 0.83rem;
  color: var(--text-muted);
}
.hero-avail strong { color: var(--text); font-weight: 500; }

/* ── Sections ── */
.section        { padding: var(--space-xl) 0; }
.section-top-sm {
  padding-top: var(--space-lg);
  margin-top: -32px;
  position: relative;
  z-index: 1;
  border-radius: 24px 24px 0 0;
  background: var(--bg);
}
.section-alt { background: var(--bg-alt); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-lg);
  max-width: 540px;
}
.section-title::after {
  content: '';
  display: block;
  width: 72px;
  height: 1px;
  margin-top: 1rem;
  background: linear-gradient(90deg, rgba(79,70,229,0.85), rgba(79,70,229,0));
}

.section-title-light {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: var(--space-md);
  max-width: 540px;
}
.section-title-light::after {
  content: '';
  display: block;
  width: 72px;
  height: 1px;
  margin-top: 1rem;
  background: linear-gradient(90deg, rgba(94,234,212,0.9), rgba(94,234,212,0));
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 184px 1fr;
  gap: 3rem;
  align-items: start;
  max-width: 860px;
}

.about-photo-wrap {
  position: relative;
  max-width: 184px;
}

.about-photo {
  width: 100%;
  border-radius: 8px;
  filter: grayscale(42%) saturate(0.88);
  box-shadow: 0 10px 34px rgba(79,70,229,0.1), 0 2px 8px rgba(0,0,0,0.06);
  transition: filter 0.35s ease, transform 0.25s ease, box-shadow 0.35s ease;
}

.about-photo-wrap:hover .about-photo {
  filter: grayscale(10%) saturate(1.02);
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(79,70,229,0.14), 0 4px 12px rgba(0,0,0,0.08);
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  font-size: 1.025rem;
}

.about-text p strong { color: var(--text); font-weight: 500; }

.about-actions {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.about-actions .hero-avail { margin: 0; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  align-items: stretch;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent-mid);
  border-radius: 8px;
  padding: 2rem 1.75rem;
  text-align: left;
  transition: box-shadow 0.25s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  box-shadow: 0 12px 40px rgba(79,70,229,0.12);
  transform: translateY(-3px);
}
.card::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(79,70,229,0.22);
  border-right: 1px solid rgba(79,70,229,0.22);
  pointer-events: none;
}

.card-feature {
  min-height: 340px;
  padding: 2.25rem 2rem 2rem;
}

.card-content {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.card-graphic {
  position: absolute;
  inset: auto -12px -10px auto;
  width: 190px;
  height: 190px;
  pointer-events: none;
  opacity: 0.18;
}

.card-graphic svg {
  width: 100%;
  height: 100%;
}

.card-bio .card-graphic {
  color: rgba(14,124,123,0.42);
}

.card-bio .card-graphic svg {
  stroke: currentColor;
  stroke-width: 1.5;
}

.card-engineering .card-graphic {
  color: rgba(79,70,229,0.34);
}

.card-engineering .card-graphic svg {
  stroke: currentColor;
  stroke-width: 1.35;
}

.card-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1.25rem;
  color: var(--accent-mid);
}

.card-icon svg {
  width: 100%;
  height: 100%;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.card-tag {
  font-size: 0.78rem !important;
  color: var(--accent-mid) !important;
  font-weight: 500;
  margin-top: 1rem !important;
  letter-spacing: 0.01em;
}

/* ── Logo gallery (temporary) ── */
.logo-gallery-section { background: var(--bg); }

.logo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.logo-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
}

.logo-tile img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

.logo-tile-sm img {
  max-width: 80px;
}

.logo-tile-dark {
  background: #0F1F15;
  border-color: #1B4D30;
}

.logo-tile span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  letter-spacing: 0.03em;
}

/* ── Process / How it works ── */
.process-criteria {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: var(--space-lg);
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 780px;
  position: relative;
  overflow: hidden;
}
.process-criteria::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(79,70,229,0.22);
  border-right: 1px solid rgba(79,70,229,0.22);
  pointer-events: none;
}

.criterion {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.criterion-icon {
  color: var(--accent-mid);
  font-size: 1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.criterion strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.criterion p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.phases {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.phase {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
}
.phase::after {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  border-top: 1px solid rgba(79,70,229,0.22);
  border-right: 1px solid rgba(79,70,229,0.22);
  pointer-events: none;
}

.phase-divider {
  display: flex;
  justify-content: center;
  color: var(--accent-mid);
  margin: 0.4rem 0;
  opacity: 0.5;
}
.phase-divider-gap { margin-top: 1.5rem; }

.phase-num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  color: #C7D2FE;
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
  padding-top: 0.1rem;
}

.phase-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.phase-body p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

.phase-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--accent-mid);
  background: var(--accent-lt);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  letter-spacing: 0.01em;
}

.phase-optional {
  border-style: dashed;
  border-left-style: dashed;
  opacity: 0.85;
}

.phase-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.phase-title-row h3 { margin-bottom: 0; }

.phase-optional-badge {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
}

.process-note {
  max-width: 780px;
  margin: 0 auto 1.75rem;
  padding: 1.25rem 1.75rem;
  border-left: 3px solid var(--accent-mid);
  background: rgba(14,124,123,0.06);
  border-radius: 0 6px 6px 0;
}

.process-note p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0;
}

/* ── Inline link ── */
.inline-link {
  color: var(--accent-mid);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.inline-link:hover { color: var(--accent); }

/* ── Contact ── */
.section-contact {
  background:
    radial-gradient(ellipse 60% 80% at 85% 10%, rgba(79,70,229,0.2) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 15% 90%, rgba(14,124,123,0.12) 0%, transparent 60%),
    var(--bg-dark);
  padding: calc(var(--space-xl) * 1.4) 0;
  position: relative;
  overflow: hidden;
}
.section-contact::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}

.contact-panel {
  position: relative;
  padding: 3rem;
  border-radius: 18px;
  border: 1px solid rgba(199,210,254,0.16);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.contact-panel::before,
.contact-panel::after {
  content: '';
  position: absolute;
  width: 26px;
  height: 26px;
  pointer-events: none;
}
.contact-panel::before {
  top: 14px;
  right: 14px;
  border-top: 1px solid rgba(94,234,212,0.35);
  border-right: 1px solid rgba(94,234,212,0.35);
}
.contact-panel::after {
  bottom: 14px;
  left: 14px;
  border-bottom: 1px solid rgba(79,70,229,0.3);
  border-left: 1px solid rgba(79,70,229,0.3);
}

.contact-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}
.contact-avail {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin: 0;
}
.contact-avail strong { color: rgba(255,255,255,0.8); font-weight: 500; }

.contact-cta {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(199,210,254,0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Footer ── */
.footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 1.5rem 0;
}

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

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

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

/* ── Manifesto / "Not typical" ── */
.section-manifesto { background: var(--bg); }

.manifesto-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.manifesto-item {
  padding: 2.25rem 2.5rem;
  transition: background 0.2s, box-shadow 0.2s;
}
.manifesto-item:hover {
  background: var(--accent-lt);
  box-shadow: inset 3px 0 0 var(--accent);
}
.manifesto-item:nth-child(odd)          { border-right: 1px solid var(--border); }
.manifesto-item:not(:nth-last-child(-n+2)) { border-bottom: 1px solid var(--border); }

.manifesto-num {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.manifesto-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.manifesto-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root {
    --space-xl: 4rem;
    --space-lg: 2.5rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-logo { width: 120px; order: -1; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .about-photo-wrap {
    max-width: 200px;
  }

  .cred {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .cred-meta {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

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

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

  .card-feature {
    min-height: 0;
  }

  .card-graphic {
    width: 150px;
    height: 150px;
    opacity: 0.16;
  }

  .contact-panel {
    padding: 2rem;
  }

  .contact-cta {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .nav { padding: 1rem; }
  .hero { padding: 3rem 1rem; min-height: auto; }
  .section { padding: 3rem 0; }
}

/* ── Scroll reveal ── */
.js .section {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .section.visible {
  opacity: 1;
  transform: none;
}
