/* ============================================================
   Abhishek Garg — Excel-Themed Portfolio
   styles.css — palette, spreadsheet chrome, light/dark, mobile
   ============================================================ */

/* ------------------------------------------------------------
   1. Design tokens
------------------------------------------------------------ */
:root {
  --excel-green: #107C41;
  --deep-green: #075E45;
  --dark-green: #064C3B;
  --cream: #F7F3EA;
  --warm-white: #FFFDF8;
  --sheet-white: #FFFFFF;
  --grid-line: #DDE4DE;
  --text-primary: #102A2A;
  --text-secondary: #5F6B6A;
  --muted: #899390;
  --gold-accent: #D7A84B;
  --soft-green: #E7F3EC;
  --soft-gold: #F6EBD4;
  --border: #D9DFDC;

  --bg: var(--cream);
  --surface: var(--sheet-white);
  --surface-2: var(--warm-white);
  --header-bg: rgba(247, 243, 234, 0.92);

  --shadow-sm: 0 1px 2px rgba(16, 42, 42, 0.06), 0 2px 8px rgba(16, 42, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 42, 42, 0.08), 0 12px 32px rgba(16, 42, 42, 0.08);
  --shadow-lg: 0 8px 24px rgba(16, 42, 42, 0.12), 0 24px 56px rgba(16, 42, 42, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 12px;
  --col-w: 100px;
  --row-h: 28px;
  --rail-w: 34px;
  --strip-h: 24px;
  --ribbon-h: 48px;
}

[data-theme="dark"] {
  --bg: #111817;
  --surface: #16221F;
  --surface-2: #1A2825;
  --grid-line: #243430;
  --text-primary: #EAF2ED;
  --text-secondary: #A9B7B2;
  --muted: #7E8D88;
  --border: #2A3A36;
  --soft-green: #173227;
  --soft-gold: #332B1A;
  --excel-green: #1D9A55;
  --deep-green: #0F5138;
  --dark-green: #0B3D2C;
  --gold-accent: #E0B45E;
  --header-bg: rgba(17, 24, 23, 0.92);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 12px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4), 0 24px 56px rgba(0, 0, 0, 0.35);
}

/* ------------------------------------------------------------
   2. Reset & base
------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Excel-themed scrollbar (Firefox) */
  scrollbar-width: thin;
  scrollbar-color: var(--excel-green) var(--surface-2);
}

/* Excel-themed scrollbar (Chromium/Edge/Safari) — replaces the default look;
   scrolling behaviour is untouched */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track {
  background: var(--surface-2);
  border-left: 1px solid var(--grid-line);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--excel-green), var(--deep-green));
  border-radius: 8px;
  border: 2px solid var(--surface-2);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--deep-green), var(--dark-green));
}
::-webkit-scrollbar-corner { background: var(--surface-2); }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

/* The hidden attribute must always win over component display values */
[hidden] { display: none !important; }

::selection { background: rgba(16, 124, 65, 0.22); }

:focus-visible {
  outline: 2px solid var(--excel-green);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--excel-green);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* Spreadsheet gridlines: real intersecting rectangles aligned with the
   column strip (100px wide) and row rail (28px tall), anchored to <main> */
main {
  position: relative;
  /* The highlight cell may target columns past the right edge of the
     viewport — clip it instead of growing the horizontal scroll area */
  overflow-x: hidden;
  overflow-x: clip;
}
main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--col-w) var(--row-h);
  background-position: var(--rail-w) var(--strip-h);
  opacity: 0.6;
}
body.no-grid main::before { display: none; }

/* ------------------------------------------------------------
   3. Utilities
------------------------------------------------------------ */
.container {
  width: min(1240px, 100% - 48px);
  margin-inline: auto;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.section {
  padding: 104px 0;
  scroll-margin-top: calc(var(--ribbon-h) + 22px);
  position: relative;
  z-index: 1;
}

/* Home goes all the way to the top (sticky ribbon overlays the hero padding) */
#home { scroll-margin-top: 0; }

/* Compact mode (Ribbon → View) — visibly tighter rhythm across the page */
body.compact .section { padding: 56px 0; }
body.compact main > .section:first-of-type { padding-top: calc(64px + var(--strip-h)); }
body.compact .section-head { margin-bottom: 22px; }
body.compact .section-title { font-size: clamp(24px, 2.6vw, 34px); }
body.compact .section-sub { margin-top: 6px; }
body.compact .hero-grid { gap: 28px; }
body.compact .hero-content h1 { font-size: clamp(30px, 3.4vw, 46px); }
body.compact .hero-desc { margin-top: 12px; font-size: 17px; }
body.compact .hero-meta { margin-top: 14px; }
body.compact .hero-actions { margin-top: 18px; }
body.compact #profile-img { width: 170px; height: 170px; }
body.compact .kpi-grid,
body.compact .about-cards,
body.compact .tools-grid,
body.compact .projects-grid,
body.compact .achievements-grid { gap: 12px; }
body.compact .kpi-cell, body.compact .about-card { padding: 14px 16px; }
body.compact .kpi-value { font-size: 30px; }
body.compact .kpi-icon { width: 34px; height: 34px; margin-bottom: 8px; }
body.compact .tool-card { padding: 12px 14px; }
body.compact .project-card, body.compact .award-card { padding: 16px 18px; }
body.compact .tl-card { padding: 14px 18px; }
body.compact .timeline { gap: 14px; }
body.compact .tl-points { gap: 5px; }
body.compact .about-cards { margin-top: 24px; }
body.compact .certs-title, body.compact .skills-title { margin-top: 22px; }
body.compact .contact-body { margin-top: 10px; font-size: 16px; }
body.compact .contact-actions { margin-top: 18px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.section-kicker {
  font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--excel-green);
  margin-bottom: 10px;
}
.kicker-light { color: var(--gold-accent); }

.section-title {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.title-light { color: #F7F3EA; }

.section-sub {
  margin-top: 12px;
  color: var(--text-secondary);
  max-width: 46ch;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--excel-green);
  white-space: nowrap;
  min-height: 44px;
}
.text-link .icon { transition: transform 0.25s var(--ease); }
.text-link:hover .icon, .text-link:focus-visible .icon { transform: translateX(3px); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}
.tag-green { background: var(--soft-green); color: var(--excel-green); }
.tag-gold { background: var(--soft-gold); color: #8A6A1F; }
[data-theme="dark"] .tag-gold { color: var(--gold-accent); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn .icon-shift { transition: transform 0.25s var(--ease); }
.btn:hover .icon-shift { transform: translateX(3px); }

.btn-primary { background: var(--excel-green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--deep-green); box-shadow: var(--shadow-md); }

.btn-outline { border-color: var(--border); color: var(--text-primary); background: var(--surface); }
.btn-outline:hover { border-color: var(--excel-green); color: var(--excel-green); }

.btn-ghost { border-color: var(--border); color: var(--text-primary); min-height: 40px; padding: 7px 14px; font-size: 14px; }
.btn-ghost:hover { border-color: var(--excel-green); color: var(--excel-green); }

.btn-light { background: #F7F3EA; color: var(--dark-green); }
.btn-light:hover { box-shadow: var(--shadow-md); }

.btn-light-outline { border-color: rgba(247, 243, 234, 0.45); color: #F7F3EA; }
.btn-light-outline:hover { border-color: #F7F3EA; background: rgba(255, 255, 255, 0.08); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.icon-btn:hover { color: var(--excel-green); border-color: var(--excel-green); background: var(--soft-green); }

/* Theme toggle shows the relevant icon only */
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.in { opacity: 1; transform: none; }

/* Flash highlight when jumping to a section */
@keyframes flash-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 124, 65, 0.4); }
  100% { box-shadow: 0 0 0 22px rgba(16, 124, 65, 0); }
}
.flash { animation: flash-ring 0.9s var(--ease) 2; }

/* ------------------------------------------------------------
   4. (reserved — the sticky ribbon below is the only top bar)
------------------------------------------------------------ */

.brand-mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}
.brand-dot { color: var(--gold-accent); }

/* Section navigation lives in the fixed bottom sheet-tab bar (Excel style) */

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }

/* Compact ribbon-styled controls */
.ribbon .icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border-color: rgba(247, 243, 234, 0.35);
  color: #F7F3EA;
  background: rgba(255, 255, 255, 0.08);
}
.ribbon .icon-btn:hover { color: #fff; border-color: rgba(247, 243, 234, 0.8); background: rgba(255, 255, 255, 0.18); }

.cv-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(247, 243, 234, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #F7F3EA;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.cv-chip:hover { color: #fff; border-color: rgba(247, 243, 234, 0.8); background: rgba(255, 255, 255, 0.18); }

/* Search: collapsed to an icon, expands on click */
.search-wrap { position: relative; display: flex; align-items: center; }

.search-input {
  width: 0;
  min-height: 34px;
  padding: 0;
  margin-left: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #F7F3EA;
  font: inherit;
  font-size: 13.5px;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: width 0.3s var(--ease), opacity 0.25s var(--ease),
    padding 0.3s var(--ease), margin 0.3s var(--ease), border-color 0.2s;
}
.search-input::placeholder { color: rgba(247, 243, 234, 0.65); }
.search-input:focus { outline: none; border-color: rgba(247, 243, 234, 0.8); }

.search-wrap.open .search-input {
  width: min(230px, 52vw);
  padding: 6px 12px;
  margin-left: 8px;
  opacity: 1;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 130;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-primary);
}
.search-result .icon { width: 15px; height: 15px; color: var(--muted); }
.search-result:hover, .search-result.active { background: var(--soft-green); color: var(--excel-green); }
.search-empty { padding: 12px; font-size: 13.5px; color: var(--text-secondary); }

.menu-toggle { display: none; }

/* ------------------------------------------------------------
   5. Mobile menu overlay
------------------------------------------------------------ */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: var(--bg);
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.mobile-menu.open { opacity: 1; transform: none; }

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}
.mobile-menu-link:hover { color: var(--excel-green); }

.mobile-menu-actions {
  margin-top: auto;
  display: flex;
  gap: 12px;
  align-items: center;
}

/* ------------------------------------------------------------
   6. Excel ribbon — the only sticky bar: brand | tabs | nav | actions
------------------------------------------------------------ */
.ribbon {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--excel-green), var(--deep-green));
  color: #F7F3EA;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  min-height: var(--ribbon-h);
  z-index: 100;
}

.ribbon-brand {
  display: inline-flex;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #F7F3EA;
  white-space: nowrap;
  flex: none;
}

.ribbon-title {
  font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  font-size: 12px;
  opacity: 0.8;
  white-space: nowrap;
  display: none;
}

.ribbon-tabs {
  display: flex;
  align-items: stretch;
  flex: none;
}

.ribbon-btn {
  position: relative;
  padding: 10px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(247, 243, 234, 0.92);
  border-radius: 6px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.ribbon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.ribbon-btn.open, .ribbon-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.ribbon-btn.open::after, .ribbon-btn[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold-accent);
}

.ribbon-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 16px;
  min-width: 250px;
  max-width: min(360px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  z-index: 80;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 6px 8px;
}
.panel-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.panel-action .icon { width: 17px; height: 17px; color: var(--excel-green); }
.panel-action:hover { background: var(--soft-green); color: var(--excel-green); }

.formula-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 8px 8px; }
.formula-chip {
  font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
.formula-chip:hover { border-color: var(--excel-green); color: var(--excel-green); background: var(--soft-green); }
.panel-note { padding: 0 8px 6px; font-size: 12px; color: var(--muted); }

.panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.panel-toggle:hover { background: var(--soft-green); }
.panel-toggle .icon { width: 17px; height: 17px; color: var(--excel-green); margin-right: 8px; }
.panel-toggle > span:first-child { display: flex; align-items: center; }

.switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  transition: background-color 0.2s;
  flex: none;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
}
.panel-toggle[aria-checked="true"] .switch { background: var(--excel-green); }
.panel-toggle[aria-checked="true"] .switch::after { transform: translateX(16px); }

/* ------------------------------------------------------------
   7. Formula bar + spreadsheet chrome
------------------------------------------------------------ */
.formula-bar {
  position: sticky;
  top: var(--ribbon-h);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  min-height: 40px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(16, 42, 42, 0.06);
  font-family: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  font-size: 13px;
}

.name-box {
  min-width: 56px;
  text-align: center;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--soft-green);
  color: var(--dark-green);
  font-weight: 600;
}
[data-theme="dark"] .name-box { color: #9BD8B4; }

.fx-label { font-style: italic; color: var(--muted); }

.formula-text {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Corner cell where the column strip and row rail meet (Excel select-all box).
   Fixed below the sticky ribbon + formula bar so the column headers stay visible. */
.grid-corner {
  position: fixed;
  top: calc(var(--ribbon-h) + 40px);
  left: 0;
  width: var(--rail-w);
  height: var(--strip-h);
  background: var(--surface-2);
  border-right: 1px solid var(--grid-line);
  border-bottom: 1px solid var(--grid-line);
  z-index: 5;
}

/* Column letters strip — fixed under the formula bar, right of the corner cell */
.col-strip {
  position: fixed;
  top: calc(var(--ribbon-h) + 40px);
  left: var(--rail-w);
  right: 0;
  height: var(--strip-h);
  display: flex;
  overflow: hidden;
  border-bottom: 1px solid var(--grid-line);
  background: var(--surface-2);
  z-index: 5;
}
.col-strip span {
  width: var(--col-w);
  flex: none;
  text-align: center;
  font-size: 11px;
  line-height: var(--strip-h);
  color: var(--muted);
  border-left: 1px solid var(--grid-line);
  font-family: "Cascadia Code", Consolas, monospace;
}

/* Row numbers rail — left of <main>, starts below the corner cell */
.row-rail {
  position: absolute;
  top: var(--strip-h);
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--grid-line);
  background: var(--surface-2);
  z-index: 2;
}
.row-rail span {
  height: var(--row-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  border-bottom: 1px solid var(--grid-line);
  font-family: "Cascadia Code", Consolas, monospace;
}

/* Excel-style select cursors over the headers:
   row header -> right arrow, column header -> down arrow */
@media (hover: hover) and (pointer: fine) {
  .row-rail {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M3 12h10V6.5l8 5.5-8 5.5V12H3z' fill='%23102A2A' stroke='%23ffffff' stroke-width='1.4'/%3E%3C/svg%3E") 3 12, default;
  }
  .col-strip {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M12 3v10H6.5L12 21l5.5-8H12V3z' fill='%23102A2A' stroke='%23ffffff' stroke-width='1.4'/%3E%3C/svg%3E") 12 3, default;
  }
}

main > .section:first-of-type { padding-top: calc(104px + var(--strip-h)); }

/* Hide decorative chrome on smaller screens, in focus mode, or with gridlines off */
@media (max-width: 1100px) {
  .col-strip, .row-rail, .grid-corner { display: none; }
  main > .section:first-of-type { padding-top: 104px; }
}
body.focus-mode .col-strip, body.focus-mode .row-rail, body.focus-mode .grid-corner { display: none; }
body.focus-mode main > .section:first-of-type { padding-top: 104px; }
body.focus-mode .doodle, body.focus-mode .mini-chart { display: none; }
body.no-grid .col-strip, body.no-grid .row-rail, body.no-grid .grid-corner { display: none; }

/* ------------------------------------------------------------
   7b. Playful Excel cell cursor — mouse AND touch
------------------------------------------------------------ */
/* Thick Excel plus cursor: fine-pointer (mouse) devices only */
@media (hover: hover) and (pointer: fine) {
  main {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Cpath d='M11 2h6v9h9v6h-9v9h-6v-9H2v-6h9z' fill='%23ffffff' stroke='%23102A2A' stroke-width='2.5'/%3E%3C/svg%3E") 14 14, cell;
  }
}

/* The highlight cell itself works everywhere (mouse + touch) */
.cell-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--col-w);
  height: var(--row-h);
  border: 2px solid var(--deep-green);
  background: rgba(16, 124, 65, 0.09);
  box-shadow: inset 0 0 0 1px rgba(16, 124, 65, 0.3);
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  will-change: transform, filter;
  transition: opacity 0.15s ease;
}
.cell-cursor.on { opacity: 1; }
body.no-grid .cell-cursor, body.focus-mode .cell-cursor { opacity: 0 !important; }

/* ------------------------------------------------------------
   8. Hero
------------------------------------------------------------ */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--excel-green);
  margin-bottom: 18px;
}

.hero-content h1 {
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero-name { color: var(--excel-green); }

.hero-desc {
  margin-top: 22px;
  font-size: 19px;
  color: var(--text-secondary);
  max-width: 54ch;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}
.hero-meta li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--text-secondary);
}
.hero-meta .icon { width: 17px; height: 17px; color: var(--excel-green); }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--excel-green);
  box-shadow: 0 0 0 3px rgba(16, 124, 65, 0.18);
  flex: none;
}

.hero-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Profile + status card */
.hero-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profile-wrap {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

#profile-img {
  width: 210px;
  height: 210px;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 22px;
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-md);
  background: var(--soft-green);
}

.excel-chip {
  position: absolute;
  top: -8px;
  left: -14px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  background: var(--surface);
  padding: 2px;
}

.mini-chart {
  position: absolute;
  bottom: 58px;
  right: -34px;
  width: 58px;
  height: 38px;
  transform: rotate(6deg);
}
.mini-chart rect { fill: var(--excel-green); opacity: 0.85; }
.mini-chart rect:last-child { fill: var(--gold-accent); opacity: 1; }

.status-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 10px 16px;
  font-size: 13px;
}
.status-card span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.status-card strong { font-weight: 600; }
.status-card em { font-style: normal; color: var(--text-secondary); font-size: 12px; }

/* Doodles */
.doodle { position: absolute; pointer-events: none; z-index: -1; }
.doodle-text {
  font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
  font-size: 19px;
  fill: var(--text-secondary);
  opacity: 0.85;
}
.doodle-light { fill: rgba(247, 243, 234, 0.75); }
.doodle-line {
  fill: none;
  stroke: var(--gold-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.doodle-hero { width: 220px; top: -66px; right: -6px; }
.doodle-kpi { width: 190px; top: 34px; right: 3vw; }
.doodle-about { width: 250px; top: 46px; right: 12px; }
.doodle-exp { width: 235px; top: 110px; left: 3vw; right: auto; transform: rotate(-2deg); }
.doodle-projects { width: 210px; top: 16px; left: 46%; right: auto; transform: rotate(-2deg); }
.doodle-skills { width: 210px; top: 16px; left: 55%; right: auto; transform: rotate(2deg); }
.doodle-ach { width: 180px; top: 12px; left: 3vw; transform: rotate(1.5deg); }
.doodle-contact { width: 190px; top: auto; bottom: 70px; right: 40px; position: absolute; }

/* ------------------------------------------------------------
   9. KPI row
------------------------------------------------------------ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.kpi-cell {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.kpi-cell:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 124, 65, 0.45);
}

.kpi-cellref {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--grid-line);
  border-radius: 5px;
  padding: 1px 6px;
  background: var(--surface-2);
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--soft-green);
  color: var(--excel-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.kpi-value {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--excel-green);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kpi-label { margin-top: 6px; font-size: 14px; color: var(--text-secondary); }

/* ------------------------------------------------------------
   10. About
------------------------------------------------------------ */
#about { position: relative; }

.about-body { max-width: 62ch; }
.about-body p { color: var(--text-secondary); font-size: 17px; }
.about-body p + p { margin-top: 12px; }

.about-cards {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.about-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 124, 65, 0.45);
}

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--soft-green);
  color: var(--excel-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.about-card h3 { font-size: 16.5px; font-weight: 700; }
.about-card p { margin: 8px 0 14px; font-size: 14px; color: var(--text-secondary); }

/* ------------------------------------------------------------
   11. Timeline / journey
------------------------------------------------------------ */
.timeline {
  position: relative;
  padding-left: 8px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  padding-left: 72px;
}

.tl-marker {
  position: absolute;
  left: 0px;
  top: 6px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--soft-green);
  color: var(--excel-green);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.tl-marker .icon { width: 19px; height: 19px; }

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tl-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 124, 65, 0.45);
}

.tl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.tl-period {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--excel-green);
  background: var(--soft-green);
  border-radius: 999px;
  padding: 4px 12px;
}
.tl-period .icon { width: 14px; height: 14px; }

.tl-logo {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--surface-2);
}

.tl-card h3 { font-size: 18px; font-weight: 700; }
.tl-sub { color: var(--text-secondary); font-size: 14.5px; margin-top: 2px; }

.tl-points { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.tl-points li { display: flex; gap: 9px; font-size: 14px; color: var(--text-secondary); }
.tl-points .li-icon { width: 16px; height: 16px; color: var(--excel-green); margin-top: 3px; }

.tl-education .tl-card { padding: 16px 22px; }
.tl-education h3 { font-size: 16px; }

.certs-title {
  margin-top: 36px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.certs-list { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; }
.cert-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--soft-gold);
  color: #7A5C15;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
}
[data-theme="dark"] .cert-chip { color: var(--gold-accent); }
.cert-chip .icon { width: 15px; height: 15px; }

/* ------------------------------------------------------------
   12. Projects
------------------------------------------------------------ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 124, 65, 0.45);
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.impact-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--excel-green);
  background: var(--soft-green);
  border-radius: 999px;
  padding: 5px 12px;
}
.impact-chip .icon { width: 15px; height: 15px; }
.impact-chip strong { font-weight: 800; }

.project-card h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.project-card p { font-size: 14.5px; color: var(--text-secondary); }

.wf-diagram {
  width: 100%;
  height: auto;
  margin-top: 6px;
}
.wf-box {
  fill: var(--soft-green);
  stroke: var(--excel-green);
  stroke-width: 1.5;
}
.wf-label {
  fill: var(--text-primary);
  font-size: 15px;
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 600;
}
.wf-arrow { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; fill: none; }
.wf-arrow-head { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }

.outcome-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.outcome-list li { display: flex; gap: 9px; font-size: 14px; color: var(--text-secondary); }
.outcome-list .li-icon { width: 16px; height: 16px; color: var(--excel-green); margin-top: 3px; }

/* ------------------------------------------------------------
   13. Toolkit & skills
------------------------------------------------------------ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 124, 65, 0.45);
}

.tool-icon {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 10px;
  background: var(--soft-green);
  color: var(--excel-green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-icon .icon { width: 22px; height: 22px; }

.tool-card h3 { font-size: 15.5px; font-weight: 700; }
.tool-card p { font-size: 13px; color: var(--text-secondary); }

.tools-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

.skills-title {
  margin-top: 40px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.skills-chips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 9px; }
.skill-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s;
}
.skill-chip:hover { border-color: var(--excel-green); color: var(--excel-green); }

/* ------------------------------------------------------------
   14. Achievements
------------------------------------------------------------ */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.award-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.award-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gold-accent), var(--excel-green));
}
.award-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(16, 124, 65, 0.45);
}

.award-trophy {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--soft-gold);
  color: var(--gold-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.award-trophy .icon { width: 24px; height: 24px; }

.award-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.award-head h3 { font-size: 18px; font-weight: 700; }

.award-date {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.award-date .icon { width: 14px; height: 14px; }

.award-card p { margin: 8px 0 16px; font-size: 14.5px; color: var(--text-secondary); }

/* ------------------------------------------------------------
   15. Contact
------------------------------------------------------------ */
.contact-section {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(215, 168, 75, 0.12), transparent 60%),
    linear-gradient(160deg, var(--deep-green), var(--dark-green));
  color: #F7F3EA;
}

.contact-body {
  margin-top: 18px;
  max-width: 52ch;
  color: rgba(247, 243, 234, 0.85);
  font-size: 17px;
}

.contact-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.contact-data {
  margin-top: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  color: rgba(247, 243, 234, 0.85);
}
.contact-data a { text-decoration: underline; text-underline-offset: 3px; }
.contact-data a:hover { color: #fff; }
.contact-sep { opacity: 0.6; }

.is-disabled { opacity: 0.55; cursor: not-allowed; }

/* ------------------------------------------------------------
   16. Workbook sheet tabs — fixed at the bottom, Excel style
------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--border); }

.sheet-tabs-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(16, 42, 42, 0.07);
}

.sheet-tabs-row { display: flex; align-items: flex-end; padding: 0 12px; }

.sheet-tabs {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  overflow-x: auto;
  padding: 6px 0 0;
  scrollbar-width: none;
}
.sheet-tabs::-webkit-scrollbar { display: none; }

/* Classic Excel sheet tab: rounded-top tab sitting on the bar;
   the active tab lifts off the bar in sheet-white with a green underline */
.sheet-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 8px 16px 9px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  position: relative;
  min-height: 40px;
  transition: color 0.2s, background-color 0.2s;
}
.sheet-tab:hover { color: var(--excel-green); background: var(--soft-green); }
.sheet-tab.active {
  color: var(--excel-green);
  font-weight: 700;
  background: var(--surface);
  border-color: var(--grid-line);
}
.sheet-tab.active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--excel-green);
}
.sheet-tab-add { color: var(--muted); }
.sheet-tab-add:hover { color: var(--excel-green); background: transparent; }
.plus-icon { width: 15px; height: 15px; }

/* Room for the fixed tab bar */
body { padding-bottom: 48px; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 0 22px;
  font-size: 13px;
  color: var(--muted);
}
.footer-note { font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }

/* ------------------------------------------------------------
   17. Mobile bottom nav
------------------------------------------------------------ */
.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
  justify-content: space-around;
}

.bottom-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 56px;
  min-height: 50px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: color 0.2s;
}
.bottom-link .icon { width: 21px; height: 21px; }
.bottom-link.active, .bottom-link:hover { color: var(--excel-green); }
.bottom-link.active { font-weight: 700; }

/* ------------------------------------------------------------
   18. Responsive
------------------------------------------------------------ */
/* Keep the sheet grid clear of the row rail on mid-wide screens */
@media (min-width: 1101px) and (max-width: 1330px) {
  main .container {
    width: min(1240px, 100% - 48px - var(--rail-w));
    margin-left: calc(var(--rail-w) + 24px);
    margin-right: 24px;
  }
}

@media (max-width: 1360px) {
  .ribbon-title { display: none; }
}

@media (max-width: 1024px) {
  .menu-toggle { display: inline-flex; }
  .about-cards { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  #profile-img { width: 170px; height: 170px; }
  .doodle-hero { right: 12px; top: -78px; }
}

@media (max-width: 860px) {
  .section-head { flex-direction: column; align-items: flex-start; }
  .projects-grid, .achievements-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .container { width: min(1240px, 100% - 32px); }

  /* Clean mobile ribbon: AG. | search | theme | CV | menu (tabs + nav live in the menu) */
  .ribbon { gap: 8px; }
  .ribbon-tabs { display: none; }
  .search-wrap.open .search-input { width: min(190px, 46vw); }

  /* Mobile keeps the icon bottom-nav instead of the sheet-tab bar */
  .sheet-tabs-bar { display: none; }
  body { padding-bottom: 66px; }
  .bottom-nav { display: flex; }
  .footer-bottom { padding-bottom: 28px; }

  /* Dedicated mobile hero order: eyebrow, name, description, photo+status, buttons.
     display:contents flattens .hero-content, so override the desktop 48px grid gap
     and the big desktop margins with a compact rhythm. */
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  .hero-content { display: contents; }
  .eyebrow { order: 1; font-size: 11.5px; letter-spacing: 0.16em; margin-bottom: 0; }
  .hero-content h1 { order: 2; font-size: clamp(29px, 8.4vw, 36px); line-height: 1.12; }
  .hero-desc { order: 3; margin-top: 0; font-size: 16px; max-width: 100%; }
  .hero-aside { order: 4; margin-top: 2px; }
  .hero-meta { order: 5; margin-top: 0; gap: 8px 18px; }
  .hero-meta li { font-size: 13.5px; }
  .hero-actions { order: 6; margin-top: 6px; gap: 12px; }
  .hero-actions .btn { flex: 1 1 auto; }

  /* Photo + status card side by side, chip anchored to the photo corner */
  .profile-wrap { flex-direction: row; align-items: center; gap: 14px; }
  #profile-img { width: 104px; height: 104px; border-radius: 14px; }
  .excel-chip { top: -8px; left: -8px; width: 26px; height: 26px; }
  .mini-chart { display: none; }
  .status-card { padding: 8px 12px; font-size: 12px; gap: 8px; }
  .status-card strong { font-size: 12px; }
  .status-card em { font-size: 11px; }
  /* Doodles stay visible on mobile — smaller, scattered, behind text */
  .doodle { opacity: 0.75; }
  .doodle-hero { width: 120px; top: -26px; right: 0; }
  .doodle-kpi { width: 120px; top: -6px; right: 0; }
  .doodle-about { width: 130px; top: -4px; right: 0; }
  .doodle-exp { width: 130px; top: -2px; left: 0; right: auto; }
  .doodle-projects { width: 120px; top: -2px; left: 45%; right: auto; }
  .doodle-skills { width: 120px; top: -2px; left: 45%; right: auto; }
  .doodle-ach { width: 110px; top: -4px; left: 0; right: auto; }
  .doodle-contact { width: 140px; top: 6px; right: 8px; }

  .section { padding: 36px 0; }
  main > .section:first-of-type { padding-top: 44px; }

  .about-cards { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-cell { padding: 16px 14px; }
  .kpi-value { font-size: 27px; }
  .kpi-icon { width: 34px; height: 34px; margin-bottom: 10px; }
  .tools-grid { grid-template-columns: 1fr; }
  .tl-item { padding-left: 60px; }
  .tl-marker { width: 38px; height: 38px; left: -6px; }
  .timeline::before { left: 20px; }
  .contact-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
  .hero-content h1 { font-size: 28px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .ribbon-brand { font-size: 17px; }
}

/* Very small screens (320px) */
@media (max-width: 340px) {
  .hero-content h1 { font-size: 26px; }
}

/* ------------------------------------------------------------
   19. Reduced motion
------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------
   20. Print-friendly tweaks
------------------------------------------------------------ */
@media print {
  .ribbon, .formula-bar, .bottom-nav, .col-strip, .row-rail,
  .doodle, .search-wrap, .theme-toggle, .menu-toggle, .sheet-tabs-bar { display: none !important; }
  body::before { display: none; }
  body { background: #fff; color: #111; }
}
