/* ============================================
   SENIORNEUROCARE.COM — Accessible Medical Portfolio
   Design: High-contrast, senior-friendly, spacious
   ============================================ */

/* --- Design Tokens (Senior & Accessible Focus) --- */
:root {
  /* Warm, low-glare background */
  --color-bg: #FDFBFA;
  --color-surface: #FFFFFF;

  /* High contrast text */
  --color-text: #111820;
  --color-text-secondary: #3B4A59;
  --color-text-muted: #5C6B7A;

  /* Calming, trustworthy accent colors (Deep Teal / Navy) */
  --color-accent: #005F73;
  --color-accent-dark: #003D4C;
  --color-accent-light: #E0F2F1;

  --color-border: #D1D5DB;
  --color-border-light: #E5E7EB;

  /* Highly legible font */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1000px;
  --radius: 8px;

  /* Softer shadows for depth without glare */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #121820;
    --color-surface: #1E2631;
    --color-text: #F3F4F6;
    --color-text-secondary: #D1D5DB;
    --color-text-muted: #9CA3AF;
    --color-accent: #4FD1C5;
    --color-accent-dark: #38B2AC;
    --color-accent-light: #0D3F3F;
    --color-border: #374151;
    --color-border-light: #1F2937;
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  /* Increased for readability */
  font-size: 18px;
  /* Increased for seniors */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--color-text);
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--color-text-secondary);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  padding: 16px 0;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(15, 23, 42, 0.85);
  }
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--color-accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all var(--transition);
}

.page-link:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

/* --- Hero Section --- */
.hero {
  padding: 80px 0 60px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--color-border-light);
  box-shadow: var(--shadow-lg);
}

.hero-photo .photo-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--shadow-lg);
}

.hero-content {
  flex: 1;
}

.hero-subtitle {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-1px);
}

/* --- Section --- */
.section {
  padding: 60px 0;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 1rem;
  margin-bottom: 40px;
  max-width: 500px;
}

/* --- Expertise Cards --- */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  list-style: none;
  padding: 0;
}

.expertise-card {
  padding: 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.expertise-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.expertise-icon {
  font-size: 1.75rem;
  margin-bottom: 14px;
  display: block;
}

.expertise-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.expertise-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* --- Featured Achievements on Home --- */
.achievements-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
}

.achievement-preview-card {
  padding: 24px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

.achievement-preview-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.achievement-preview-card .card-year {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 8px;
}

.achievement-preview-card .card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0;
  line-height: 1.4;
}

/* --- Timeline Page --- */
.timeline-page {
  padding: 60px 0 40px;
}

.timeline-list {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline-list::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-accent), var(--color-border));
  border-radius: 2px;
}

.timeline-year-label {
  position: relative;
  padding-left: 32px;
  margin-bottom: 16px;
  margin-top: 40px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: none;
}

.timeline-year-label:first-child {
  margin-top: 0;
}

.timeline-year-label::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 10px;
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--color-bg);
}

.timeline-item {
  position: relative;
  padding-left: 32px;
  margin-bottom: 24px;
  padding-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  transition: all var(--transition);
}

.timeline-item:hover::before {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.timeline-meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.timeline-title a {
  color: var(--color-text);
  transition: color var(--transition);
}

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

/* --- Achievement Detail Page --- */
.achievement-post {
  padding: 60px 0 40px;
}

.post-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border-light);
}

.post-meta {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 12px;
}

.post-title {
  font-size: 2rem;
  line-height: 1.3;
}

.post-content {
  font-size: 1rem;
  line-height: 1.8;
}

.post-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.exhibit-source {
  margin-top: 48px;
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
}

.exhibit-source h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.back-link {
  margin-top: 40px;
}

.back-link a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
}

/* --- Content Pages (Contribution, Verification) --- */
.page-header {
  padding: 60px 0 0;
}

.page-header h1 {
  font-size: 2.25rem;
}

.page-header .lead {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin-bottom: 0;
}

.content-section {
  padding: 40px 0;
}

.content-section h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-light);
}

.content-section p {
  line-height: 1.8;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.contact-card {
  padding: 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
}

.contact-card h3 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.contact-card ul {
  list-style: none;
  padding: 0;
}

.contact-card li {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
  line-height: 1.5;
}

/* --- CTA Section --- */
.cta-section {
  padding: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  margin-top: 40px;
}

.cta-section h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.cta-section p {
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.cta-section a {
  font-weight: 600;
}

/* --- Divider --- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border-light);
  margin: 0;
}

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border-light);
  padding: 40px 0;
  margin-top: 80px;
  text-align: center;
}

.site-footer p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* ============================
   RESPONSIVE — Mobile First
   ============================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-photo img,
  .hero-photo .photo-placeholder {
    width: 150px;
    height: 150px;
    font-size: 3rem;
  }

  .header-container {
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
  }

  .page-link {
    font-size: 0.82rem;
    padding: 5px 10px;
  }

  .section {
    padding: 40px 0;
  }

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

  .achievements-preview {
    grid-template-columns: 1fr;
  }

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

  .site-footer {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 1.6rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 32px 0;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }
}

/* --- iPhone SE & Extra Small Devices (320px) --- */
@media (max-width: 400px) {
  body {
    font-size: 16px;
    /* Slightly scale down baseline for very small screens */
  }

  .container {
    padding: 0 12px;
  }

  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.6rem !important;
    margin-bottom: 12px;
  }

  .hero-inner {
    gap: 30px;
  }

  .hero h1 {
    font-size: 1.8rem !important;
  }

  /* Force metrics to stack and shrink slightly */
  .metrics-section>div {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .metrics-section div[style*="font-size: 3.5rem"] {
    font-size: 2.8rem !important;
  }

  .page-header {
    padding: 50px 0 !important;
  }

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