/* ============================================================
   MAIN.CSS  v1.0.0
   Royal Clinical Portfolio — Dr. Marjuq Al Tuhin
   Design System: Tokens · Reset · Typography · Globals
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Outfit:wght@500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=Satisfy&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Page backgrounds & surfaces */
  --bg-page:        #F8FAFC;  /* Crisp clinical alabaster */
  --bg-surface:     #FFFFFF;  /* Pure white cards */
  --bg-subtle:      #F1F5F9;  /* Soft slate secondary panels */
  --bg-card:        #FFFFFF;
  --bg-card-hover:  #FAFCFF;

  /* Authority Anchors */
  --navy:           #0B192C;
  --navy-deep:      #08162B;  /* Bold authoritative sapphire heading color */
  --navy-mid:       #F1F5F9;  /* Replaced dark section bg with luminous subtle slate */
  --navy-light:     #E2E8F0;

  /* Vibrant Clinical & Royal Color System ("Nice Colorful") */
  --azure:          #0284C7;  /* Vibrant medical cyan/azure */
  --azure-deep:     #0369A1;  /* High contrast active blue */
  --azure-light:    #38BDF8;
  --azure-pale:     #E0F2FE;  /* Soft azure pill bg */
  --azure-glow:     rgba(2, 132, 199, 0.14);

  --gold:           #C5A059;  /* Royal brushed gold */
  --gold-dark:      #92400E;  /* High-contrast amber/gold for text */
  --gold-accent:    #D97706;  /* Punchy warm gold */
  --gold-light:     #F59E0B;
  --gold-pale:      #FEF3C7;  /* Warm champagne tint */
  --gold-glow:      rgba(217, 119, 6, 0.14);

  --emerald:        #059669;  /* Clinical trust / active status */
  --emerald-deep:   #047857;
  --emerald-pale:   #D1FAE5;

  --purple:         #7C3AED;  /* Academic Research & Publications */
  --purple-deep:    #6D28D9;
  --purple-pale:    #EDE9FE;

  --rose:           #E11D48;  /* Surgical Precision / Emergency / Otolaryngology */
  --rose-pale:      #FFE4E6;

  --charcoal:       #1E293B;
  --white:          #FFFFFF;

  /* Text & Strict WCAG AAA Contrast on Light Theme */
  --text-primary:   #08162B;  /* Deep dark navy - maximum contrast (15:1+) */
  --text-secondary: #1E293B;  /* Deep slate (10:1+) - crystal clear reading */
  --text-muted:     #475569;  /* Confident medium-dark slate (6:1+) */
  --text-light:     #64748B;
  --text-inverse:   #FFFFFF;

  /* Fonts: Modern Display Sans-Serif, Body Sans-Serif, Brush & Cursive */
  --font-display: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-sans:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-brush:   'Caveat', cursive;
  --font-cursive: 'Satisfy', 'Caveat', cursive;

  /* Universal mapping to eliminate serif entirely */
  --serif:        var(--font-display);
  --sans:         var(--font-sans);

  /* Spacing (8pt grid) */
  --sp-1:  0.25rem;   /*  4px */
  --sp-2:  0.5rem;    /*  8px */
  --sp-3:  0.75rem;   /* 12px */
  --sp-4:  1rem;      /* 16px */
  --sp-5:  1.25rem;   /* 20px */
  --sp-6:  1.5rem;    /* 24px */
  --sp-7:  1.75rem;   /* 28px */
  --sp-8:  2rem;      /* 32px */
  --sp-10: 2.5rem;    /* 40px */
  --sp-12: 3rem;      /* 48px */
  --sp-16: 4rem;      /* 64px */
  --sp-20: 5rem;      /* 80px */
  --sp-24: 6rem;      /* 96px */
  --sp-32: 8rem;      /* 128px */

  /* Borders (Refined on light theme) */
  --border-subtle:    1px solid rgba(226, 232, 240, 0.95);
  --border-card:      1px solid rgba(203, 213, 225, 0.75);
  --border-gold:      1px solid rgba(197, 160, 89, 0.35);
  --border-gold-mid:  1px solid rgba(197, 160, 89, 0.6);
  --border-gold-bold: 2px solid rgba(180, 83, 9, 0.85);
  --border-azure:     1px solid rgba(2, 132, 199, 0.3);
  --border-azure-mid: 1px solid rgba(2, 132, 199, 0.6);

  /* Glassmorphism for Light Theme */
  --glass-dark:   rgba(255, 255, 255, 0.92);
  --glass-mid:    rgba(255, 255, 255, 0.82);
  --glass-light:  rgba(248, 250, 252, 0.85);
  --glass-blur:   blur(16px);
  --glass-blur-sm:blur(8px);

  /* Layered Shadows for Light Theme Depth */
  --shadow-sm:    0 2px 6px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:    0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 10px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg:    0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.03);
  --shadow-gold:  0 12px 32px -4px rgba(197, 160, 89, 0.3);
  --shadow-azure: 0 12px 32px -4px rgba(2, 132, 199, 0.3);
  --shadow-glow:  0 0 60px rgba(2, 132, 199, 0.15);
  --shadow-deep:  0 25px 60px -12px rgba(15, 23, 42, 0.16);

  /* Transitions */
  --t-fast:  150ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-med:   300ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:  600ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-ease:  500ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Border radius */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   18px;
  --r-xl:   26px;
  --r-2xl:  36px;
  --r-full: 9999px;

  /* Z-index layers */
  --z-base:    1;
  --z-raised:  10;
  --z-sticky:  100;
  --z-overlay: 500;
  --z-nav:     900;
  --z-modal:   1000;
  --z-toast:   2000;

  /* Nav height */
  --nav-h: 80px;
  color-scheme: light;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
  hanging-punctuation: first last;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--text-secondary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

fieldset { border: none; }
table { border-collapse: collapse; }

/* ── Typography Scale (Modern Display Sans + Brush Cursive) ─── */
.t-display {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7.5vw, 6.25rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--navy-deep);
}

.t-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 3.85rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--navy-deep);
}

.t-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.2vw, 2.95rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
}

.t-h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--navy-deep);
}

.t-h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy-deep);
}

.t-lead {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  font-weight: 500;
  line-height: 1.75;
  color: var(--text-secondary);
}

.t-body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.72;
  color: var(--text-secondary);
}

.t-small {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.t-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--azure-deep);
}

.t-display-sans { font-family: var(--font-display); }
.t-sans         { font-family: var(--font-sans); }

/* Brush & Cursive Utility Styles */
.font-brush, .brush-accent, .t-brush {
  font-family: var(--font-brush) !important;
  font-weight: 700 !important;
  font-style: normal !important;
  letter-spacing: 0.02em !important;
  display: inline-block;
}

.font-cursive, .cursive-accent, .t-cursive {
  font-family: var(--font-cursive) !important;
  font-style: normal !important;
  font-weight: 600 !important;
  display: inline-block;
}

/* Color Accent Utilities */
.text-gold         { color: #D97706 !important; }
.text-azure        { color: #0284C7 !important; }
.text-gold-bright  { color: #FDE047 !important; }
.text-white        { color: #FFFFFF !important; }

/* Headings with cursive / brush highlights */
.t-display em, .t-h1 em, .t-h2 em, .t-h3 em, h1 em, h2 em, h3 em {
  font-family: var(--font-brush) !important;
  font-style: normal !important;
  font-size: 1.18em;
  font-weight: 700 !important;
  letter-spacing: 0.02em;
  display: inline-block;
}

/* ── Layout Primitives ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

@media (min-width: 768px)  { .container { padding-inline: var(--sp-8); } }
@media (min-width: 1024px) { .container { padding-inline: var(--sp-16); } }

.section {
  padding-block: var(--sp-24);
}
.section--sm { padding-block: var(--sp-16); }
.section--lg { padding-block: var(--sp-32); }

/* ── Section Heading ──────────────────────────────────────── */
.section-head {
  margin-bottom: var(--sp-16);
}

.section-head__pre {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-head__pre::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.section-head__title {
  margin-bottom: var(--sp-4);
}

.section-head__desc {
  max-width: 560px;
  color: var(--text-secondary);
}

.section-head--center {
  text-align: center;
}
.section-head--center .section-head__pre {
  justify-content: center;
}
.section-head--center .section-head__pre::before {
  display: none;
}
.section-head--center .section-head__pre::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: currentColor;
}
.section-head--center .section-head__desc {
  margin-inline: auto;
}

/* ── Background Decorations ───────────────────────────────── */
.bg-gradient-radial {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(197,160,89,0.08) 0%, transparent 70%);
}

.bg-dots {
  background-image: radial-gradient(circle, rgba(197,160,89,0.12) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* ── Dividers ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197,160,89,0.25), transparent);
  margin-block: var(--sp-12);
  border: none;
}

.divider--vertical {
  width: 1px;
  height: auto;
  background: linear-gradient(180deg, transparent, rgba(197,160,89,0.25), transparent);
  margin-inline: var(--sp-8);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-subtle); }
::-webkit-scrollbar-thumb {
  background: rgba(2, 132, 199, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--azure); }

/* ── Text Selection ───────────────────────────────────────── */
::selection {
  background: rgba(2, 132, 199, 0.2);
  color: var(--navy-deep);
}

/* ── Focus Styles ─────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ── Accent Text & Utilities ─────────────────────────────── */
.gold { color: #B45309; font-weight: 700; }
.azure { color: var(--azure-deep); font-weight: 700; }
.text-gold { color: #D97706; }
.text-azure { color: #0284C7; }
.text-gold-bright { color: #FDE047; }
.gold-gradient {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.azure-gradient {
  background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

/* ── Screen Reader Only ───────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
