/* ===================================================
   Michel Bruneau — Engineering Profile
   Shared Stylesheet v5
   EXACT color palette from TheBlessingsOfDisaster.htm
   Light blue-white background, dark navy text/headers
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,300;1,8..60,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── Design Tokens — exact BoD palette ── */
:root {
  /* Backgrounds — light blue-white (BoD body = #f4f7fb) */
  --bg:            #f4f7fb;   /* body background: pale blue-white */
  --surface:       #e8eef7;   /* card / section background */
  --surface-2:     #dde6f4;   /* deeper surface: hover, callout bg */
  --border:        #c9ddf5;   /* border: pale blue */
  --border-light:  #dce8f5;   /* subtle divider */
  --nav-bg:        #0d1b2a;   /* top bar + footer: darkest navy */

  /* Text — dark navy on light bg */
  --heading:       #0b2545;   /* deep navy headings */
  --text:          #0e3d6e;   /* dark blue body text */
  --text-muted:    #4a6080;   /* blue-grey secondary text */
  --text-faint:    #8aa4c0;   /* light blue-grey labels */

  /* Accent & links */
  --accent:        #c09a30;   /* gold — exact BoD value */
  --accent-dim:    #9a7a22;   /* darker gold */
  --accent-subtle: rgba(192,154,48,0.10);
  --accent-border: rgba(192,154,48,0.30);
  --link:          #1a5fa8;   /* medium blue links */
  --link-hover:    #0e3d6e;   /* darker blue on hover */

  /* Nav text (reversed — light on dark nav-bg) */
  --nav-text:      #c9ddf5;   /* pale blue nav links */
  --nav-text-muted:#8aa4c0;   /* muted nav links */

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-ui:      'DM Sans', system-ui, sans-serif;

  --r:    5px;
  --r-lg: 10px;
  --max:  940px;
  --side: 210px;
  --tr:   0.18s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.78; min-height: 100vh; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--link-hover); text-decoration: underline; }
ul { list-style: none; }

/* ══ TOP NAV BAR (dark navy — same as BoD) ══════ */
.top-bar { background: var(--nav-bg); border-bottom: 2px solid #1a5fa8; padding: 0 1.5rem; position: sticky; top: 0; z-index: 200; }
.top-bar-inner { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 1rem; }
.nav-brand { font-family: var(--font-display); font-size: 0.95rem; color: var(--accent); white-space: nowrap; flex-shrink: 0; }
.nav-brand a { color: inherit; }
.nav-brand a:hover { color: #e0bf60; text-decoration: none; }

.nav-links { display: flex; gap: 0; flex-wrap: wrap; align-items: center; }
.nav-links a { font-family: var(--font-ui); font-size: 0.73rem; font-weight: 500; letter-spacing: 0.055em; text-transform: uppercase; color: var(--nav-text-muted); padding: 0.3rem 0.55rem; border-radius: var(--r); transition: color var(--tr), background var(--tr); }
.nav-links a:hover, .nav-links a.active { color: var(--accent); background: rgba(192,154,48,0.12); text-decoration: none; }

/* Hamburger — hidden on desktop */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; padding: 6px; background: none; border: 1px solid #2a4060; border-radius: var(--r); cursor: pointer; flex-shrink: 0; }
.hamburger span { display: block; height: 2px; background: var(--nav-text-muted); border-radius: 2px; transition: all 0.22s ease; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hamburger:hover span { background: var(--accent); }

/* Mobile drawer */
.mobile-nav { display: none; position: fixed; top: 52px; left: 0; right: 0; bottom: 0; background: var(--nav-bg); border-top: 1px solid #1a3a5c; z-index: 199; overflow-y: auto; padding: 1.5rem; transform: translateX(100%); transition: transform 0.28s cubic-bezier(0.4,0,0.2,1); }
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-section { margin-bottom: 1.75rem; }
.mobile-nav-section-title { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 1px solid #1e3a5c; }
.mobile-nav-section a { font-family: var(--font-ui); font-size: 0.92rem; color: var(--nav-text-muted); display: block; padding: 0.5rem 0.4rem; border-bottom: 1px solid #152840; transition: color var(--tr), padding-left var(--tr); }
.mobile-nav-section a:hover { color: var(--accent); padding-left: 0.8rem; text-decoration: none; }
.mobile-nav-section a:last-child { border-bottom: none; }

/* ══ PAGE HERO ════════════════════════════════════ */
.page-hero { background: linear-gradient(150deg, #0b2545 0%, #0e3d6e 60%); border-bottom: 3px solid var(--accent); padding: 3rem 2rem 2.75rem; }
.page-hero-inner { max-width: var(--max); margin: 0 auto; }
.breadcrumb { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.045em; text-transform: uppercase; color: rgba(201,221,245,0.6); margin-bottom: 1.4rem; display: flex; align-items: center; gap: 0.45em; flex-wrap: wrap; }
.breadcrumb a { color: rgba(201,221,245,0.6); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb .sep { color: rgba(201,221,245,0.3); }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3.8vw, 2.6rem); font-weight: 700; color: #f4f7fb; line-height: 1.18; margin-bottom: 0.45rem; }
.page-hero .sub { font-family: var(--font-ui); font-size: 0.82rem; color: #8aa4c0; letter-spacing: 0.05em; text-transform: uppercase; }

/* Profile hero (index) */
.profile-hero { display: flex; gap: 2.5rem; align-items: flex-start; }
.profile-photo { flex-shrink: 0; width: 120px; height: 148px; object-fit: cover; object-position: center top; border-radius: var(--r-lg); border: 3px solid rgba(201,221,245,0.4); }
.profile-info h1 { margin-bottom: 0.35rem; }
.profile-title { font-family: var(--font-ui); font-size: 0.82rem; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.85rem; line-height: 1.6; }
.profile-links { font-family: var(--font-ui); font-size: 0.83rem; color: #8aa4c0; line-height: 2; }
.profile-links a { color: #c9ddf5; }
.profile-links a:hover { color: var(--accent); }

/* ══ TWO-COLUMN LAYOUT ══════════════════════════ */
.layout { max-width: var(--max); margin: 0 auto; padding: 2.75rem 2rem 3.5rem; display: grid; grid-template-columns: 1fr var(--side); gap: 2.75rem; align-items: start; }
.main { min-width: 0; }
.sidebar { position: sticky; top: 66px; }

/* ══ SECTIONS ════════════════════════════════════ */
.section { margin-bottom: 2.75rem; }
.section-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--heading); padding-bottom: 0.55rem; margin-bottom: 1.15rem; border-bottom: 2px solid var(--border); display: flex; align-items: center; gap: 0.55rem; }
.section-title::before { content: ''; display: inline-block; width: 3px; height: 1em; background: var(--accent); border-radius: 2px; flex-shrink: 0; }

/* ══ CARDS & CALLOUTS ════════════════════════════ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.35rem 1.5rem; margin-bottom: 1.1rem; }
.card:last-child { margin-bottom: 0; }
.card p, .card li { font-size: 0.9rem; line-height: 1.7; }
.card p + p { margin-top: 0.6rem; }
.callout { background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: 0 var(--r) var(--r) 0; padding: 1rem 1.2rem; font-size: 0.87rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 1.25rem; }
.callout strong { color: var(--text); }
.callout p + p { margin-top: 0.55rem; }

/* ══ PROSE & LISTS ════════════════════════════════ */
.prose { font-size: 0.92rem; line-height: 1.8; }
.prose p + p { margin-top: 0.8rem; }
.dash-list li { position: relative; padding: 0.4rem 0 0.4rem 1.3rem; font-size: 0.9rem; border-bottom: 1px solid var(--border-light); }
.dash-list li:last-child { border-bottom: none; }
.dash-list li::before { content: '—'; position: absolute; left: 0; color: var(--accent-dim); font-size: 0.85em; }

/* ══ COLLAPSIBLE PANELS ══════════════════════════ */
.collapse-group { margin-bottom: 0.6rem; }
.collapse-btn { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 0.75rem 1rem; display: flex; align-items: center; justify-content: space-between; cursor: pointer; transition: background var(--tr), border-color var(--tr); gap: 0.75rem; }
.collapse-btn:hover { background: var(--surface-2); border-color: var(--accent-border); }
.collapse-btn[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-color: var(--accent-border); background: var(--surface-2); }
.collapse-label { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--link); text-align: left; }
.collapse-btn[aria-expanded="true"] .collapse-label { color: var(--accent); }
.collapse-count { font-family: var(--font-ui); font-size: 0.7rem; color: var(--text-faint); background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 0.1rem 0.55rem; flex-shrink: 0; }
.collapse-btn[aria-expanded="true"] .collapse-count { background: var(--accent-subtle); border-color: var(--accent-border); color: var(--accent-dim); }
.collapse-icon { flex-shrink: 0; color: var(--text-faint); font-size: 0.75rem; transition: transform 0.25s ease; }
.collapse-btn[aria-expanded="true"] .collapse-icon { transform: rotate(180deg); color: var(--accent); }
.collapse-body { display: none; background: #fff; border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--r) var(--r); overflow: hidden; }
.collapse-body.open { display: block; }
.collapse-body ul { list-style: none; }
.collapse-body li { padding: 0.6rem 1rem 0.6rem 1.2rem; border-bottom: 1px solid var(--border-light); font-size: 0.87rem; line-height: 1.55; display: flex; gap: 0.75rem; align-items: baseline; }
.collapse-body li:last-child { border-bottom: none; }
.yr { font-family: var(--font-ui); font-size: 0.7rem; color: var(--text-faint); flex-shrink: 0; min-width: 34px; padding-top: 0.05rem; }

/* ══ CONTACT INFO ════════════════════════════════ */
.info-grid { display: grid; gap: 0.65rem; }
.info-row { display: flex; gap: 0.85rem; align-items: baseline; font-size: 0.88rem; }
.info-label { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-dim); flex-shrink: 0; width: 46px; }

/* ══ TAGS ═════════════════════════════════════════*/
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.85rem; }
.tag { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.05em; color: var(--link); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 0.15rem 0.65rem; }

/* ══ SIDEBAR NAV ══════════════════════════════════ */
.snav-group { margin-bottom: 1.65rem; }
.snav-title { font-family: var(--font-ui); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.11em; text-transform: uppercase; color: var(--heading); margin-bottom: 0.4rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--border); }
.snav-group ul li a { font-family: var(--font-ui); font-size: 0.8rem; color: var(--text-muted); display: block; padding: 0.28rem 0.45rem; border-radius: var(--r); transition: color var(--tr), background var(--tr); }
.snav-group ul li a:hover, .snav-group ul li a.cur { color: var(--link); background: var(--surface); text-decoration: none; }

/* ══ AWARDS ═══════════════════════════════════════ */
.award-list li { padding: 0.8rem 0; border-bottom: 1px solid var(--border); font-size: 0.89rem; line-height: 1.6; display: flex; gap: 0.9rem; }
.award-list li:last-child { border-bottom: none; }
.award-year { font-family: var(--font-ui); font-size: 0.7rem; color: var(--accent-dim); flex-shrink: 0; min-width: 38px; padding-top: 0.15rem; font-weight: 600; }

/* ══ CONSULTING ═══════════════════════════════════ */
.proj-list li { padding: 0.85rem 0; border-bottom: 1px solid var(--border); font-size: 0.89rem; line-height: 1.65; }
.proj-list li:last-child { border-bottom: none; }
.proj-client { font-family: var(--font-ui); font-size: 0.73rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--heading); margin-bottom: 0.2rem; }

/* ══ STUDENT TABLES ═══════════════════════════════ */
.student-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; margin-bottom: 1.5rem; }
.student-table th { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--heading); padding: 0.5rem 0.7rem; border-bottom: 2px solid var(--border); text-align: left; background: var(--surface); }
.student-table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border-light); vertical-align: top; line-height: 1.5; }
.student-table tr:last-child td { border-bottom: none; }
.student-table tr:hover td { background: var(--surface); }
.student-table .employer { font-family: var(--font-ui); font-size: 0.75rem; color: var(--text-muted); }
.student-table .dates { font-family: var(--font-ui); font-size: 0.72rem; color: var(--text-faint); white-space: nowrap; }
.table-group-head { font-family: var(--font-display); font-size: 1rem; color: var(--heading); margin: 1.5rem 0 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border); }
.table-group-head:first-child { margin-top: 0; }
.student-section { margin-bottom: 2.5rem; }

/* ══ FOOTER (dark navy — same as nav) ════════════ */
footer { background: var(--nav-bg); border-top: 2px solid #1a5fa8; padding: 1.75rem 2rem; text-align: center; font-family: var(--font-ui); font-size: 0.72rem; color: var(--nav-text-muted); letter-spacing: 0.04em; }
footer a { color: var(--nav-text-muted); }
footer a:hover { color: var(--accent); }

/* ══ RESPONSIVE ════════════════════════════════════ */
@media (max-width: 860px) {
  :root { --side: 180px; }
  .layout { gap: 2rem; padding: 2rem 1.5rem 3rem; }
}
@media (max-width: 680px) {
  .hamburger  { display: flex; }
  .nav-links  { display: none; }
  .mobile-nav { display: block; }
  .layout { grid-template-columns: 1fr; padding: 1.75rem 1.2rem 2.5rem; gap: 0; }
  .sidebar { display: none; }
  .page-hero { padding: 2rem 1.2rem 1.75rem; }
  .profile-hero { flex-direction: column; align-items: center; text-align: center; }
  .profile-photo { width: 100px; height: 124px; }
  .student-section { overflow-x: auto; }
  .student-table { font-size: 0.78rem; }
  .breadcrumb { font-size: 0.68rem; }
}
@media (max-width: 400px) {
  .top-bar-inner { height: 48px; }
  .mobile-nav { top: 48px; }
  .page-hero h1 { font-size: 1.5rem; }
}
