/* ================================================================
   PERSONAL PORTFOLIO — style.css
   
   Design tokens, then component styles in page order:
   1. Reset & base
   2. Tokens (colors, type, space)
   3. Utility
   4. Header
   5. Hero (intro rectangle + stacked featured)
   6. Credentials row
   7. Skills block
   8. Projects section
   9. Footer
   10. Responsive
================================================================ */


/* ================================================================
   1. RESET & BASE
================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  /* Soft radial gradient: slightly richer blue at center-top, fading to a cooler edge */
  background-color: var(--page);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, #D6EEF5 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 90%, #DDE8ED 0%, transparent 60%);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

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

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}


/* ================================================================
   2. DESIGN TOKENS
================================================================ */
:root {
  /* --- Palette --- */
  --page:        #EAF5F8;   /* light sky-blue page background */
  --card:        #F6EEDC;   /* warm cream cards */
  --card-soft:   #FBF6EA;   /* softer cream — hover / inner surfaces */
  --border:      #D9CBB4;   /* muted warm border */
  --border-blue: #C4D8E0;   /* muted blue-gray border for page-level dividers */

  /* Text — deepened so body copy clears WCAG AA on both page and card */
  --text:        #22303A;   /* primary text — 12.2:1 on page */
  --muted:       #4C6673;   /* secondary text — 5.5:1 on page, 5.3:1 on card */
  --muted-light: #6E858F;   /* labels, placeholders — 3.5:1 */

  /* Sage — accents. `sage` is for fills, `sage-dark` for text on pale fills. */
  --sage:        #45755B;   /* fill (white text passes at 5.3:1) */
  --sage-pale:   #E4F0E9;   /* pale fill behind sage text */
  --sage-dark:   #3D6B53;   /* text on sage-pale — 5.2:1 */

  /* Clay — primary buttons and badges */
  --clay:        #B0522F;   /* fill (white text passes at 5.1:1) */
  --clay-dark:   #90411F;   /* hover */
  --clay-pale:   #F6E1D5;   /* pale fill behind clay text */
  --clay-text:   #9C4527;   /* text on clay-pale — 5.1:1 */

  /* Sky — secondary accent */
  --sky:         #7FB4C8;
  --sky-pale:    #DCEDF4;   /* pale fill behind sky text */
  --sky-dark:    #2F6B82;   /* text on sky-pale — 4.9:1 */

  /* --- Typography --- */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, sans-serif;

  /* --- Space scale --- */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  24px;
  --s6:  32px;
  --s7:  48px;
  --s8:  64px;
  --s9:  96px;

  /* --- Layout --- */
  --max-width:    1120px;
  --page-gutter:  clamp(16px, 4vw, 48px);

  /* --- Shape --- */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* --- Shadow (warm-tinted — avoids cold blue shadows on cream cards) --- */
  --shadow-sm:  0 1px 4px rgba(38, 50, 56, 0.06);
  --shadow-md:  0 4px 18px rgba(38, 50, 56, 0.09);
  --shadow-lg:  0 8px 36px rgba(38, 50, 56, 0.12);
  --shadow-warm: 0 4px 20px rgba(199, 101, 62, 0.10); /* clay-tinted for card hover */

  /* --- Transition --- */
  --ease: 0.22s ease;
}


/* ================================================================
   3. UTILITY
================================================================ */

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Shared image placeholder block */
.img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Real project images fill their fixed-height wrappers cleanly */
.fcard-img-wrap img,
.pcard-img-wrap img,
.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover .fcard-img-wrap img,
.project-card:hover .pcard-img-wrap img {
  transform: scale(1.04);
}

.img-placeholder-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Base tag style */
.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: var(--sage-pale);
  color: var(--sage-dark);
}

/* Category tag colors. Pale fills sit very close to the cream card in
   luminance, so each carries a matching border to stay legible as a chip.
   Every pairing below clears 4.9:1 text contrast. */
.tag--mechatronics  { background: var(--clay-pale); color: var(--clay-text); border-color: #E4BFAB; }
.tag--controls      { background: var(--sky-pale);  color: var(--sky-dark);  border-color: #B4D5E4; }
.tag--mechanical    { background: #FBEADC;          color: #8A4A1C;          border-color: #E8CBAF; }
.tag--manufacturing { background: var(--sage-pale); color: var(--sage-dark); border-color: #BFD9C9; }
.tag--product       { background: #EAE4F3;          color: #5F4A8A;          border-color: #CFC2E4; }
.tag--research      { background: #DBEFEC;          color: #1F6E6A;          border-color: #AFD8D2; }
.tag--misc          { background: #E6ECEF;          color: #55666E;          border-color: #C7D4DA; }

/* --- Buttons --- */
.btn-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease), border-color var(--ease),
              transform var(--ease), box-shadow var(--ease);
  text-decoration: none;
}

/* Primary: warm clay/orange */
.btn-primary {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--clay-dark);
  border-color: var(--clay-dark);
  box-shadow: 0 4px 14px rgba(199, 101, 62, 0.28);
  transform: translateY(-1px);
}

/* Outline: cream border, hovers to card-soft with sage text */
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--card-soft);
  border-color: var(--sage);
  color: var(--sage-dark);
  transform: translateY(-1px);
}

/* Accessibility focus ring */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ================================================================
   4. SITE HEADER
================================================================ */

/* Frosted header — picks up the page's blue, not cream */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(234, 245, 248, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-blue);
  padding: var(--s3) var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
}

.header-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: var(--s5);
  flex-wrap: wrap;
}

.header-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--ease);
}

.header-nav a:hover {
  color: var(--sage);
}


/* ================================================================
   5. HERO — two-column layout
================================================================ */

.hero {
  padding: var(--s6) var(--page-gutter) var(--s5);
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: var(--s6);
  align-items: start;
}

/* Left column: intro rectangle with Experience beneath it, so the column
   fills instead of leaving a tall gap next to the featured stack. */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  min-width: 0;
}

.hero-experience {
  padding: 0 var(--s2);
}

/* Experience entries: company + role lead, date pushed to the right so the
   role is what the eye lands on first. */
.exp-list {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.exp-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
}

.exp-main {
  min-width: 0;
}

.exp-role {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
}

.exp-role strong {
  font-weight: 700;
  color: var(--text);
}

.exp-desc {
  margin-top: var(--s1);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 58ch;
}

.exp-date {
  flex-shrink: 0;
  min-width: 124px;
  text-align: center;
}

/* --- Intro rectangle (left) — wide and flat, photo beside the text --- */
.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--s6);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
  gap: var(--s6);
  box-shadow: var(--shadow-md);
}

.profile-text {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-width: 0;
}

/* Circular profile photo placeholder */
.profile-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--border);
  border: 3px solid var(--card-soft);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.profile-photo svg {
  width: 100%;
  height: 100%;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1.2;
  color: var(--text);
}

.profile-subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: 0.04em;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.75;
  margin-top: var(--s2);
  max-width: 62ch;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  justify-content: flex-start;
  margin-top: var(--s4);
}


/* --- Featured Projects (right) --- */
.featured-projects {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-light);
  margin-bottom: var(--s1);
}

.featured-grid {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

/* Shared featured card styles — cream on blue background */
.featured-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow var(--ease), transform var(--ease), border-color var(--ease), background var(--ease);
}

.featured-card:hover,
.featured-card:focus-visible {
  box-shadow: var(--shadow-warm);
  transform: scale(1.01);
  border-color: var(--sage);
  background: var(--card-soft);
}

.fcard-img-wrap {
  height:240px;
  overflow: hidden;
}

.fcard-img-wrap {
  position: relative;
  height: 240px;
  overflow: hidden;
}

.fcard-img-wrap .img-placeholder {
  transition: transform 0.3s ease;
}

.featured-card:hover .fcard-img-wrap .img-placeholder {
  transform: scale(1.01);
}

.fcard-body {
  padding: var(--s4) var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex: 1;
}

.fcard-tags {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.fcard-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.3;
}

.fcard-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.fcard-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sage);
  margin-top: var(--s1);
  display: inline-block;
  transition: color var(--ease);
}

.fcard-link:hover {
  color: var(--clay);
}


/* ================================================================
   7. CREDENTIALS SECTION
   Compact four-column row — always visible, never hidden
================================================================ */

.credentials {
  padding: var(--s6) var(--page-gutter) var(--s7);
}

.credentials-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s7);
  align-items: start;
}

.cred-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: var(--s3);
  padding-bottom: var(--s2);
  border-bottom: 1.5px solid var(--border);
}

/* Second heading stacked inside one credentials column */
.cred-heading--stacked {
  margin-top: var(--s5);
}

.cred-list {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.cred-list li {
  display: flex;
  gap: var(--s2);
  align-items: baseline;
  font-size: 0.83rem;
}

/* Small year badge using sage accent */
.cred-year {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--sage);
  background: var(--sage-pale);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cred-text {
  color: var(--muted);
  line-height: 1.5;
}

.cred-link {
  color: var(--muted);
  line-height: 1.5;
  transition: color var(--ease);
}

.cred-link:hover {
  color: var(--sage-dark);
}

/* Publication entry that has a link pasted in — gets a subtle arrow cue */
.pub-link {
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 2px;
  transition: color var(--ease), text-decoration-color var(--ease);
}

.pub-link:hover {
  text-decoration-color: var(--sage);
}

.pub-arrow {
  color: var(--sage);
  font-weight: 700;
  white-space: nowrap;
}

/* Skills area */
.skills-area {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.skill-group-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-light);
  margin-bottom: var(--s2);
}

.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}

/* Skill chips: cream on blue-page background — warmer than surroundings */
.chip {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  cursor: default;
}

/* Contact list in credentials */
.contact-list li {
  font-size: 0.85rem;
}

.contact-list a {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  transition: color var(--ease);
}

.contact-list a:hover {
  color: var(--sage-dark);
}


/* ================================================================
   7b. SKILLS BLOCK — full-width band, domains with subsections
================================================================ */

.skills-block {
  max-width: var(--max-width);
  margin: var(--s6) auto 0;
}

.skills-domains {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  margin-top: var(--s4);
}

.skill-domain {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.skill-domain-label {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  padding-bottom: var(--s2);
  border-bottom: 1.5px solid var(--border);
}

.skill-sub-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sage-dark);
  margin-bottom: var(--s2);
}


/* ================================================================
   7c. FILTER PILLS — every category visible in one row
================================================================ */

.filter-bar {
  max-width: var(--max-width);
  margin: 0 auto var(--s6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}

.filter-pill {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), color var(--ease),
              border-color var(--ease), transform var(--ease);
}

.filter-pill:hover {
  background: var(--card-soft);
  border-color: var(--sage);
  color: var(--sage-dark);
  transform: translateY(-1px);
}

.filter-pill.is-active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}


/* ================================================================
   8. PROJECTS SECTION
================================================================ */

/* Slightly different background from page — warm tint to feel grounded */
.projects-section {
  background: rgba(246, 238, 220, 0.35);
  border-top: 1px solid var(--border-blue);
  padding: var(--s7) var(--page-gutter) var(--s8);
}

/* Header row: title + filter dropdown side by side */
.projects-header {
  max-width: var(--max-width);
  margin: 0 auto var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text);
  line-height: 1.15;
}

/* "Click any card for more detail." hint under the section title */
.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: var(--s1);
}

/* Responsive project grid */
.projects-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s5);
}

/* Individual project card — cream on the warm-tinted section bg */
.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease),
              border-color var(--ease), background var(--ease);
  cursor: pointer;
}

/* The author `display: flex` above outranks the UA [hidden] rule,
   so the filter needs this to actually hide filtered-out cards. */
.project-card[hidden] {
  display: none;
}

.project-card:hover,
.project-card:focus-visible {
  box-shadow: var(--shadow-warm);
  transform: translateY(-4px);
  border-color: var(--sage);
  background: var(--card-soft);
  outline: none;
}

.pcard-img-wrap {
  height: 160px;
  overflow: hidden;
}

.pcard-img-wrap .img-placeholder {
  transition: transform 0.4s ease;
}

.project-card:hover .pcard-img-wrap .img-placeholder {
  transform: scale(1.04);
}

.pcard-body {
  padding: var(--s4) var(--s4) var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  flex: 1;
}

.pcard-tags {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.pcard-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.3;
}

.pcard-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

.pcard-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
  display: inline-block;
  margin-top: var(--s1);
  transition: color var(--ease);
}

.pcard-link:hover {
  color: var(--clay);
}

/* Empty state message */
.projects-empty {
  max-width: var(--max-width);
  margin: var(--s6) auto 0;
  text-align: center;
  color: var(--muted-light);
  font-size: 0.9rem;
}


/* ================================================================
   8b. PROJECT DETAIL MODAL
================================================================ */

.project-modal {
  /* The global `* { margin: 0 }` reset kills the UA's `margin: auto` on
     <dialog>, which is what centers a modal — restore it explicitly. */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(680px, calc(100vw - 2 * var(--s5)));
  max-height: min(86vh, 820px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.project-modal::backdrop {
  background: rgba(38, 50, 56, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* Inner wrapper scrolls; the dialog itself stays put so backdrop
   clicks (target === dialog) still register as "close" */
.modal-inner {
  position: relative;
  max-height: inherit;
  overflow-y: auto;
}

/* Absolute against the dialog (not .modal-inner) so it stays put while
   the content scrolls underneath it */
.modal-close {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  z-index: 2;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: rgba(251, 246, 234, 0.92);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}

.modal-close:hover {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}

.modal-media {
  height: 260px;
  overflow: hidden;
  background: var(--border);
}

.modal-media[hidden] {
  display: none;
}

.modal-body {
  padding: var(--s5) var(--s5) var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.modal-tags {
  display: flex;
  gap: var(--s1);
  flex-wrap: wrap;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--text);
}

.modal-meta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--sage);
}

.modal-meta[hidden] {
  display: none;
}

.modal-summary {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Key metrics strip */
.modal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: var(--s2);
  margin: var(--s3) 0 var(--s2);
  padding: var(--s3);
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.modal-stats[hidden] {
  display: none;
}

.mstat {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: center;
}

.mstat-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.15;
  color: var(--clay);
}

.mstat-label {
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}

/* In-depth sections */
.modal-sections {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  margin-top: var(--s4);
}

.modal-sections[hidden] {
  display: none;
}

.modal-section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--sage-dark);
  padding-bottom: var(--s2);
  margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
}

/* Pull quote */
.modal-quote {
  margin-top: var(--s5);
  padding: var(--s4);
  background: var(--sage-pale);
  border-left: 3px solid var(--sage);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--text);
}

.modal-quote[hidden] {
  display: none;
}

.modal-quote cite {
  display: block;
  margin-top: var(--s2);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 600;
  color: var(--sage-dark);
}

.modal-points {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s1);
}

.modal-points[hidden] {
  display: none;
}

/* Sage bullet dots, drawn manually so list-style stays off */
.modal-points li {
  position: relative;
  padding-left: var(--s4);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.modal-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sage);
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}

.modal-links[hidden] {
  display: none;
}


/* ================================================================
   9. SITE FOOTER
================================================================ */

.site-footer {
  padding: var(--s8) var(--page-gutter) var(--s7);
  border-top: 1px solid var(--border-blue);
  background: rgba(195, 224, 234, 0.28);
  text-align: center;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s3);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--text);
}

.footer-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  margin-top: var(--s3);
}

.footer-copy {
  margin-top: var(--s5);
  font-size: 0.8rem;
  color: var(--muted-light);
}


/* ================================================================
   10. RESPONSIVE BREAKPOINTS
================================================================ */

/* --- Tablet: ≤ 900px --- */
@media (max-width: 900px) {

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .profile-card {
    width: 100%;
  }

  .credentials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s6);
  }

  .skills-domains {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }

  .credentials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s5);
  }
}

/* --- Mobile: ≤ 600px --- */
@media (max-width: 600px) {

  .hero {
    padding: var(--s5) var(--page-gutter) var(--s5);
  }

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

  .header-nav {
    gap: var(--s4);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--s5);
    gap: var(--s4);
  }

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

  .exp-list li {
    flex-direction: column;
    gap: var(--s2);
  }

  .exp-date {
    order: -1;
    min-width: 0;
  }

  .profile-name {
    font-size: 1.9rem;
  }

  .projects-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modal-media {
    height: 190px;
  }

  .modal-title {
    font-size: 1.35rem;
  }

  .modal-body {
    padding: var(--s4) var(--s4) var(--s5);
  }
}

/* --- Small mobile: ≤ 400px --- */
@media (max-width: 400px) {
  .profile-actions {
    gap: var(--s1);
  }

  .btn {
    font-size: 0.78rem;
    padding: 7px 13px;
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}