/* =====================================================
   PRANSHU AGRAWAL PORTFOLIO — style.css
   Complete design system — covers all 8 pages
   ===================================================== */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* =====================================================
   DESIGN TOKENS
   ===================================================== */

:root {
  /* --- Surfaces (light) --- */
  --bg:              #f2f0ea;
  --surface:         #faf8f3;
  --surface-2:       #f5f2ec;
  --surface-3:       #eceae3;
  --surface-dynamic: #e4e1d9;

  /* --- Text (light) --- */
  --text:            #111311;
  --text-muted:      #565a55;
  --text-faint:      #8a8f88;
  --text-inverse:    #f9f8f4;

  /* --- Accent --- */
  --primary:         #0d5c63;
  --primary-dark:    #083d42;
  --primary-light:   #1a7d87;
  --primary-soft:    rgba(13, 92, 99, 0.10);

  /* --- Semantic --- */
  --success:         #2e7d32;
  --success-soft:    #e8f5e9;
  --warning:         #b45309;
  --warning-soft:    #fef3c7;
  --error:           #b71c1c;
  --error-soft:      #fdecea;
  --planned:         #336699;
  --planned-soft:    #E8EEF4;

  /* --- Borders --- */
  --border:          rgba(17, 19, 17, 0.10);
  --border-strong:   rgba(17, 19, 17, 0.18);
  --divider:         rgba(17, 19, 17, 0.06);

  /* --- Shadows --- */
  --shadow-xs:       0 1px 2px rgba(17,19,17,0.04);
  --shadow-sm:       0 1px 4px rgba(17,19,17,0.06), 0 2px 8px rgba(17,19,17,0.04);
  --shadow-md:       0 4px 16px rgba(17,19,17,0.08), 0 2px 6px rgba(17,19,17,0.05);
  --shadow-lg:       0 12px 40px rgba(17,19,17,0.10), 0 4px 12px rgba(17,19,17,0.06);
  --shadow-xl:       0 24px 64px rgba(17,19,17,0.13), 0 8px 24px rgba(17,19,17,0.08);

  /* --- Radius --- */
  --r-xs:   6px;
  --r-sm:   10px;
  --r-md:   16px;
  --r-lg:   22px;
  --r-xl:   30px;
  --r-2xl:  40px;
  --r-pill: 9999px;

  /* --- Spacing (4px base) --- */
  --sp-1:  4px;   --sp-2:  8px;   --sp-3:  12px;
  --sp-4:  16px;  --sp-5:  20px;  --sp-6:  24px;
  --sp-8:  32px;  --sp-10: 40px;  --sp-12: 48px;
  --sp-16: 64px;  --sp-20: 80px;  --sp-24: 96px;
  --sp-32: 128px;

  /* --- Typography --- */
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* --- Type scale (fluid) --- */
  --text-xs:   clamp(0.75rem,  0.70rem + 0.25vw, 0.875rem);   /* 12–14px */
  --text-sm:   clamp(0.875rem, 0.82rem + 0.28vw, 1rem);        /* 14–16px */
  --text-base: clamp(1rem,     0.96rem + 0.20vw, 1.125rem);    /* 16–18px */
  --text-lg:   clamp(1.125rem, 1.00rem + 0.60vw, 1.5rem);      /* 18–24px */
  --text-xl:   clamp(1.5rem,   1.20rem + 1.20vw, 2.2rem);      /* 24–35px */
  --text-2xl:  clamp(2rem,     1.20rem + 2.40vw, 3.4rem);      /* 32–54px */
  --text-hero: clamp(3rem,     1.00rem + 6.50vw, 7rem);         /* 48–112px */

  /* --- Transitions --- */
  --ease:      220ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-fast: 140ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Layout --- */
  --max-w:     1240px;
  --nav-h:     68px;
}

/* =====================================================
   DARK MODE
   ===================================================== */

[data-theme="dark"] {
  --bg:              #141614;
  --surface:         #1a1c1a;
  --surface-2:       #1f221f;
  --surface-3:       #252825;
  --surface-dynamic: #2c2f2c;
  --text:            #eef0ee;
  --text-muted:      #a2a8a2;
  --text-faint:      #6a706a;
  --text-inverse:    #111311;
  --primary:         #6eb0ac;
  --primary-dark:    #9dd0cc;
  --primary-light:   #4f9896;
  --primary-soft:    rgba(110, 176, 172, 0.12);
  --success:         #4caf50;
  --success-soft:    rgba(76,175,80,0.12);
  --warning:         #fbbf24;
  --warning-soft:    rgba(251,191,36,0.12);
  --error:           #ef9a9a;
  --error-soft:      rgba(183,28,28,0.18);
  --border:          rgba(238, 240, 238, 0.09);
  --border-strong:   rgba(238, 240, 238, 0.16);
  --divider:         rgba(238, 240, 238, 0.05);
  --shadow-xs:       0 1px 2px rgba(0,0,0,0.20);
  --shadow-sm:       0 1px 4px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.18);
  --shadow-md:       0 4px 16px rgba(0,0,0,0.34), 0 2px 6px rgba(0,0,0,0.22);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.40), 0 4px 12px rgba(0,0,0,0.28);
  --shadow-xl:       0 24px 64px rgba(0,0,0,0.50), 0 8px 24px rgba(0,0,0,0.36);
}

/* =====================================================
   RESET & BASE
   ===================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  hanging-punctuation: first last;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.65;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color var(--ease), color var(--ease);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

ul[role="list"], ol[role="list"] { list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
  text-wrap: balance;
}

p {
  color: var(--text-muted);
  max-width: 70ch;
  text-wrap: pretty;
  line-height: 1.7;
}

table { border-collapse: collapse; width: 100%; }

::selection {
  background: var(--primary-soft);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =====================================================
   SKIP LINK
   ===================================================== */

.skip-link {
  position: absolute;
  left: 16px;
  top: -70px;
  background: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  z-index: 9999;
  transition: top var(--ease);
}
.skip-link:focus { top: 16px; }

/* =====================================================
   LAYOUT UTILITIES
   ===================================================== */

.wrap {
  width: min(calc(100% - 40px), var(--max-w));
  margin-inline: auto;
}

.section {
  padding-block: clamp(var(--sp-12), 9vw, var(--sp-32));
}

.section-sm {
  padding-block: clamp(var(--sp-8), 5vw, var(--sp-20));
}

.section-head {
  display: grid;
  grid-template-columns: clamp(200px, 28%, 320px) 1fr;
  gap: 28px;
  align-items: end;
  margin-bottom: 44px;
}

.section-head p { margin-bottom: 0; }

/* =====================================================
   TYPOGRAPHY HELPERS
   ===================================================== */

.kicker {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.label-sm {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
}

.display    { font-size: var(--text-hero); line-height: 0.9; }
.heading-xl { font-size: var(--text-2xl); }
.heading-lg { font-size: var(--text-xl); }
.heading-md { font-size: var(--text-lg); }
.heading-sm { font-size: var(--text-base); font-family: var(--font-body); font-weight: 700; }

.text-primary { color: var(--primary) !important; }
.text-muted-custom { color: var(--text-muted); }
.text-faint   { color: var(--text-faint); }

/* =====================================================
   NAVBAR
   ===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  transition: background var(--ease), border-color var(--ease);
}

.site-header .wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: max(20px, (100% - var(--max-w)) / 2);
}

/* Bootstrap navbar overrides */
.navbar { padding-block: 0; width: 100%; }

.navbar-brand {
  display: flex !important;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text) !important;
  text-decoration: none;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--primary);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease);
}
.navbar-brand:hover .brand-logo {
  background: var(--surface-2);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}

.nav-link {
  position: relative;
  color: var(--text-muted) !important;
  font-size: 11.5px !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  padding: 10px 12px !important;
  transition: color var(--ease) !important;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1.5px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--ease);
  border-radius: var(--r-pill);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.navbar-toggler {
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  border-radius: var(--r-sm) !important;
  padding: 7px 11px !important;
  line-height: 1 !important;
  transition: background var(--ease) !important;
}

.navbar-toggler:hover { background: var(--surface-2) !important; }
.navbar-toggler-icon { display: none !important; }

/* Theme toggle button */
.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.theme-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-strong);
  transform: rotate(18deg);
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn-swiss,
.btn-outline-swiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 22px;
  min-height: 48px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform var(--ease),
    background var(--ease),
    border-color var(--ease),
    color var(--ease),
    box-shadow var(--ease);
}

.btn-swiss {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}
.btn-swiss:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-swiss:active { transform: translateY(0); }

.btn-outline-swiss {
  background: transparent;
  color: var(--text) !important;
  border-color: var(--border-strong);
}
.btn-outline-swiss:hover {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  color: var(--text) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.btn-outline-swiss:active { transform: translateY(0); }

/* Sizes */
.btn-sm-swiss {
  min-height: 36px;
  padding: 0 14px;
  font-size: var(--text-xs);
}

.btn-lg-swiss {
  min-height: 56px;
  padding: 0 32px;
  font-size: var(--text-base);
}

/* =====================================================
   CARDS
   ===================================================== */

.card-swiss {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition:
    transform var(--ease),
    border-color var(--ease),
    box-shadow var(--ease);
}

.card-swiss:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-md);
}

.card-xs  { padding: 14px; border-radius: var(--r-sm); }
.card-sm  { padding: 18px; border-radius: var(--r-md); }
.card-xl  { padding: 36px; border-radius: var(--r-xl); }
.card-2xl { padding: 48px; border-radius: var(--r-2xl); }

/* No-hover variant */
.card-static:hover {
  transform: none;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

/* =====================================================
   CHIPS / TAGS
   ===================================================== */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}

.chip-primary {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 22%, transparent);
}

.chip-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 22%, transparent);
}

.chip-warning {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 22%, transparent);
}

.chip-planned {
  background: var(--planned-soft);
  color: var(--planned);
  border-color: color-mix(in srgb, var(--planned) 22%, transparent);
}

.roles-section .roles-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.roles-section .roles-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-md);
}

.roles-section .roles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.roles-intro {
  max-width: 70ch;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.roles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-chip {
  transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.role-chip:hover {
  transform: translateY(-2px);
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
  box-shadow: var(--shadow-xs);
}
@keyframes roleChipIn {
  to {
    opacity: 2;
    transform: translateY(0);
  }
}

.roles-section .roles-intro {
  max-width: 62ch;
  margin-top: 10px;
}

/* =====================================================
   DIVIDERS & SPACING UTILS
   ===================================================== */

.hr-swiss {
  border: none;
  border-top: 1px solid var(--divider);
  margin-block: 0;
}

.mt-2  { margin-top: var(--sp-2) !important; }
.mt-3  { margin-top: var(--sp-3) !important; }
.mt-4  { margin-top: var(--sp-4) !important; }
.mt-5  { margin-top: var(--sp-5) !important; }
.mt-6  { margin-top: var(--sp-6) !important; }
.mt-8  { margin-top: var(--sp-8) !important; }
.mt-10 { margin-top: var(--sp-10) !important; }
.mt-12 { margin-top: var(--sp-12) !important; }

.mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-3 { margin-bottom: var(--sp-3) !important; }
.mb-4 { margin-bottom: var(--sp-4) !important; }
.mb-6 { margin-bottom: var(--sp-6) !important; }
.mb-8 { margin-bottom: var(--sp-8) !important; }

/* =====================================================
   HERO SECTION — with cover image
   ===================================================== */

.hero {
  position: relative;
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--divider);
  padding-block: clamp(var(--sp-12), 8vw, var(--sp-24));
}

/* Cover image layer */
.hero-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Overlay — two-layer blend for depth and readability */
.hero-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      105deg,
      color-mix(in srgb, var(--bg) 88%, transparent) 0%,
      color-mix(in srgb, var(--bg) 70%, transparent) 50%,
      color-mix(in srgb, var(--bg) 40%, transparent) 100%
    );
}

/* Push content above the cover */
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.portrait {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

h1.hero-name {
  font-size: var(--text-hero);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
  color: var(--text);
}

.hero-tagline {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 28px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Hero right-column panel */
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: clamp(20px, 3vw, 34px);
}

.metric-row {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: start;
  padding-block: 16px;
  border-top: 1px solid var(--divider);
}
.metric-row:first-child {
  border-top: none;
  padding-top: 0;
}

.metric-num {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  line-height: 0.9;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.metric-desc strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.metric-desc span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* =====================================================
   STATS ROW
   ===================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-md);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.8vw, 3rem);
  color: var(--primary);
  line-height: 0.9;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

/* =====================================================
   EXPERIENCE TIMELINE
   ===================================================== */

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 28px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px 28px;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.timeline-item:hover {
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-md);
  transform: translateX(3px);
}

.tl-date {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--text-faint);
  padding-top: 5px;
  line-height: 1.5;
}

.tl-title {
  font-size: var(--text-lg);
  margin-bottom: 3px;
  color: var(--text);
}

.tl-company {
  display: block;
  font-size: var(--text-sm);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 14px;
}

.tl-points {
  list-style: none;
  display: grid;
  gap: 7px;
}

.tl-points li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.tl-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* =====================================================
   PROJECT CARDS
   ===================================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 16px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
}

.project-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 1.15rem;
  flex-shrink: 0;
}

.project-card h3 {
  font-size: var(--text-lg);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 0;
}

.project-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0;
  max-width: none;
}

.project-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-link {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--ease), color var(--ease);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.project-link:hover { gap: 10px; }

.project-status {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.projects-top-action {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 28px;
}

.projects-bottom-action {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.status-complete { color: var(--success); }
.status-progress { color: var(--warning); }
.status-planned  { color: var(--planned); }

/* =====================================================
   SKILLS
   ===================================================== */

.skills-wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.skill-list {
  display: grid;
  gap: 18px;
}

.skill-item { display: grid; gap: 7px; }

.skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
}

.skill-meta strong { font-weight: 600; color: var(--text); }
.skill-meta span   { font-size: var(--text-xs); color: var(--text-faint); font-variant-numeric: tabular-nums; }

.skill-track {
  height: 5px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.skill-fill {
  width: 0;
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.tool-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.tool-card:hover {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  transform: translateX(3px);
}

.tool-icon {
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

/* =====================================================
   CERTIFICATES & ACHIEVEMENTS
   ===================================================== */

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.achievement-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
  box-shadow: var(--shadow-md);
}

.achievement-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.achievement-card h3 {
  font-size: var(--text-lg);
  line-height: 1.2;
  margin-bottom: 0;
}

.achievement-card p {
  font-size: var(--text-sm);
  margin-bottom: 0;
  max-width: none;
}

/* Certificate image preview */
.cert-img-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: var(--text-sm);
}

.cert-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =====================================================
   BLOG CARDS
   ===================================================== */

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
  box-shadow: var(--shadow-md);
}

.blog-card h3 {
  font-size: var(--text-lg);
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 0;
}

.blog-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 0;
  max-width: none;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.blog-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* =====================================================
   BLOG MODAL
   ===================================================== */

.blog-modal {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.blog-modal.is-open {
  display: flex;
}

.blog-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 10, 0.70);
  backdrop-filter: blur(10px) saturate(0.8);
  -webkit-backdrop-filter: blur(10px) saturate(0.8);
  cursor: pointer;
}

.blog-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(740px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow-xl);

  /* Smooth entrance animation */
  animation: modal-in 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.blog-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1rem;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.blog-modal-close:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
  transform: rotate(90deg);
}

/* Modal body content styles */
#blogModalBody { line-height: 1.75; }

#blogModalBody p {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: 18px;
  max-width: none;
}

#blogModalBody h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
}

#blogModalBody ul {
  list-style: none;
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

#blogModalBody ul li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
}

#blogModalBody ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* =====================================================
   CONTACT / ENQUIRY FORM
   ===================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
}

.contact-info {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--text);
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.contact-row:hover {
  background: var(--surface-3);
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
  transform: translateX(4px);
  color: var(--text);
}
.contact-row i { color: var(--primary); font-size: 1rem; flex-shrink: 0; }

.roles-section {
  padding-top: 0;
}

.roles-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--primary) 16%, var(--border));
  border-radius: var(--r-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.roles-section .section-label {
  color: var(--primary);
}

.roles-intro {
  max-width: 70ch;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 18px;
}

.roles-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(22px, 3.5vw, 36px);
  box-shadow: var(--shadow-sm);
}

@keyframes jiggle {
  0% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-1px) rotate(-2deg); }
  40% { transform: translateY(0) rotate(2deg); }
  60% { transform: translateY(-1px) rotate(-1deg); }
  80% { transform: translateY(0) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.form-group { margin-bottom: 16px; }

label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  transition:
    border-color var(--ease),
    box-shadow var(--ease),
    background var(--ease);
}
.form-control::placeholder { color: var(--text-faint); }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
}
.form-control:hover:not(:focus) {
  border-color: var(--border-strong);
}

textarea.form-control {
  min-height: 140px;
  padding-block: 12px;
  resize: vertical;
  line-height: 1.65;
}

select.form-control { cursor: pointer; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-msg {
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 11px 15px;
  border-radius: var(--r-md);
  margin-bottom: 14px;
}
.form-msg.success { background: var(--success-soft); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 22%, transparent); }
.form-msg.error   { background: var(--error-soft);   color: var(--error);   border: 1px solid color-mix(in srgb, var(--error) 22%, transparent); }

/* =====================================================
   GRID LAYOUTS (2-col, 3-col)
   ===================================================== */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* =====================================================
   RESUME PAGE
   ===================================================== */

.resume-header {
  padding-block: clamp(var(--sp-10), 6vw, var(--sp-20));
  border-bottom: 1px solid var(--divider);
}

.resume-meta-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-top: 28px;
}

.resume-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.resume-meta-item strong {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
}

.resume-section {
  padding-block: 40px;
  border-bottom: 1px solid var(--divider);
}
.resume-section:last-child { border-bottom: none; }

.resume-section h2 {
  font-size: var(--text-xl);
  color: var(--primary);
  margin-bottom: 20px;
}

.resume-pdf-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}

.resume-pdf-wrap iframe {
  width: 100%;
  height: min(900px, 80vh);
  border: none;
  display: block;
}

/* =====================================================
   PROJECT CASE STUDY PAGES
   ===================================================== */

.proj-header {
  padding-block: clamp(var(--sp-10), 7vw, var(--sp-20));
  border-bottom: 1px solid var(--divider);
}

.proj-meta-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-top: 28px;
}

.proj-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.proj-meta-item .label-sm { display: block; margin-bottom: 4px; }
.proj-meta-item strong    { font-size: var(--text-sm); color: var(--text); }

.proj-section {
  padding-block: 44px;
  border-bottom: 1px solid var(--divider);
}
.proj-section:last-child { border-bottom: none; }

.proj-section h2 {
  font-size: var(--text-xl);
  color: var(--primary);
  margin-bottom: 18px;
}

.proj-section p,
.proj-section li {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
}

.proj-section ul {
  list-style: none;
  display: grid;
  gap: 9px;
  padding-left: 0;
}

.proj-section ul li {
  padding-left: 18px;
  position: relative;
}

.proj-section ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Data table */
.data-table {
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: var(--text-sm);
}

.data-table thead {
  background: var(--surface-3);
}

.data-table th {
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  text-align: left;
}

.data-table td {
  padding: 12px 16px;
  color: var(--text-muted);
  border-top: 1px solid var(--divider);
  font-variant-numeric: tabular-nums;
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

/* Insight / callout box */
.insight-box {
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 44px);
  margin-block: 8px;
}

.insight-box h3 {
  font-size: var(--text-xl);
  color: #fff;
  margin-bottom: 12px;
}

.insight-box p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 72ch;
  margin-bottom: 0;
  font-size: var(--text-base);
}

/* Finding cards (3-col grid) */
.finding-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: border-color var(--ease);
}

.finding-card:hover {
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border));
}

.finding-card h4 {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.finding-card p {
  font-size: var(--text-sm);
  margin-bottom: 0;
  max-width: none;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color var(--ease), gap var(--ease);
  text-decoration: none;
}
.back-link:hover { color: var(--primary); gap: 12px; }

/* Next project CTA */
.next-project {
  background: var(--primary);
  color: #fff !important;
  border-radius: var(--r-xl);
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
  text-decoration: none;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
}
.next-project:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  color: #fff !important;
}
.next-project span {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.72;
  margin-bottom: 5px;
}
.next-project strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: #fff;
  line-height: 1.1;
}
.next-project i {
  font-size: 1.8rem;
  color: rgba(255,255,255,0.8);
  flex-shrink: 0;
  transition: transform var(--ease);
}
.next-project:hover i { transform: translateX(6px); }

/* =====================================================
   SITE FOOTER
   ===================================================== */

.site-footer {
  padding-block: 24px 40px;
  border-top: 1px solid var(--divider);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text-faint);
  margin-top: auto;
}

/* =====================================================
   AOS OVERRIDES
   ===================================================== */

[data-aos] { transition-duration: 480ms !important; }
[data-aos="fade-up"]   { transform: translateY(16px); }
[data-aos="fade-left"] { transform: translateX(16px); }

/* =====================================================
   RESPONSIVE — Tablet (≤ 991px)
   ===================================================== */

@media (max-width: 991.98px) {
  .hero-grid          { grid-template-columns: 1fr; }
  .section-head       { grid-template-columns: 1fr; }
  .contact-grid       { grid-template-columns: 1fr; }
  .skills-wrap        { grid-template-columns: 1fr; }
  .timeline-item      { grid-template-columns: 1fr; gap: 8px; }
  .tl-date            { padding-top: 0; }
  .stats-grid         { grid-template-columns: repeat(2, 1fr); }
  .proj-meta-bar      { grid-template-columns: repeat(2, 1fr); }
  .resume-meta-bar    { grid-template-columns: repeat(2, 1fr); }
  .three-col          { grid-template-columns: 1fr 1fr; }
  .two-col            { grid-template-columns: 1fr; }
  .achievements-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* =====================================================
   RESPONSIVE — Mobile (≤ 767px)
   ===================================================== */

@media (max-width: 767.98px) {
  .wrap               { width: min(calc(100% - 24px), var(--max-w)); }
  .hero               { min-height: auto; padding-block: var(--sp-12) var(--sp-10); }
  .hero-actions       { flex-direction: column; align-items: stretch; }
  .hero-actions .btn-swiss,
  .hero-actions .btn-outline-swiss { width: 100%; justify-content: center; }
  .stats-grid         { grid-template-columns: 1fr 1fr; }
  .three-col          { grid-template-columns: 1fr; }
  .two-col            { grid-template-columns: 1fr; }
  .tools-grid         { grid-template-columns: 1fr 1fr; }
  .achievements-grid  { grid-template-columns: 1fr; }
  .form-row           { grid-template-columns: 1fr; }
  .section-head       { margin-bottom: 28px; }
  .next-project       { flex-direction: column; gap: 14px; }
  .proj-meta-bar,
  .resume-meta-bar    { grid-template-columns: 1fr 1fr; }
  .blog-modal-dialog  { max-height: 90vh; border-radius: var(--r-lg); }
}

#roles {
  padding-bottom: clamp(var(--sp-6), 3vw, var(--sp-10)) !important;
}

#contact {
  padding-top: clamp(var(--sp-6), 3vw, var(--sp-10)) !important;
}

@keyframes jiggle {
  0% { transform: translateY(0) rotate(0deg); }
  20% { transform: translateY(-1px) rotate(-2deg); }
  40% { transform: translateY(0) rotate(2deg); }
  60% { transform: translateY(-1px) rotate(-1deg); }
  80% { transform: translateY(0) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}


/* =====================================================
   RESPONSIVE — Small Mobile (≤ 479px)
   ===================================================== */

@media (max-width: 479.98px) {
  .stats-grid         { grid-template-columns: 1fr; }
  .tools-grid         { grid-template-columns: 1fr; }
  .proj-meta-bar,
  .resume-meta-bar    { grid-template-columns: 1fr; }
}
