/*
Theme Name: Alamou Sanoussi — Personal Brand
Theme URI: https://alamouhealthgroup.com
Author: Alamou Sanoussi
Description: Custom personal branding theme for Alamou Sanoussi, MD, MPH, MBA, PMP — Medical Epidemiologist & Public Health Leader.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: as-personal
*/

:root{
  --bg:#FAF8F4;
  --bg-alt:#F3EFE6;
  --soft:#E7EFEA;
  --ink:#1B2A2E;
  --ink-dark:#16211F;
  --sage:#9FC2B8;
  --muted:#4A4640;
  --muted-2:#6B675F;
  --line:#E3DED4;
  --dash:#C7BFA9;
  --accent:#2F6F62;
  --accent-contrast:#FFFFFF;
  --font-display:'Fraunces', serif;
  --font-body:'Source Sans 3', sans-serif;
}

*, *::before, *::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--font-body);
  line-height:1.5;
}
a{ color:inherit; text-decoration:none; }
a:hover{ opacity:.72; }
img{ max-width:100%; height:auto; display:block; }
h1,h2,h3{ font-family:var(--font-display); font-weight:600; margin:0; color:var(--ink); }

.as-container{ max-width:1100px; margin:0 auto; padding:0 24px; }
.as-section{ width:100%; padding:96px 0; }
.as-section--alt{ background:var(--bg-alt); }
.as-eyebrow{ font-size:14px; font-weight:700; letter-spacing:.12em; color:var(--accent); margin-bottom:16px; }
.as-h2{ font-size:34px; line-height:1.2; margin-bottom:16px; }
.as-lede{ font-size:17px; line-height:1.75; color:var(--muted); max-width:680px; margin:0 0 16px; }

/* Nav */
.as-nav{
  position:sticky; top:0; z-index:20;
  width:100%; background:rgba(250,248,244,.94);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(6px);
}
.as-nav-inner{
  max-width:1100px; margin:0 auto; padding:18px 24px;
  display:flex; align-items:center; justify-content:space-between;
}
.as-nav-logo{ font-family:var(--font-display); font-size:20px; font-weight:600; color:var(--accent); }
.as-nav-links{ display:flex; gap:28px; align-items:center; font-size:15px; font-weight:500; }
.as-nav-links a{ white-space:nowrap; }
.as-nav-links a[aria-current="page"]{ color:var(--accent); font-weight:700; }
.as-nav-cta{ background:var(--accent); color:var(--accent-contrast) !important; padding:10px 20px; border-radius:4px; font-weight:600; }
.as-nav-toggle{ display:none; background:none; border:1px solid var(--ink); border-radius:4px; padding:8px 12px; font-size:14px; font-weight:600; color:var(--ink); cursor:pointer; }

/* Hero */
.as-hero{ padding:120px 0 100px; background:linear-gradient(180deg,#F1EDE3 0%,var(--bg) 100%); text-align:center; }
.as-hero-inner{ max-width:820px; margin:0 auto; display:flex; flex-direction:column; align-items:center; gap:20px; }
.as-hero h1{ font-size:48px; line-height:1.15; }
.as-hero p{ font-size:19px; color:var(--muted); max-width:640px; margin:0; }
.as-hero-meta{ font-size:15px; color:var(--muted-2); line-height:1.6; }
.as-btn-row{ display:flex; gap:16px; margin-top:12px; flex-wrap:wrap; justify-content:center; }
.as-btn{ display:inline-block; padding:14px 28px; border-radius:4px; font-weight:600; font-size:15px; }
.as-btn-primary{ background:var(--accent); color:var(--accent-contrast); }
.as-btn-outline{ border:1px solid var(--ink); color:var(--ink); }
.as-btn-outline-light{ border:1px solid var(--bg); color:var(--bg); }

/* About */
/* About: large intro, then photo/story rows that alternate sides, then credentials + actions. */
.as-about-lead{ max-width:900px; margin:0 0 104px; padding-left:28px; border-left:3px solid var(--accent); font-family:var(--font-display); font-size:24px; font-weight:400; line-height:1.6; color:var(--ink); }
.as-story{ display:grid; grid-template-columns:minmax(0, 360px) minmax(0, 1fr); gap:88px; align-items:center; }
.as-story + .as-story{ margin-top:112px; }
.as-story--reverse{ grid-template-columns:minmax(0, 1fr) minmax(0, 360px); }
.as-story--reverse .as-story-photo{ order:2; }
.as-story-photo{ position:relative; margin:0; }
/* Soft offset panel behind each photo adds depth without extra imagery. */
.as-story-photo::before{ content:''; position:absolute; inset:28px -28px -28px 28px; border-radius:20px; background:var(--soft); }
.as-story--reverse .as-story-photo::before{ inset:28px 28px -28px -28px; }
.as-story-photo img{ position:relative; width:100%; aspect-ratio:4 / 5; object-fit:cover; border-radius:20px; box-shadow:0 28px 56px -28px rgba(27,42,46,.45); }
.as-story-badge{ position:absolute; left:18px; bottom:18px; padding:7px 14px; border-radius:999px; background:rgba(255,255,255,.92); font-size:12px; font-weight:700; letter-spacing:.08em; color:var(--accent); }
.as-story-eyebrow{ display:flex; align-items:center; gap:14px; margin-bottom:20px; font-size:13px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--accent); }
.as-story-num{ font-family:var(--font-display); font-size:16px; font-weight:600; letter-spacing:0; color:var(--ink); }
.as-story-rule{ width:36px; height:1px; background:var(--accent); }
.as-story-title{ margin:0 0 20px; font-size:38px; line-height:1.15; }
.as-story-text p{ max-width:560px; margin:0; font-size:17px; line-height:1.8; color:var(--muted); }
.as-story-text p + p{ margin-top:16px; }
.as-story-place{ margin:-6px 0 20px; font-size:14px; font-weight:600; color:var(--muted-2); }
.as-about-close{ max-width:900px; margin-top:120px; }
.as-badges-title{ display:inline-block; margin:0 0 32px; padding-bottom:14px; border-bottom:2px solid var(--accent); font-size:28px; line-height:1.2; }
.as-badges{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); grid-template-rows:repeat(2, auto); grid-auto-flow:column; gap:24px 48px; margin:0; padding:0; list-style:none; }
.as-badge{ display:flex; align-items:center; gap:16px; }
.as-badge-icon{ flex:none; display:flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:50%; background:var(--soft); color:var(--accent); }
.as-badge-icon svg{ width:22px; height:22px; }
.as-badge-name{ display:block; font-size:17px; font-weight:700; line-height:1.35; color:var(--ink); }
.as-badge-org{ display:block; font-size:15px; color:var(--muted-2); }
.as-about-langs{ display:flex; align-items:center; gap:10px; margin-top:28px; padding-top:20px; border-top:1px solid var(--line); font-size:15px; color:var(--muted-2); }
.as-about-langs svg{ flex:none; width:18px; height:18px; color:var(--accent); }
.as-about-close .as-btn-row{ margin:40px 0 0; justify-content:flex-start; }
/* About: Academic Journey & Milestones. Equal-width cards; subgrid lines up each row
   (photo, year, title, school, text) across cards whatever the text lengths. */
.as-milestones-lede{ margin-bottom:40px; }
.as-milestones{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:24px; }
.as-milestone{ display:grid; grid-row:span 5; grid-template-rows:subgrid; row-gap:0; background:#FFFFFF; border:1px solid var(--line); border-radius:12px; overflow:hidden; transition:box-shadow .25s ease; }
.as-milestone:hover{ box-shadow:0 12px 32px rgba(27,42,46,.10); }
/* Full-bleed 7:5 frame (the graduation photos' own ratio); a wider image sets 'position' so its key content stays in frame. */
.as-milestone-photo{ display:block; aspect-ratio:7 / 5; overflow:hidden; background:var(--soft); }
.as-milestone-photo:hover{ opacity:1; }
.as-milestone-photo img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .4s ease; }
.as-milestone:hover .as-milestone-photo img{ transform:scale(1.03); }
.as-milestone-year{ justify-self:start; align-self:start; margin:22px 24px 12px; padding:4px 12px; border-radius:999px; background:var(--soft); color:var(--accent); font-size:12px; font-weight:700; letter-spacing:.08em; }
.as-milestone-name{ margin:0 24px 8px; font-size:19px; line-height:1.3; }
.as-milestone-meta{ margin:0 24px; padding-bottom:16px; border-bottom:1px solid var(--line); font-size:12px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--muted-2); }
.as-milestone-desc{ margin:16px 24px 24px; font-size:15px; line-height:1.65; color:var(--muted); }
.as-chip-row{ display:flex; flex-wrap:wrap; gap:10px; margin-top:8px; }
.as-chip{ border:1px solid var(--dash); border-radius:4px; padding:8px 14px; font-size:13px; font-weight:600; color:var(--muted); }

/* Home: about teaser + explore cards */
.as-about-teaser{ display:flex; gap:48px; align-items:center; }
.as-about-teaser .custom-logo-link{ display:block; flex:0 0 200px; }
.as-about-teaser .custom-logo{ width:200px !important; height:230px !important; border-radius:8px; object-fit:cover; border:1px solid var(--dash); background:var(--soft); }
.as-about-teaser-photo-placeholder{ flex:0 0 200px; width:200px; height:230px; border-radius:8px; background:var(--soft); border:1px solid var(--dash); display:flex; align-items:center; justify-content:center; color:var(--muted-2); font-size:13px; text-align:center; padding:12px; }
.as-explore-card{ background:#FFFFFF; border:1px solid var(--line); border-radius:8px; padding:32px; display:flex; flex-direction:column; gap:12px; transition:border-color .15s ease; }
.as-explore-card:hover{ border-color:var(--accent); opacity:1; }
.as-explore-card h3{ font-size:20px; }
.as-explore-card p{ font-size:15px; line-height:1.6; color:var(--muted); margin:0; flex-grow:1; }
.as-explore-link{ font-size:14px; font-weight:700; color:var(--accent); }

/* Grids / cards */
.as-grid-3{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.as-grid-2{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.as-card{ background:#FFFFFF; border:1px solid var(--line); border-radius:8px; padding:28px; }
.as-card h3{ font-size:18px; margin-bottom:10px; }
.as-card p{ font-size:15px; line-height:1.6; color:var(--muted); margin:0; }
.as-card-tag{ font-size:12px; font-weight:700; letter-spacing:.08em; color:var(--accent); margin-bottom:8px; display:block; }
.as-card--main{ border-top:3px solid var(--accent); }
.as-card--compact{ padding:20px; background:transparent; border-color:var(--line); }
.as-card--compact h3{ font-size:16px; }
.as-card--compact p{ font-size:14px; }

/* Timeline */
.as-timeline-title{ font-size:22px; margin:48px 0 12px; }
.as-timeline-item{ display:flex; gap:24px; padding:18px 0; border-bottom:1px solid var(--line); }
.as-timeline-item:last-child{ border-bottom:none; }
.as-timeline-date{ flex:0 0 180px; font-size:14px; color:var(--muted-2); }
.as-timeline-role{ font-weight:600; font-size:16px; color:var(--ink); }
.as-timeline-org{ font-size:14px; color:var(--muted-2); }

.as-list-title{ font-size:20px; margin-bottom:16px; }

/* Education & certifications cards */
.as-cred-card{ padding:32px; }
.as-cred-card .as-list-title{ padding-bottom:16px; margin-bottom:4px; border-bottom:2px solid var(--accent); display:inline-block; }
.as-cred-list{ list-style:none; margin:0; padding:0; }
.as-cred-item{ position:relative; padding:14px 0 14px 24px; border-bottom:1px solid var(--line); }
.as-cred-item:last-child{ border-bottom:none; padding-bottom:0; }
.as-cred-item::before{ content:''; position:absolute; left:2px; top:21px; width:8px; height:8px; border-radius:50%; background:var(--accent); }
.as-cred-list--check .as-cred-item::before{ top:19px; width:10px; height:5px; border-radius:0; background:none; border-left:2px solid var(--accent); border-bottom:2px solid var(--accent); transform:rotate(-45deg); }
.as-cred-title{ font-size:16px; font-weight:600; line-height:1.45; color:var(--ink); }
.as-cred-meta{ font-size:14px; color:var(--muted-2); margin-top:2px; }
.as-affil-card{ margin-top:24px; }
.as-affil-list{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:48px; margin-top:6px; }
.as-affil-list .as-cred-item, .as-affil-list .as-cred-item:last-child{ padding:10px 0 10px 24px; border-bottom:none; }
.as-affil-list .as-cred-item::before{ top:17px; }

/* Blog cards */
.as-blog-thumb{ width:100%; height:80px; object-fit:cover; border-radius:4px; margin-bottom:10px; background:var(--soft); }
.as-blog-thumb--label{ display:flex; align-items:center; justify-content:center; }
.as-blog-thumb--label span{ font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); }

/* Pagination */
.page-numbers{ display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 10px; margin-right:6px; border:1px solid var(--line); border-radius:4px; font-size:14px; color:var(--ink); }
a.page-numbers:hover{ border-color:var(--accent); opacity:1; }
.page-numbers.current{ background:var(--accent); border-color:var(--accent); color:#FFFFFF; }

/* Contact */
.as-contact{ background:var(--ink); text-align:center; }
.as-contact .as-eyebrow{ color:var(--sage); }
.as-contact h2{ color:var(--bg); }
.as-contact p{ color:#D6D2C6; font-size:17px; line-height:1.6; max-width:560px; margin:0 auto 20px; }

/* Expertise: "How it all connects" — four cards linked by chevrons; subgrid keeps number, credential,
   title and text level across the cards whatever the title length. */
.as-bridge{ display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); column-gap:40px; margin:40px 0 0; padding:0; list-style:none; }
.as-bridge-step{ position:relative; display:grid; grid-row:span 4; grid-template-rows:subgrid; row-gap:0; padding:24px; background:#FFFFFF; border:1px solid var(--line); border-radius:12px; }
.as-bridge-step:not(:last-child)::after{ content:''; position:absolute; top:50%; right:-25px; width:9px; height:9px; border-top:2px solid var(--accent); border-right:2px solid var(--accent); transform:translateY(-50%) rotate(45deg); }
.as-bridge-num{ font-family:var(--font-display); font-size:30px; line-height:1; color:var(--accent); }
.as-bridge-cred{ margin-top:16px; font-size:12px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--accent); }
.as-bridge-label{ margin-top:6px; font-family:var(--font-display); font-size:20px; font-weight:600; line-height:1.3; color:var(--ink); }
.as-bridge-step p{ margin:10px 0 0; font-size:15px; line-height:1.65; color:var(--muted); }
.as-bridge-statement{ max-width:860px; margin:64px 0 0; padding-left:24px; border-left:3px solid var(--accent); font-family:var(--font-display); font-size:21px; line-height:1.6; color:var(--ink); }

/* Events */
.as-event-category{ scroll-margin-top:72px; }
.as-event-category-title{ margin-bottom:32px; }
.as-event-empty{ margin:0; font-size:16px; color:var(--muted-2); }
a.as-chip:hover{ opacity:1; border-color:var(--accent); color:var(--accent); }
.as-events{ display:flex; flex-direction:column; gap:32px; }
.as-event{ padding:32px; }
.as-event-head{ margin-bottom:24px; }
.as-event-head:last-child{ margin-bottom:0; }
.as-event-date{ font-size:13px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent); margin-bottom:8px; }
.as-event .as-event-title{ font-size:26px; line-height:1.25; margin-bottom:6px; }
.as-event-location{ font-size:15px; color:var(--muted-2); }
.as-event-gallery{ display:flex; flex-direction:column; gap:12px; }
.as-event-row{ display:flex; align-items:flex-start; gap:12px; }
/* Each photo grows in proportion to its width/height ratio (--ar), so photos in a row share one height and none is cropped. */
.as-event-photo{ flex:var(--ar, 1.7778) 1 0; min-width:0; aspect-ratio:var(--ar, 16 / 9); display:block; overflow:hidden; border-radius:6px; background:var(--soft); }
.as-event-photo img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .3s ease; }
.as-event-photo:only-child{ flex:0 1 auto; width:min(100%, calc(560px * var(--ar, 1.7778))); }
.as-event-photo:hover{ opacity:1; }
.as-event-photo:hover img{ transform:scale(1.02); }

/* Single post / page */
.as-entry{ max-width:760px; margin:0 auto; padding:120px 24px 96px; }
.as-entry-title{ font-size:38px; margin-bottom:12px; }
.as-entry-meta{ font-size:14px; color:var(--muted-2); margin-bottom:32px; }
.as-entry-content{ font-size:18px; line-height:1.8; color:var(--muted); }
.as-entry-content p{ margin:0 0 20px; }
.as-entry-content h2{ font-size:28px; margin:40px 0 16px; }
.as-entry-content img{ border-radius:8px; margin:24px 0; }

@media (max-width: 900px){
  .as-nav-links{ display:none; position:absolute; top:100%; left:0; right:0; background:var(--bg); flex-direction:column; align-items:flex-start; gap:0; border-bottom:1px solid var(--line); }
  .as-nav-links.is-open{ display:flex; }
  .as-nav-links a{ width:100%; padding:14px 24px; border-top:1px solid var(--line); }
  .as-nav-toggle{ display:block; }
  .as-hero h1{ font-size:34px; }
  .as-about-lead{ margin-bottom:64px; padding-left:18px; font-size:19px; }
  .as-bridge{ grid-template-columns:minmax(0, 1fr); row-gap:40px; }
  .as-bridge-step:not(:last-child)::after{ top:auto; right:auto; bottom:-27px; left:50%; transform:translateX(-50%) rotate(135deg); }
  .as-badges-title{ margin-bottom:24px; font-size:24px; }
  .as-badges{ grid-template-columns:minmax(0, 1fr); grid-template-rows:none; grid-auto-flow:row; gap:18px; }
  .as-bridge-statement{ margin-top:48px; padding-left:18px; font-size:18px; }
  .as-story, .as-story--reverse{ grid-template-columns:minmax(0, 1fr); gap:48px; }
  .as-story + .as-story{ margin-top:80px; }
  .as-story--reverse .as-story-photo{ order:0; }
  .as-story-photo{ width:min(360px, calc(100% - 16px)); }
  .as-story-photo::before, .as-story--reverse .as-story-photo::before{ inset:16px -16px -16px 16px; }
  .as-story-title{ font-size:30px; }
  .as-about-close{ margin-top:80px; }
  .as-milestones{ grid-template-columns:minmax(0, 560px); }
  .as-about-teaser{ flex-direction:column; align-items:flex-start; }
  .as-grid-3, .as-grid-2{ grid-template-columns:1fr; }
  .as-affil-list{ grid-template-columns:minmax(0, 1fr); }
  .as-section{ padding:64px 0; }
  .as-event{ padding:20px; }
  .as-event .as-event-title{ font-size:22px; }
  .as-event-row{ flex-direction:column; }
  .as-event-photo, .as-event-photo:only-child{ flex:none; width:100%; }
}

/* Homepage banner — desktop only; phones keep the plain hero */
@media (min-width: 901px){
  .as-hero{
    min-height:clamp(460px, 42vw, 640px);
    display:flex; align-items:center;
    padding:72px 0;
    text-align:left;
    background:
      linear-gradient(90deg, rgba(253,250,246,.97) 0%, rgba(253,250,246,.88) 34%, rgba(253,250,246,.35) 50%, rgba(253,250,246,0) 62%),
      url(assets/banner-art.webp) right bottom / cover no-repeat #FDFAF6;
  }
  .as-hero-inner{ width:100%; max-width:none; margin:0; padding:0 clamp(32px, 6vw, 120px); align-items:flex-start; }
  .as-hero-inner > *, .as-hero p{ max-width:540px; }
  .as-hero h1{ font-size:44px; }
  .as-hero .as-btn-row{ justify-content:flex-start; }
}

/* Monogramme AS à gauche du nom dans le menu */
.as-nav-logo{ display:inline-flex; align-items:center; gap:10px; }
.as-nav-logo-mark{ width:40px; height:40px; flex:none; display:block; }
@media (max-width: 600px){ .as-nav-logo-mark{ width:34px; height:34px; } }
