/* ==========================================================================
   WE — Central Template System
   Farhad Asif · Portfolio
   --------------------------------------------------------------------------
   ONE source of truth. Everything below cascades from the tokens in :root.
   Change a token here (or via the live customizer panel) and the whole site
   — colours, icons, type, spacing, shapes — updates in one place.

   TABLE OF CONTENTS
   1.  Design tokens (:root)      <-- edit here to re-skin the whole site
   2.  Reset & base elements (h1..h6, p, a, ul, img ...)
   3.  Layout utilities (we-row, we-col__N, we-sec-space, we-container ...)
   4.  Buttons (we-btn)
   5.  App shell & sidebar
   6.  Navigation
   7.  Section headings
   8.  Components (services, resume timeline, portfolio, testimonials, contact)
   9.  Decorative geometry
   10. Customizer panel
   11. Responsive (tablet / mobile / wide)
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS  — the control room
   ========================================================================== */
:root {
  /* ---- Brand colours (the customizer writes to these four) ---- */
  --we-primary:   #0a6cab;   /* main brand blue                    */
  --we-accent:    #f7941e;   /* warm accent / orange               */
  --we-secondary: #18bfc9;   /* teal                               */
  --we-highlight: #e8443b;   /* red                                */

  /* ---- Colours derived from the brand (auto-recolour on change) ---- */
  --we-primary-dark:  color-mix(in srgb, var(--we-primary) 78%, #000);
  --we-primary-deep:  color-mix(in srgb, var(--we-primary) 60%, #000);
  --we-primary-soft:  color-mix(in srgb, var(--we-primary) 12%, #fff);
  --we-primary-tint:  color-mix(in srgb, var(--we-primary) 8%,  #fff);
  --we-accent-soft:   color-mix(in srgb, var(--we-accent)  14%, #fff);

  /* ---- Neutral / surface colours ---- */
  --we-bg:         #eef1f5;  /* page background            */
  --we-surface:    #ffffff;  /* cards                      */
  --we-surface-2:  #f4f6f9;  /* inset panels               */
  --we-heading:    #2b3a4b;  /* headings                   */
  --we-text:       #5c6b7a;  /* body copy                  */
  --we-muted:      #8a97a5;  /* meta / captions            */
  --we-line:       #e6eaef;  /* hairlines / borders        */
  --we-on-primary: #ffffff;  /* text on primary fills      */

  /* ---- Typography ---- */
  --we-font-body:    "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --we-font-heading: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --we-fs-root:      16px;   /* html base — scales the whole rem system */
  --we-fs-body:      1rem;
  --we-fs-small:     0.875rem;
  --we-lh-body:      1.7;
  --we-lh-heading:   1.25;
  --we-fw-body:      400;
  --we-fw-strong:    600;
  --we-fw-heading:   700;

  /* Heading scale (modular). Change --we-scale to resize all headings. */
  --we-scale: 1.28;
  --we-h6: calc(var(--we-fs-body) * 1);
  --we-h5: calc(var(--we-h6) * var(--we-scale));
  --we-h4: calc(var(--we-h5) * var(--we-scale));
  --we-h3: calc(var(--we-h4) * var(--we-scale));
  --we-h2: calc(var(--we-h3) * var(--we-scale));
  --we-h1: calc(var(--we-h2) * var(--we-scale));

  /* ---- Spacing scale ---- */
  --we-space:      8px;                       /* base unit */
  --we-gap:        24px;                      /* grid gutter */
  --we-sec-space:  56px;                      /* vertical rhythm between sections */
  --we-card-pad:   32px;                      /* inner card padding */
  --we-container:  1120px;                    /* main content max-width */
  --we-sidebar-w:  300px;                     /* profile sidebar width */

  /* ---- Shape ---- */
  --we-radius:     18px;                      /* cards / panels */
  --we-radius-sm:  10px;                      /* buttons / small */
  --we-radius-pill: 40px;                     /* nav / pills */

  /* ---- Elevation ---- */
  --we-shadow:     0 18px 40px -24px rgba(20, 40, 70, 0.35);
  --we-shadow-sm:  0 8px 20px -14px rgba(20, 40, 70, 0.4);

  /* ---- Motion ---- */
  --we-ease: cubic-bezier(.4, 0, .2, 1);
  --we-dur:  .35s;
}

/* ==========================================================================
   2. RESET & BASE ELEMENTS   (default tags keep their names, styled globally)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: var(--we-fs-root); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--we-font-body);
  font-size: var(--we-fs-body);
  font-weight: var(--we-fw-body);
  line-height: var(--we-lh-body);
  color: var(--we-text);
  background: var(--we-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .6em;
  font-family: var(--we-font-heading);
  font-weight: var(--we-fw-heading);
  line-height: var(--we-lh-heading);
  color: var(--we-heading);
}
h1 { font-size: var(--we-h1); }
h2 { font-size: var(--we-h2); }
h3 { font-size: var(--we-h3); }
h4 { font-size: var(--we-h4); }
h5 { font-size: var(--we-h5); }
h6 { font-size: var(--we-h6); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--we-primary);
  text-decoration: none;
  transition: color var(--we-dur) var(--we-ease);
}
a:hover { color: var(--we-primary-dark); }

strong, b { font-weight: var(--we-fw-heading); color: var(--we-heading); }

ul, ol { margin: 0 0 1rem; padding-left: 1.15rem; }
li { margin-bottom: .4rem; }

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

hr { border: 0; height: 1px; background: var(--we-line); margin: var(--we-gap) 0; }

::selection { background: var(--we-primary); color: var(--we-on-primary); }

/* Inline SVG icons inherit text colour by default -> recolour with theme */
.we-ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; fill: currentColor; flex: none; }

/* ==========================================================================
   3. LAYOUT UTILITIES
   ========================================================================== */
.we-container { width: 100%; max-width: var(--we-container); margin-inline: auto; padding-inline: var(--we-gap); }

.we-sec-space   { padding-block: var(--we-sec-space); }
.we-sec-space--t{ padding-top: var(--we-sec-space); }
.we-sec-space--b{ padding-bottom: var(--we-sec-space); }
.we-mt          { margin-top: var(--we-sec-space); }

/* Flex row + responsive 12-col children (we-col__1 .. we-col__12) */
.we-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--we-gap);
}
.we-row--tight { gap: calc(var(--we-gap) / 2); }
.we-row--middle { align-items: center; }

[class*="we-col__"] { flex: 1 1 100%; min-width: 0; }

.we-col__1  { flex-basis: calc((100% / 12) * 1  - var(--we-gap)); }
.we-col__2  { flex-basis: calc((100% / 12) * 2  - var(--we-gap)); }
.we-col__3  { flex-basis: calc((100% / 12) * 3  - var(--we-gap)); }
.we-col__4  { flex-basis: calc((100% / 12) * 4  - var(--we-gap)); }
.we-col__5  { flex-basis: calc((100% / 12) * 5  - var(--we-gap)); }
.we-col__6  { flex-basis: calc((100% / 12) * 6  - var(--we-gap)); }
.we-col__7  { flex-basis: calc((100% / 12) * 7  - var(--we-gap)); }
.we-col__8  { flex-basis: calc((100% / 12) * 8  - var(--we-gap)); }
.we-col__9  { flex-basis: calc((100% / 12) * 9  - var(--we-gap)); }
.we-col__10 { flex-basis: calc((100% / 12) * 10 - var(--we-gap)); }
.we-col__11 { flex-basis: calc((100% / 12) * 11 - var(--we-gap)); }
.we-col__12 { flex-basis: 100%; }

.we-card {
  background: var(--we-surface);
  border-radius: var(--we-radius);
  padding: var(--we-card-pad);
  box-shadow: var(--we-shadow);
}
.we-card--flat { box-shadow: none; border: 1px solid var(--we-line); }
.we-card--inset { background: var(--we-surface-2); box-shadow: none; }

.we-text-center { text-align: center; }
.we-muted { color: var(--we-muted); }
.we-hidden { display: none !important; }

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.we-btn {
  --_bg: var(--we-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--we-font-heading);
  font-weight: var(--we-fw-strong);
  font-size: var(--we-fs-body);
  line-height: 1;
  padding: .95em 1.6em;
  color: var(--we-on-primary);
  background: var(--_bg);
  border: 2px solid var(--_bg);
  border-radius: var(--we-radius-sm);
  cursor: pointer;
  transition: transform var(--we-dur) var(--we-ease),
              background var(--we-dur) var(--we-ease),
              box-shadow var(--we-dur) var(--we-ease);
  box-shadow: var(--we-shadow-sm);
}
.we-btn:hover { background: var(--we-primary-dark); border-color: var(--we-primary-dark); color: var(--we-on-primary); transform: translateY(-2px); }
.we-btn--block { display: flex; width: 100%; }
.we-btn--accent { --_bg: var(--we-accent); }
.we-btn--ghost {
  background: transparent; color: var(--we-primary);
  border-color: color-mix(in srgb, var(--we-primary) 30%, transparent);
  box-shadow: none;
}
.we-btn--ghost:hover { background: var(--we-primary-soft); color: var(--we-primary-dark); }

/* ==========================================================================
   5. APP SHELL & SIDEBAR
   ========================================================================== */
.we-app {
  position: relative;
  display: grid;
  grid-template-columns: var(--we-sidebar-w) minmax(0, 1fr);
  gap: var(--we-gap);
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(20px, 3vw, 48px);
  align-items: start;
}

.we-sidebar {
  position: sticky;
  top: clamp(20px, 3vw, 48px);
  background: var(--we-surface);
  border-radius: var(--we-radius);
  padding: 0 24px 26px;
  box-shadow: var(--we-shadow);
  text-align: center;
}
.we-sidebar__photo {
  width: 148px; height: 148px;
  margin: -34px auto 18px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--we-surface-2);
  box-shadow: 0 12px 26px -14px rgba(20,40,70,.5);
  border: 5px solid var(--we-surface);
}
.we-sidebar__photo img { width: 100%; height: 100%; object-fit: cover; }
.we-sidebar__name { font-size: var(--we-h4); margin-bottom: 10px; letter-spacing: .3px; }
.we-sidebar__name span { font-weight: 400; }
.we-sidebar__role {
  display: inline-block;
  font-size: var(--we-fs-small);
  color: var(--we-heading);
  background: var(--we-surface-2);
  border-radius: var(--we-radius-pill);
  padding: 7px 16px;
  margin-bottom: 18px;
}
.we-socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.we-socials a { color: var(--we-heading); font-size: 1.05rem; transition: color var(--we-dur) var(--we-ease), transform var(--we-dur) var(--we-ease); }
.we-socials a:hover { color: var(--we-primary); transform: translateY(-2px); }

.we-facts { list-style: none; margin: 0 0 22px; padding: 18px 0; border-top: 1px solid var(--we-line); border-bottom: 1px solid var(--we-line); text-align: left; }
.we-facts li { display: flex; align-items: center; gap: 12px; margin: 0; padding: 7px 4px; color: var(--we-text); font-size: var(--we-fs-small); }
.we-facts .we-ic { color: var(--we-primary); font-size: 1.05rem; }

/* ==========================================================================
   6. NAVIGATION
   ========================================================================== */
.we-main { min-width: 0; }

.we-nav {
  position: sticky;
  top: clamp(20px, 3vw, 48px);
  z-index: 20;
  display: flex;
  justify-content: center;
  gap: 6px;
  background: var(--we-primary);
  border-radius: var(--we-radius-pill);
  padding: 12px;
  box-shadow: 0 20px 40px -26px var(--we-primary-deep);
  margin-bottom: var(--we-gap);
}
.we-nav a {
  color: color-mix(in srgb, var(--we-on-primary) 78%, transparent);
  font-family: var(--we-font-heading);
  font-weight: var(--we-fw-strong);
  font-size: var(--we-fs-small);
  padding: 10px 22px;
  border-radius: var(--we-radius-pill);
  transition: background var(--we-dur) var(--we-ease), color var(--we-dur) var(--we-ease);
}
.we-nav a:hover { color: var(--we-on-primary); }
.we-nav a.is-active { background: color-mix(in srgb, #fff 22%, transparent); color: var(--we-on-primary); }

.we-nav__toggle { display: none; }

.we-nav { transition: transform var(--we-dur) var(--we-ease), top var(--we-dur) var(--we-ease); will-change: transform; }
.we-nav--stuck  { top: 0; }               /* flush to top once scrolled — no gap, no peek */
.we-nav--hidden { transform: translateY(-150%); }

/* ==========================================================================
   7. SECTION HEADINGS
   ========================================================================== */
.we-panel {
  background: var(--we-surface);
  border-radius: var(--we-radius);
  padding: clamp(24px, 4vw, 46px);
  box-shadow: var(--we-shadow);
}
.we-view { animation: we-fade var(--we-dur) var(--we-ease); }
@keyframes we-fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.we-title { position: relative; margin-bottom: 26px; }
.we-title::after {
  content: ""; display: block; width: 54px; height: 4px; margin-top: 12px; border-radius: 4px;
  background: linear-gradient(90deg, var(--we-primary) 55%, var(--we-accent) 55%);
}
.we-title--sm { font-size: var(--we-h4); }

/* small icon+heading rows used on resume */
.we-headrow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.we-headrow .we-ic { font-size: 1.5rem; color: var(--we-primary); }
.we-headrow h3 { margin: 0; }

/* ==========================================================================
   8. COMPONENTS
   ========================================================================== */

/* --- Services --- */
.we-service .we-ic--big {
  font-size: 2.1rem; color: var(--we-primary); margin-bottom: 16px;
}
.we-service h3 { margin-bottom: 14px; font-size: var(--we-h5); }
.we-service ul { list-style: none; padding: 0; }
.we-service li { position: relative; padding-left: 20px; color: var(--we-text); }
.we-service li::before {
  content: ""; position: absolute; left: 0; top: .6em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--we-accent);
}

/* --- Resume timeline --- */
.we-timeline { list-style: none; margin: 0; padding: 0 0 0 6px; }
.we-timeline > li { position: relative; padding: 0 0 26px 26px; border-left: 2px solid var(--we-line); }
.we-timeline > li:last-child { padding-bottom: 0; }
.we-timeline > li::before {
  content: ""; position: absolute; left: -8px; top: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--we-surface); border: 3px solid var(--we-primary);
}
.we-timeline h4 { margin: 0 0 4px; font-size: var(--we-h6); }
.we-timeline .we-meta { display: block; color: var(--we-accent); font-size: var(--we-fs-small); font-weight: var(--we-fw-strong); margin-bottom: 10px; }
.we-timeline ul { list-style: none; padding: 0; margin: 0; }
.we-timeline ul li { position: relative; padding-left: 18px; font-size: var(--we-fs-small); }
.we-timeline ul li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 6px; border-radius: 2px; background: var(--we-secondary); }

/* --- Skills columns --- */
.we-skills h4 { font-size: var(--we-h5); margin-bottom: 16px; }
.we-skills ul { list-style: none; padding: 0; }
.we-skills li { display: flex; align-items: center; gap: 10px; color: var(--we-text); }
.we-skills li .we-ic { color: var(--we-secondary); font-size: .95rem; }

/* --- Portfolio --- */
.we-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; border-bottom: 1px solid var(--we-line); padding-bottom: 14px; }
.we-filter button {
  font-family: var(--we-font-heading); font-weight: var(--we-fw-strong); font-size: var(--we-fs-small);
  color: var(--we-muted); background: none; border: 0; cursor: pointer; padding: 8px 12px; border-radius: var(--we-radius-sm);
  transition: color var(--we-dur) var(--we-ease), background var(--we-dur) var(--we-ease);
}
.we-filter button:hover { color: var(--we-primary); }
.we-filter button.is-active { color: var(--we-primary); background: var(--we-primary-soft); }

.we-portfolio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--we-gap); }
.we-work { border-radius: var(--we-radius-sm); overflow: hidden; background: var(--we-surface-2); box-shadow: var(--we-shadow-sm); transition: transform var(--we-dur) var(--we-ease); }
.we-work:hover { transform: translateY(-4px); }
.we-work__thumb { aspect-ratio: 16 / 11; position: relative; display: grid; place-items: center; color: #fff; font-weight: var(--we-fw-heading); font-size: var(--we-h4); }
.we-work__thumb .we-ic { font-size: 2.4rem; opacity: .92; }
.we-work__body { padding: 16px 18px 20px; }
.we-work__body h4 { margin: 0 0 4px; font-size: var(--we-h6); }
.we-work__body span { font-size: var(--we-fs-small); color: var(--we-muted); }

/* --- Testimonials --- */
.we-quotes { position: relative; overflow: hidden; }
.we-quotes__track { display: flex; transition: transform .5s var(--we-ease); }
.we-quote { flex: 0 0 100%; padding: 4px; }
@media (min-width: 720px) { .we-quote { flex-basis: 50%; } }
.we-quote__card { position: relative; background: var(--we-surface-2); border-radius: var(--we-radius); padding: 28px; height: 100%; }
.we-quote__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.we-quote__ava { width: 58px; height: 58px; border-radius: 14px; overflow: hidden; background: var(--we-primary-soft); display: grid; place-items: center; color: var(--we-primary); font-weight: 700; font-size: var(--we-h5); }
.we-quote__ava img { width: 100%; height: 100%; object-fit: cover; }
.we-quote h4 { margin: 0; font-size: var(--we-h6); }
.we-quote__mark { position: absolute; top: 22px; right: 24px; font-size: 2.4rem; line-height: 1; color: var(--we-primary); font-family: Georgia, serif; }
.we-quote p { font-size: var(--we-fs-small); }
.we-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.we-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--we-line); cursor: pointer; padding: 0; transition: background var(--we-dur), width var(--we-dur); }
.we-dots button.is-active { background: var(--we-primary); width: 26px; border-radius: 6px; }

/* --- Contact --- */
.we-contact { list-style: none; padding: 0; margin: 0; }
.we-contact li { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.we-contact li .we-ic { color: var(--we-primary); font-size: 1.25rem; width: 1.4em; }
.we-contact a { color: var(--we-text); }
.we-contact a:hover { color: var(--we-primary); }

/* --- Footer --- */
.we-foot { text-align: center; color: var(--we-muted); font-size: var(--we-fs-small); padding: 26px 0 4px; letter-spacing: .5px; }

/* ==========================================================================
   9. DECORATIVE GEOMETRY  (recolours with theme)
   ========================================================================== */
.we-deco { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.we-deco i { position: absolute; display: block; }
.we-tri { width: 0; height: 0; }
.we-deco .t1 { top: -30px; left: -10px; border-left: 130px solid transparent; border-top: 150px solid var(--we-highlight); opacity: .9; }
.we-deco .t2 { top: 40px; left: 120px; border-right: 90px solid transparent; border-top: 110px solid var(--we-accent); }
.we-deco .t3 { top: 0; left: 60px; width: 70px; height: 70px; background: var(--we-secondary); transform: rotate(18deg); opacity: .85; }
.we-deco .t4 { bottom: -20px; right: -10px; border-right: 120px solid transparent; border-bottom: 150px solid var(--we-secondary); }
.we-deco .t5 { bottom: 30px; right: 90px; border-left: 80px solid transparent; border-bottom: 100px solid var(--we-highlight); opacity: .85; }
.we-deco .t6 { bottom: 90px; right: 20px; width: 54px; height: 54px; background: var(--we-accent); transform: rotate(24deg); }
.we-deco .t7 { top: 45%; right: -18px; border-top: 60px solid transparent; border-bottom: 60px solid transparent; border-right: 70px solid var(--we-secondary); opacity: .5; }

/* ==========================================================================
   10. CUSTOMIZER PANEL
   ========================================================================== */
.we-cz__toggle {
  position: fixed; top: 50%; left: 0; transform: translateY(-50%); z-index: 60;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--we-primary); color: #fff; border: 0; cursor: pointer;
  border-radius: 0 var(--we-radius-sm) var(--we-radius-sm) 0;
  box-shadow: var(--we-shadow-sm);
}
.we-cz__toggle .we-ic { font-size: 1.4rem; animation: we-spin 6s linear infinite; }
@keyframes we-spin { to { transform: rotate(360deg); } }

.we-cz {
  position: fixed; top: 0; left: 0; z-index: 65; height: 100vh; width: 320px;
  max-width: 88vw; background: var(--we-surface); box-shadow: 12px 0 40px -18px rgba(20,40,70,.5);
  transform: translateX(-102%); transition: transform var(--we-dur) var(--we-ease);
  display: flex; flex-direction: column;
}
.we-cz.is-open { transform: none; }
.we-cz__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--we-line); }
.we-cz__head h3 { margin: 0; font-size: var(--we-h5); }
.we-cz__close { background: none; border: 0; font-size: 1.4rem; line-height: 1; color: var(--we-muted); cursor: pointer; }
.we-cz__body { padding: 22px; overflow-y: auto; }
.we-cz__group { margin-bottom: 26px; }
.we-cz__group > label { display: block; font-family: var(--we-font-heading); font-weight: var(--we-fw-strong); font-size: var(--we-fs-small); color: var(--we-heading); margin-bottom: 10px; }
.we-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.we-swatches button { width: 30px; height: 30px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--we-line); cursor: pointer; transition: transform .2s var(--we-ease); }
.we-swatches button:hover { transform: scale(1.12); }
.we-swatches button.is-active { box-shadow: 0 0 0 2px var(--we-primary); }
.we-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: var(--we-fs-small); }
.we-field label { color: var(--we-text); }
.we-field input[type="color"] { width: 42px; height: 30px; border: 1px solid var(--we-line); border-radius: 6px; background: none; cursor: pointer; padding: 2px; }
.we-field input[type="range"] { width: 130px; accent-color: var(--we-primary); }
.we-field select { border: 1px solid var(--we-line); border-radius: 6px; padding: 6px 8px; font: inherit; font-size: var(--we-fs-small); color: var(--we-heading); background: var(--we-surface); }
.we-field output { min-width: 46px; text-align: right; color: var(--we-muted); font-variant-numeric: tabular-nums; }
.we-cz__reset { margin-top: 6px; }
.we-cz__hint { font-size: 12px; color: var(--we-muted); line-height: 1.5; margin-top: 18px; }

/* ==========================================================================
   11. RESPONSIVE
   ========================================================================== */

/* Wide monitors — give the shell more room, keep content readable */
@media (min-width: 1600px) {
  :root { --we-container: 1240px; --we-sidebar-w: 330px; }
  .we-app { max-width: 1640px; }
}

/* Tablet */
@media (max-width: 1024px) {
  :root { --we-sec-space: 44px; --we-card-pad: 26px; }
  .we-app { grid-template-columns: 1fr; }
  .we-sidebar { position: static; display: grid; grid-template-columns: 148px 1fr; align-items: center; gap: 24px; text-align: left; padding: 24px; }
  .we-sidebar__photo { margin: 0; }
  .we-sidebar__meta { text-align: left; }
  .we-socials { justify-content: flex-start; }
  .we-facts { border: 0; padding: 0; margin-bottom: 14px; }
  .we-sidebar__dl { grid-column: 1 / -1; }
  .we-nav { position: static; }
  .we-portfolio { grid-template-columns: repeat(2, 1fr); }
  .we-col__4, .we-col__6 { flex-basis: calc(50% - var(--we-gap)); }
  .we-col__3 { flex-basis: calc(50% - var(--we-gap)); }
}

/* Mobile */
@media (max-width: 680px) {
  :root { --we-fs-root: 15px; --we-gap: 18px; --we-sec-space: 34px; --we-card-pad: 22px; --we-scale: 1.22; }
  .we-app { padding: 14px; }
  .we-sidebar { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .we-sidebar__meta { text-align: center; }
  .we-socials, .we-facts li { justify-content: center; }
  .we-facts { text-align: center; }

  /* Collapsible nav */
  .we-nav { flex-direction: column; align-items: stretch; gap: 4px; border-radius: var(--we-radius); }
  .we-nav.is-collapsed a:not(.we-nav__toggle) { display: none; }
  .we-nav a { text-align: center; }
  .we-nav__toggle { display: flex; align-items: center; justify-content: center; gap: 8px; }
  .we-nav.is-collapsed .we-nav__toggle { background: color-mix(in srgb, #fff 12%, transparent); }

  .we-portfolio { grid-template-columns: 1fr; }
  [class*="we-col__"] { flex-basis: 100% !important; }
  .we-quote { flex-basis: 100%; }
}

/* Motion-reduction */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
