/* ========================================
   RightSide AI — Website Styles
   ======================================== */

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

:root {
  --navy: #1a1f3a;
  --navy-light: #242b4a;
  --navy-lighter: #2d3560;
  --blue: #5b8cc5;
  --blue-light: #7bb3e0;
  --red: #c94c4c;
  --red-light: #e06060;
  --gold: #d4a853;
  --text-primary: #f0f0f5;
  --text-secondary: rgba(240, 240, 245, 0.7);
  --text-muted: rgba(240, 240, 245, 0.45);
  --surface: rgba(255, 255, 255, 0.05);
  --surface-hover: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
}

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

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--blue-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--blue-light);
}

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

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(26, 31, 58, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-brand img {
  width: 36px;
  height: 36px;
}

.nav-brand span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

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

.nav-cta {
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(91, 140, 197, 0.3);
  color: white !important;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Sections (shared) --- */
section {
  padding: 6rem 2rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 700px;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 5rem;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(91, 140, 197, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 70% 80%, rgba(201, 76, 76, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 40% 40% at 20% 60%, rgba(91, 140, 197, 0.06) 0%, transparent 50%);
  z-index: 0;
}

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

.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  color: var(--blue-light);
}

.hero-tagline {
  font-size: 1.35rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.01em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: white;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(91, 140, 197, 0.35);
  color: white;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* --- What We Do --- */
.what-we-do {
  border-top: 1px solid var(--border);
}

.problem-solution {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

.problem-card, .solution-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.problem-card:hover, .solution-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.problem-card h3, .solution-card h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.problem-card p, .solution-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.25rem;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-icon.blue { background: rgba(91, 140, 197, 0.15); }
.feature-icon.red { background: rgba(201, 76, 76, 0.15); }
.feature-icon.gold { background: rgba(212, 168, 83, 0.15); }

.feature-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

/* --- LLM Compatibility --- */
.llm-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.llm-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.llm-logo:hover {
  color: var(--text-primary);
}

.llm-logo span {
  font-size: 0.75rem;
  font-weight: 500;
}

/* --- Screenshots Gallery --- */
.gallery {
  margin-top: 4rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-item.zoom-crop .gallery-caption {
  padding-bottom: 1.5rem;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  bottom: -1px;
  left: -1px;
  right: -1px;
  padding: 0.75rem 1rem;
  background: rgb(0, 0, 0);
  border-radius: 0 0 12px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.gallery-item.zoom-crop img {
  transform: scale(1.05);
  transform-origin: center 40%;
}

/* --- Team --- */
.team {
  border-top: 1px solid var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}

.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
}

.team-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  background: var(--navy-light);
}

.team-info {
  padding: 1.75rem;
}

.team-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.team-role {
  font-size: 0.85rem;
  color: var(--blue-light);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.team-degrees {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.team-bio {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- Publications --- */
.news {
  border-top: 1px solid var(--border);
}

.publications {
  border-top: 1px solid var(--border);
}

.pub-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
}

.pub-card {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.pub-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.pub-year {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  padding-top: 0.2rem;
}

.pub-content h4 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.pub-content h4 a {
  color: var(--text-primary);
}

.pub-content h4 a:hover {
  color: var(--blue-light);
}

.pub-authors {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.pub-venue {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.pub-abstract {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 0.75rem;
}

/* --- Get Updates --- */
.updates {
  border-top: 1px solid var(--border);
  text-align: center;
}

.updates .container {
  max-width: 600px;
}

.signup-form {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

.signup-form input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.signup-form input::placeholder {
  color: var(--text-muted);
}

.signup-form input:focus {
  border-color: var(--blue);
}

.signup-form button {
  padding: 0.85rem 2rem;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: white;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.signup-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(91, 140, 197, 0.3);
}

.signup-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
}

.signup-success {
  display: none;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(91, 140, 197, 0.1);
  border: 1px solid var(--blue);
  color: var(--blue-light);
  margin-top: 1.5rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
}

.footer-brand img {
  width: 28px;
  height: 28px;
  opacity: 0.6;
}

.footer-brand span {
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

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

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero h1 { font-size: 2.5rem; }
  .section-title { font-size: 2rem; }
  .problem-solution { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .pub-card { flex-direction: column; gap: 1rem; }

  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.25rem;
  }
  .nav-hamburger { display: block; }

  .signup-form { flex-direction: column; }
  .footer-content { flex-direction: column; gap: 1.5rem; text-align: center; }
}

@media (max-width: 600px) {
  section { padding: 4rem 1.25rem; }
  .hero h1 { font-size: 2rem; }
  .hero-tagline { font-size: 1.1rem; }
  .hero-logo { width: 80px; height: 80px; }
}
