/**
 * GioSync Design System - Production Grade
 * Premium clinical AI website with scroll-driven storytelling
 */

/* ========================================
   DESIGN TOKENS - PRODUCTION
   ======================================== */

:root {
  /* Colors - Backgrounds */
  --bg-primary: #0a1a2f;
  --bg-soft: #f5f7fa;
  --bg-white: #ffffff;

  /* Colors - Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-inverse: #f8fafc;

  /* Colors - Accent */
  --accent-main: #2c6df2;
  --accent-hover: #1e5ad9;
  --accent-light: #e8f0fe;

  /* Border Radius */
  --radius-soft: 14px;
  --radius-round: 28px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 96px;
  --space-2xl: 128px;

  /* Shadows */
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 16px 48px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 24px 64px rgba(0, 0, 0, 0.12);

  /* Typography - Families */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Typography - Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Typography - Sizes */
  --text-h1: clamp(3rem, 6vw, 5rem);
  --text-h2: clamp(2.2rem, 4vw, 3.2rem);
  --text-h3: 1.5rem;
  --text-body-lg: 1.15rem;
  --text-body-md: 1.05rem;
  --text-body-sm: 0.95rem;

  /* Typography - Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.55;
  --line-height-relaxed: 1.7;

  /* Motion - Production Grade */
  --ease-primary: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-base: 700ms;
  --duration-fast: 600ms;
  --duration-slow: 800ms;
  --delay-stagger: 100ms;
  --translate-max: 24px;
  --translate-side: 32px;

  /* Layout */
  --container-max: 1280px;
  --container-padding: var(--space-md);
}

@media (min-width: 1024px) {
  :root {
    --container-padding: var(--space-lg);
  }
}

/* ========================================
   RESET & BASE
   ======================================== */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--text-secondary);
  background-color: var(--bg-soft);
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h1 {
  font-size: var(--text-h1);
}

h2 {
  font-size: var(--text-h2);
}

h3 {
  font-size: var(--text-h3);
}

p {
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

.lead {
  font-size: var(--text-body-lg);
  line-height: var(--line-height-relaxed);
  color: var(--text-secondary);
}

a {
  color: var(--accent-main);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-primary);
}

a:hover {
  color: var(--accent-hover);
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section-lg {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

/* ========================================
   COMPONENTS
   ======================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  font-weight: var(--font-weight-medium);
  line-height: 1;
  border: none;
  border-radius: var(--radius-soft);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-primary);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-main);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-main);
  border: 2px solid var(--accent-main);
}

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

.btn-lg {
  padding: 16px 40px;
  font-size: var(--text-body-lg);
}

/* Cards */
.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-soft);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--duration-base) var(--ease-primary);
}

.card:hover {
  box-shadow: var(--shadow-medium);
}

/* ========================================
   SCROLL-SAFE CONTENT CLASSES
   NO content is hidden. Ever.
   These classes are markers only.
   ======================================== */

/* All content classes - ALWAYS VISIBLE */
.scroll-reveal,
.scroll-reveal-left,
.scroll-reveal-right {
  opacity: 1;
  transform: none;
  visibility: visible;
}

/* Visible class - no-op, content already visible */
.scroll-reveal.visible,
.scroll-reveal-left.visible,
.scroll-reveal-right.visible {
  opacity: 1;
  transform: none;
}

/* Image gallery - all images visible */
.image-swap {
  /* First image visible, others can be toggled for gallery */
  opacity: 1;
  filter: none;
  transition: opacity 0.3s ease;
}

.image-swap.active {
  opacity: 1;
  filter: none;
}

/* Stagger containers - all children ALWAYS visible */
.stagger-container>* {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.stagger-container.visible>* {
  opacity: 1;
  transform: none;
}

/* ========================================
   HOVER MICRO-INTERACTIONS
   ======================================== */

/* Link Underline Expand */
.link-animated {
  position: relative;
  text-decoration: none;
}

.link-animated::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-main);
  transition: width var(--duration-fast) var(--ease-primary);
}

.link-animated:hover::after {
  width: 100%;
}

/* ========================================
   UTILITIES
   ======================================== */

.text-center {
  text-align: center;
}

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

.text-secondary {
  color: var(--text-secondary);
}

.text-accent {
  color: var(--accent-main);
}

.mb-xs {
  margin-bottom: var(--space-xs);
}

.mb-sm {
  margin-bottom: var(--space-sm);
}

.mb-md {
  margin-bottom: var(--space-md);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mb-xl {
  margin-bottom: var(--space-xl);
}

.mt-xs {
  margin-top: var(--space-xs);
}

.mt-sm {
  margin-top: var(--space-sm);
}

.mt-md {
  margin-top: var(--space-md);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .scroll-reveal,
  .scroll-reveal-left,
  .scroll-reveal-right,
  .stagger-container>*,
  .image-swap {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ========================================
   About
   ======================================== */

/* ABOUT HERO */
.about-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: white;
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.about-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(10, 26, 47, 0.75),
      rgba(10, 26, 47, 0.85));
}


.about-hero-content {
  position: relative;
  max-width: 900px;
}

.about-hero h1 {
  color: white;
}


/* TIMELINE STORY */
.timeline-story {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  position: relative;
}

/* Vertical line */
.timeline-story::before {
  content: "";
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom,
      var(--accent-main),
      rgba(44, 109, 242, 0.1));
}

/* Each step */
.timeline-step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-lg);
  position: relative;
}

/* Marker */
.timeline-marker {
  width: 64px;
  height: 64px;
  background: var(--bg-white);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  z-index: 2;
}

.timeline-marker a {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-round);
  transition: transform var(--duration-fast) var(--ease-primary),
    box-shadow var(--duration-fast) var(--ease-primary);
}

.timeline-marker a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

.timeline-marker img {
  max-width: 42px;
  max-height: 42px;
  object-fit: contain;
}

/* "Now" marker */
.timeline-now .timeline-marker {
  background: var(--accent-main);
}

.now-dot {
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
}

/* Content */
.timeline-content h3 {
  margin-bottom: var(--space-xs);
}

.timeline-period {
  display: inline-block;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--accent-main);
  margin-bottom: var(--space-xs);
}

/* Skills */
.timeline-skills {
  list-style: none;
  padding: 0;
  margin-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.timeline-skills li {
  font-size: 0.85rem;
  background: var(--accent-light);
  color: var(--accent-main);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}


/* EXTERNAL PRESENCE */
.external-presence {
  max-width: 900px;
}

.external-links {
  margin-top: var(--space-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .external-links {
    grid-template-columns: repeat(3, 1fr);
  }
}

.external-link {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-white);
  border-radius: var(--radius-soft);
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-primary),
    box-shadow var(--duration-fast) var(--ease-primary);
  box-shadow: var(--shadow-soft);
}

.external-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.external-link:hover img {
  filter: brightness(0.9);
}

.external-link img {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.external-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: 2px;
}

.external-desc {
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  line-height: 1.4;
}


/* PRINCIPLES */
.principles {
  list-style: none;
  padding-left: 0;
}

.principles li {
  font-size: var(--text-body-lg);
  margin-bottom: var(--space-sm);
}

/* PRINCIPLES SECTION */
.principles-section {
  background: linear-gradient(to bottom,
      var(--bg-white),
      var(--bg-soft));
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

@media (max-width: 768px) {
  .principles-grid {
    grid-template-columns: 1fr;
  }
}

.principle-card {
  position: relative;
  background: var(--bg-white);
  border-radius: var(--radius-soft);
  padding: var(--space-lg) var(--space-lg) var(--space-lg) var(--space-xl);
  box-shadow: var(--shadow-soft);
  transition:
    transform var(--duration-fast) var(--ease-primary),
    box-shadow var(--duration-fast) var(--ease-primary);
  overflow: hidden;
}

.principle-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 100%;
  background: var(--accent-gradient);
}

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

.principle-card p {
  margin: 0;
  font-size: var(--text-body-lg);
  color: var(--text-primary);
  line-height: var(--line-height-relaxed);
}

/* ICON */
.principle-icon {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  font-size: 1.2rem;
  color: rgba(0, 0, 0, 0.15);
}

/* COLOR VARIANTS */
.accent-blue {
  --accent-gradient: linear-gradient(#2c6df2, #5a8cff);
}

.accent-teal {
  --accent-gradient: linear-gradient(#18a4a8, #4fd1c5);
}

.accent-indigo {
  --accent-gradient: linear-gradient(#4f46e5, #818cf8);
}

.accent-slate {
  --accent-gradient: linear-gradient(#64748b, #94a3b8);
}

.accent-cyan {
  --accent-gradient: linear-gradient(#06b6d4, #67e8f9);
}

.accent-violet {
  --accent-gradient: linear-gradient(#7c3aed, #c4b5fd);
}

.accent-navy {
  --accent-gradient: linear-gradient(#0a1a2f, #1e293b);
}



/* ========================================
   CONTACT PAGE (REDESIGN)
   ======================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-2xl);
  }
}

/* Sidebar */
.contact-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  transition: color var(--duration-fast) var(--ease-primary);
}

.sidebar-link:hover {
  color: var(--accent-main);
}

.sidebar-link svg {
  color: var(--text-tertiary);
  transition: color var(--duration-fast) var(--ease-primary);
}

.sidebar-link:hover svg {
  color: var(--accent-main);
}

.divider {
  height: 1px;
  background-color: var(--bg-soft);
  /* Using generic soft bg as divider color */
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Form Styling */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group {
  margin-bottom: var(--space-md);
  display: flex;
  flex-direction: column;
}

.form-label {
  display: block;
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-soft);
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  color: var(--text-primary);
  background-color: var(--bg-white);
  transition:
    border-color var(--duration-fast) var(--ease-primary),
    box-shadow var(--duration-fast) var(--ease-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-main);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007CB2%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-wrapper {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.form-checkbox {
  margin-top: 4px;
  /* Align with top of text */
  width: 16px;
  height: 16px;
  accent-color: var(--accent-main);
}

@media (max-width: 640px) {
  .btn-full-mobile {
    width: 100%;
  }
}

/* FAQ Styling */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.space-y-md>*+* {
  margin-top: var(--space-md);
}

/* ========================================
   ABOUT PAGE - EDUCATION & STRENGTHS
   ======================================== */

/* Education Grid */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .edu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .edu-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.edu-card {
  background: var(--bg-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-soft);
  padding: var(--space-lg);
  text-align: center;
  transition: transform var(--duration-normal) var(--ease-primary),
    box-shadow var(--duration-normal) var(--ease-primary);
}

.edu-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.edu-badge {
  color: var(--accent-main);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edu-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

/* Strengths Grid */
.strengths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 640px) {
  .strengths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .strengths-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.strength-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-soft);
  padding: var(--space-md);
  transition: transform var(--duration-normal) var(--ease-primary),
    border-color var(--duration-normal) var(--ease-primary);
}

.strength-item:hover {
  transform: translateX(2px);
  border-color: var(--accent-main);
}

.check-icon {
  color: #18A4A8;
  flex-shrink: 0;
}

.strength-item span {
  color: var(--text-primary);
  font-weight: 500;
}

.border-radius-soft {
  border-radius: var(--radius-soft);
}

.p-md {
  padding: var(--space-md);
}

.p-xl {
  padding: var(--space-lg);
}

@media(min-width: 768px) {
  .p-xl {
    padding: var(--space-xl);
  }
}