/* =============================================
   مجتبی معراجی — Portfolio & Resume
   Light Theme · Full Width · No Dependencies
   ============================================= */

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #152a4a;
  --navy-deep: #0c1d35;
  --navy-mid: #1e3d6b;
  --navy-soft: #2b5a94;
  --blue: #3b7ddd;
  --blue-light: #5b9ef5;
  --blue-pale: #e8f1fc;
  --blue-ghost: #f4f8fd;

  --white: #ffffff;
  --bg: #f8fafd;
  --bg-alt: #f0f5fb;
  --line: #dde7f3;
  --line-soft: #ecf2f9;

  --text: #1a2b42;
  --text-soft: #4a6080;
  --text-muted: #7a92ad;

  --gold: #c9952e;
  --gold-light: #f5e6c0;
  --success: #1a9e6a;

  --font: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  --header-offset: 16px;
  --header-h: 80px;
  --page-top: calc(var(--header-h) + var(--header-offset) + 12px);
  --container: 1040px;
  --container-narrow: 760px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-sm: 0 2px 12px rgba(21, 42, 74, 0.06);
  --shadow: 0 8px 32px rgba(21, 42, 74, 0.08);
  --shadow-lg: 0 20px 60px rgba(21, 42, 74, 0.12);
  --shadow-navy: 0 12px 40px rgba(30, 61, 107, 0.18);
  --ease: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--header-offset));
}

body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.link-gapyar {
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(59, 125, 221, 0.35);
  text-underline-offset: 3px;
  transition: color var(--ease);
}

.link-gapyar:hover { color: var(--navy-mid); }

.link-gapyar--plain {
  color: inherit;
  text-decoration: none;
}

.link-gapyar--plain:hover {
  color: var(--blue);
  text-decoration: underline;
}

.link-gapyar--light {
  color: var(--blue-light);
}

.link-gapyar--light:hover { color: var(--white); }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

.wrap--narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

.section {
  padding-block: clamp(72px, 10vw, 120px);
}

.section--alt { background: var(--white); }
.section--pale { background: var(--blue-ghost); }
.section--gradient {
  background: linear-gradient(180deg, var(--white) 0%, var(--blue-ghost) 100%);
}

.section-head {
  margin-bottom: clamp(40px, 6vw, 64px);
}

.section-head--center { text-align: center; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.section-eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--blue);
  border-radius: 2px;
}

.section-head--center .section-eyebrow::before { display: none; }

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.section-desc {
  margin-top: 14px;
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 640px;
}

.section-head--center .section-desc {
  margin-inline: auto;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--ease);
  white-space: nowrap;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  color: var(--white);
  box-shadow: var(--shadow-navy);
}

.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(30, 61, 107, 0.28);
}

.btn--secondary {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--navy-mid);
  padding: 10px 20px;
  border-radius: 10px;
}

.btn--ghost:hover { background: var(--blue-pale); }

.btn--lg { padding: 16px 40px; font-size: 1.02rem; }

/* ---- Header ---- */
.header {
  position: fixed;
  top: var(--header-offset);
  left: 12px;
  right: 12px;
  z-index: 1000;
  height: var(--header-h);
  transition: background var(--ease), box-shadow var(--ease), border-color var(--ease);
  border-bottom: 1px solid transparent;
  border-radius: 18px;
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(28px, 4vw, 48px);
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: var(--shadow-navy);
}

.brand__text { line-height: 1.3; }

.brand__name {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy);
}

.brand__role {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 1001;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all var(--ease);
}

.nav__toggle.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.is-active span:nth-child(2) { opacity: 0; }
.nav__toggle.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  padding: 10px 18px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 10px;
  transition: all var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--navy);
  background: var(--blue-pale);
}

.nav__cta {
  margin-inline-start: 8px;
  background: var(--navy);
  color: var(--white) !important;
  border-radius: 100px;
  padding: 10px 24px !important;
}

.nav__cta:hover {
  background: var(--navy-mid) !important;
  transform: translateY(-1px);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: var(--page-top);
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 80% 60% at 90% 10%, rgba(59, 125, 221, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 5% 90%, rgba(201, 149, 46, 0.06) 0%, transparent 55%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent);
  opacity: 0.6;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  padding-block: clamp(24px, 4vw, 72px);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero__badge strong { color: var(--navy); }

.hero__title {
  font-size: clamp(2.6rem, 6.5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.hero__title span {
  background: linear-gradient(135deg, var(--navy-mid), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__role {
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 500;
  color: var(--navy-soft);
  margin-bottom: 20px;
}

.hero__role em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}

.hero__text {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero__tag {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy-mid);
}

/* Photo frame */
.hero__photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__photo-frame {
  position: relative;
  width: 300px;
  max-width: 100%;
  margin-inline: auto;
  padding-block: 28px;
}

.hero__photo-frame .profile-banner__photo {
  display: block;
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  max-width: 100%;
}

.hero__float-card {
  position: absolute;
  z-index: 4;
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: 0 8px 32px rgba(21, 42, 74, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero__float-card .link-gapyar {
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
}

.hero__float-card .link-gapyar:hover {
  color: var(--blue);
  text-decoration: underline;
}

.hero__float-card--exp {
  bottom: 0;
  right: -28px;
  transform: translateY(60%);
}

.hero__float-card--ceo {
  top: 0;
  left: -28px;
  transform: translateY(-60%);
}

.hero__float-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--navy-mid);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hero__float-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.hero__float-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
}

/* ---- Motto ---- */
.motto {
  padding-block: clamp(56px, 8vw, 96px);
  background: var(--white);
  border-block: 1px solid var(--line-soft);
}

.motto__inner {
  text-align: center;
  max-width: 900px;
  margin-inline: auto;
}

.motto__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  color: var(--gold);
}

.motto__quote {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 16px;
}

.motto__quote mark {
  background: linear-gradient(180deg, transparent 60%, var(--gold-light) 60%);
  color: var(--navy-mid);
  padding-inline: 4px;
}

.motto__sub {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ---- Stats strip ---- */
.stats-strip {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding-block: 0;
}

.stats-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  padding: clamp(32px, 5vw, 48px) 24px;
  text-align: center;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.stat-item:first-child { border-inline-start: none; }

.stat-item__num {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--white);
}

.stat-item__num small {
  font-size: 0.55em;
  color: var(--blue-light);
}

.stat-item__label {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Cards & grids ---- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--blue-pale);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--blue-pale);
  color: var(--navy-mid);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  transition: all var(--ease);
}

.card:hover .card__icon {
  background: var(--navy);
  color: var(--white);
}

.card__icon svg { width: 26px; height: 26px; }

.card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.card__text {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.75;
}

.card__list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card__list li {
  font-size: 0.88rem;
  color: var(--text-soft);
  padding-inline-start: 18px;
  position: relative;
}

.card__list li::before {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

/* Bento spans */
.bento .span-4 { grid-column: span 4; }
.bento .span-6 { grid-column: span 6; }
.bento .span-8 { grid-column: span 8; }
.bento .span-12 { grid-column: span 12; }

.card--featured {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border: none;
  color: var(--white);
}

.card--featured .card__title { color: var(--white); }
.card--featured .card__text { color: rgba(255, 255, 255, 0.75); }
.card--featured .card__icon {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.card--featured:hover .card__icon {
  background: var(--white);
  color: var(--navy);
}

/* ---- Portfolio ---- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.project {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.project__visual {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.project__mock {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* CSS mockups */
.mock-browser {
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.mock-browser__bar {
  height: 28px;
  background: var(--line);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-inline: 12px;
  flex-shrink: 0;
}

.mock-browser__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-soft);
}

.mock-browser__dot:nth-child(1) { background: #ff6b6b; }
.mock-browser__dot:nth-child(2) { background: #ffd93d; }
.mock-browser__dot:nth-child(3) { background: #6bcb77; }

.mock-browser__body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-line {
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}

.mock-line--short { width: 60%; }
.mock-line--accent { background: var(--blue); width: 40%; }

.mock-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: auto;
}

.mock-block {
  height: 40px;
  border-radius: 6px;
  background: var(--blue-pale);
}

.mock-block:nth-child(2) { background: var(--navy); opacity: 0.15; }

.mock-crm {
  height: 100%;
  background: linear-gradient(160deg, #f0f5fb, #e8f1fc);
  padding: 20px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}

.mock-crm__side {
  background: var(--navy);
  border-radius: 8px;
  opacity: 0.9;
}

.mock-crm__main { display: flex; flex-direction: column; gap: 8px; }

.mock-app {
  height: 100%;
  background: linear-gradient(180deg, var(--navy-mid), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mock-phone {
  width: 55%;
  aspect-ratio: 9/16;
  background: var(--white);
  border-radius: 20px;
  padding: 12px 8px;
  box-shadow: var(--shadow-lg);
}

.mock-social {
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-social__post {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  height: 50px;
}

.mock-seo {
  height: 100%;
  background: var(--white);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mock-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
}

.mock-bar {
  width: 20px;
  border-radius: 4px 4px 0 0;
  background: var(--blue-pale);
}

.mock-bar:nth-child(1) { height: 40%; }
.mock-bar:nth-child(2) { height: 65%; background: var(--blue); }
.mock-bar:nth-child(3) { height: 50%; }
.mock-bar:nth-child(4) { height: 90%; background: var(--navy-mid); }
.mock-bar:nth-child(5) { height: 75%; }

.project__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 5px 12px;
  background: var(--white);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.project__body { padding: 24px; }

.project__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.project__desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 16px;
}

.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project__meta span {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--blue-ghost);
  color: var(--navy-mid);
  border-radius: 100px;
}

/* ---- Timeline ---- */
.timeline {
  position: relative;
  max-width: 800px;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 19px;
  width: 2px;
  background: linear-gradient(var(--blue), var(--line));
}

.timeline__item {
  position: relative;
  padding-inline-start: 56px;
  padding-bottom: 40px;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  right: 10px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--blue);
  box-shadow: 0 0 0 4px var(--blue-pale);
}

.timeline__item:first-child .timeline__dot {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 0 0 4px var(--blue-pale);
}

.timeline__card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--ease);
}

.timeline__card:hover {
  box-shadow: var(--shadow);
  border-color: var(--blue-pale);
}

.timeline__date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.timeline__role {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.timeline__org {
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
}

.timeline__text {
  font-size: 0.9rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* ---- Skills ---- */
.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.skill-block {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.skill-block__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--blue-pale);
}

.skill-bar {
  margin-bottom: 16px;
}

.skill-bar:last-child { margin-bottom: 0; }

.skill-bar__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.skill-bar__name { color: var(--text); font-weight: 500; }
.skill-bar__pct { color: var(--text-muted); }

.skill-bar__track {
  height: 8px;
  background: var(--blue-ghost);
  border-radius: 100px;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--navy-mid), var(--blue));
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-bar__fill.is-animated { width: var(--w); }

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tags li {
  padding: 8px 16px;
  background: var(--blue-ghost);
  border: 1px solid var(--line-soft);
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy-mid);
  transition: all var(--ease);
}

.skill-tags li:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ---- Resume page ---- */
.profile-banner {
  padding-top: var(--page-top);
  padding-bottom: 48px;
  background:
    radial-gradient(ellipse 70% 80% at 80% 0%, rgba(59, 125, 221, 0.07), transparent),
    linear-gradient(180deg, var(--white), var(--bg));
  border-bottom: 1px solid var(--line-soft);
}

.profile-banner__grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 40px;
  align-items: center;
}

.profile-banner__photo {
  width: 220px;
  height: 220px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  object-position: center center;
  border: 4px solid var(--white);
  outline: 2px solid var(--line);
  box-shadow: var(--shadow-lg);
  background: var(--blue-pale);
}

.profile-banner__name {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.profile-banner__headline {
  font-size: 1.15rem;
  color: var(--navy-soft);
  font-weight: 500;
  margin-bottom: 16px;
}

.profile-banner__headline strong { color: var(--gold); }

.profile-banner__summary {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 720px;
  margin-bottom: 20px;
}

.profile-banner__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy-mid);
}

.chip--gold {
  background: var(--gold-light);
  border-color: transparent;
  color: var(--navy);
}

.resume-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.info-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: calc(var(--header-h) + var(--header-offset) + 24px);
  box-shadow: var(--shadow-sm);
}

.info-panel__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.9rem;
}

.info-row:last-child { border-bottom: none; }
.info-row dt { color: var(--text-muted); }
.info-row dd { font-weight: 500; color: var(--navy); text-align: left; }

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.achievement {
  background: var(--blue-ghost);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.achievement__num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}

.achievement__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Contact ---- */
.contact-hero {
  padding-top: var(--page-top);
  padding-bottom: 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--white), var(--bg));
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

a.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--blue);
}

.contact-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--blue-pale);
  color: var(--navy-mid);
  display: grid;
  place-items: center;
}

.contact-card__icon svg { width: 26px; height: 26px; }

.contact-card__label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.contact-card__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}

.contact-cta {
  text-align: center;
  padding: 48px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  border-radius: var(--radius-xl);
  color: var(--white);
}

.contact-cta__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-cta__text {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 28px;
}

.contact-cta .btn--secondary {
  background: var(--white);
  border-color: var(--white);
}

/* ---- CTA band ---- */
.cta-band {
  padding-block: clamp(56px, 8vw, 80px);
  background: var(--white);
  border-top: 1px solid var(--line-soft);
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(32px, 5vw, 48px);
  background: linear-gradient(135deg, var(--blue-ghost), var(--white));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.cta-band__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.cta-band__text { color: var(--text-soft); font-size: 1rem; }

/* ---- Footer ---- */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.65);
  padding-block: 48px 32px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer__brand .brand__name { color: var(--white); }
.footer__brand .brand__role { color: rgba(255, 255, 255, 0.5); }

.footer__about {
  font-size: 0.9rem;
  line-height: 1.8;
  margin-top: 16px;
  max-width: 360px;
}

.footer__heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.footer__links { display: flex; flex-direction: column; gap: 10px; }

.footer__links a {
  font-size: 0.88rem;
  transition: color var(--ease);
}

.footer__links a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
}

.footer__top-btn {
  width: 40px;
  height: 40px;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  transition: all var(--ease);
}

.footer__top-btn:hover {
  background: var(--blue);
  color: var(--white);
}

/* ---- Marquee ---- */
.marquee {
  overflow: hidden;
  padding-block: 20px;
  background: var(--blue-ghost);
  border-block: 1px solid var(--line-soft);
}

.marquee__track {
  display: flex;
  gap: 40px;
  animation: marquee 30s linear infinite;
  width: max-content;
}

.marquee__item {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy-mid);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

.marquee__item::before {
  content: '◆';
  font-size: 0.5rem;
  color: var(--blue);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Page hero (inner pages) ---- */
.page-hero {
  padding-top: var(--page-top);
  padding-bottom: 48px;
  background: linear-gradient(180deg, var(--white), var(--bg));
  border-bottom: 1px solid var(--line-soft);
}

.page-hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.page-hero__desc {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 600px;
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .hero__deco { display: none; }
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__text { margin-inline: auto; }
  .hero__actions, .hero__tags { justify-content: center; }
  .hero__photo-wrap { order: -1; }
  .hero__float-card--exp { right: 10px; bottom: 0; transform: translateY(60%); }
  .hero__float-card--ceo { left: 10px; top: 0; transform: translateY(-60%); }
  .bento .span-4, .bento .span-6, .bento .span-8 { grid-column: span 6; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .resume-grid { grid-template-columns: 1fr; }
  .info-panel { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }

  .nav {
    justify-content: space-between;
    gap: 0;
  }

  .nav__menu {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 56px 24px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    transform: translateX(100%);
    transition: transform var(--ease);
    z-index: 1000;
  }

  .nav__menu.is-open { transform: translateX(0); }

  .nav__menu li {
    width: auto;
    max-width: 100%;
    text-align: center;
    margin-block: 4px;
  }

  .nav__link {
    display: inline-block;
    font-size: 1.05rem;
    padding: 10px 20px;
    border-radius: 12px;
    line-height: 1.4;
  }

  .nav__cta {
    margin-inline-start: 0;
    padding: 10px 28px !important;
  }

  @media (hover: none) {
    .nav__link:hover {
      color: var(--text-soft);
      background: transparent;
    }

    .nav__link.is-active {
      color: var(--navy);
      background: var(--blue-pale);
    }

    .nav__cta:hover {
      background: var(--navy) !important;
      transform: none;
    }
  }

  .hero {
    overflow: visible;
  }

  :root {
    --page-top: calc(var(--header-h) + var(--header-offset) + 8px);
  }

  .hero__grid {
    padding-block: clamp(12px, 3vw, 32px);
  }

  .hero__photo-frame {
    padding-block: 32px;
    margin-block: 8px;
  }

  .hero__float-card {
    padding: 10px 16px;
    gap: 10px;
  }

  .hero__float-icon {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  .hero__float-card--ceo {
    left: 8px;
    top: 0;
    transform: translateY(-65%);
  }

  .hero__float-card--exp {
    right: 8px;
    bottom: 0;
    transform: translateY(65%);
  }

  .stats-strip__grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(3) { border-inline-start: none; }

  .bento .span-4, .bento .span-6, .bento .span-8, .bento .span-12 { grid-column: span 12; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .skills-layout { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .profile-banner__grid { grid-template-columns: 1fr; text-align: center; }
  .profile-banner__photo { margin-inline: auto; }
  .profile-banner__chips { justify-content: center; }
  .achievement-grid { grid-template-columns: 1fr 1fr; }
  .cta-band__inner { flex-direction: column; text-align: center; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---- Hero decorations ---- */
.hero__deco {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.hero .wrap { position: relative; }

.hero__deco--1 { width: 90px; top: 8%; left: -10px; animation: float 6s ease-in-out infinite; }
.hero__deco--2 { width: 70px; bottom: 18%; left: 40px; animation: float 5s ease-in-out infinite 1s; }
.hero__deco--3 { width: 80px; top: 12%; right: -10px; animation: float 7s ease-in-out infinite 0.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero__icon-orbit {
  position: absolute;
  inset: -40px;
  z-index: 1;
  pointer-events: none;
}

.orbit-icon {
  position: absolute;
  width: 48px;
  height: 48px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  font-size: 1.3rem;
}

.orbit-icon--1 { top: 5%; right: -10px; }
.orbit-icon--2 { bottom: 25%; left: -20px; }
.orbit-icon--3 { top: 40%; right: -25px; }

/* ---- Light stats with icons ---- */
.stats-light {
  background: var(--white);
  border-block: 1px solid var(--line-soft);
}

.stats-light__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 32px);
  border-inline-start: 1px solid var(--line-soft);
}

.stat-box:first-child { border-inline-start: none; }

.stat-box__icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--blue-pale);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.stat-box__num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.stat-box__label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---- Service cards v2 with images ---- */
.services-v2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.svc {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.svc:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-pale);
}

.svc__visual {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--blue-ghost);
  border-bottom: 1px solid var(--line-soft);
}

.svc__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.svc:hover .svc__visual img { transform: scale(1.05); }

.svc__body { padding: 24px 28px 28px; }

.svc__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow-navy);
}

.svc__icon svg { width: 22px; height: 22px; }

.svc__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.svc__text {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.7;
}

.svc--wide {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.svc--wide .svc__visual { aspect-ratio: auto; min-height: 100%; }
.svc--wide .svc__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 36px;
}

.svc--wide .svc__icon { margin-top: 0; }

/* ---- Expertise strip ---- */
.expertise {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.exp-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all var(--ease);
}

.exp-item:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.exp-item__img {
  width: 64px;
  height: 48px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.exp-item__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-mid);
}

/* ---- Work cards (portfolio) ---- */
.portfolio-hero {
  padding-top: var(--page-top);
  padding-bottom: 0;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.portfolio-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-bottom: 48px;
}

.portfolio-hero__visual img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.portfolio-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 24px 0 48px;
}

.filter-btn {
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--white);
  border: 1px solid var(--line);
  transition: all var(--ease);
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.showcase {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}

.work {
  grid-column: span 4;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.work:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.work.is-hidden { display: none; }

.work--featured {
  grid-column: span 8;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
}

.work--featured .work__cover { aspect-ratio: auto; min-height: 100%; }

.work__cover {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--blue-ghost);
}

.work__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work:hover .work__cover img { transform: scale(1.04); }

.work__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 14px;
  background: var(--white);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.work__body { padding: 24px 28px 28px; }

.work--featured .work__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 36px;
}

.work__title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.4;
}

.work--featured .work__title { font-size: 1.35rem; }

.work__desc {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 16px;
}

.work__metrics {
  display: flex;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  margin-bottom: 16px;
}

.work__metric strong {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
}

.work__metric span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work__tags span {
  font-size: 0.75rem;
  padding: 5px 12px;
  background: var(--blue-ghost);
  color: var(--navy-mid);
  border-radius: 100px;
  font-weight: 500;
}

.work__more {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.88rem;
}

/* Home work preview */
.works-preview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}

.work-prev {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--ease);
  box-shadow: var(--shadow-sm);
}

.work-prev:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.work-prev--main { grid-row: span 2; }

.work-prev__img {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.work-prev--main .work-prev__img { aspect-ratio: 4/3; }

.work-prev__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-prev:hover .work-prev__img img { transform: scale(1.05); }

/* ---- Gapyar Plus ---- */
.gapyar-plus {
  padding-block: clamp(56px, 8vw, 80px);
  background: linear-gradient(135deg, var(--blue-ghost) 0%, var(--white) 50%, var(--gold-light) 100%);
  border-block: 1px solid var(--line-soft);
}

.gapyar-plus__card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: clamp(32px, 5vw, 48px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.gapyar-plus__eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 10px;
}

.gapyar-plus__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  line-height: 1.35;
}

.gapyar-plus__text {
  font-size: 1rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 560px;
}

.gapyar-plus__mark {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--navy-mid), var(--navy));
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-weight: 700;
  box-shadow: var(--shadow-navy);
  flex-shrink: 0;
}

a.work {
  color: inherit;
  display: block;
}

a.work:hover .work__title {
  color: var(--blue);
}

@media (max-width: 768px) {
  .gapyar-plus__card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .gapyar-plus__mark {
    margin-inline: auto;
  }

  .gapyar-plus__text {
    margin-inline: auto;
  }
}

.work-prev__info { padding: 20px 24px; }

.work-prev__tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.work-prev__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
}

.work-prev--main .work-prev__title { font-size: 1.2rem; }

/* Why section */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.why-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: all var(--ease);
}

.why-card:hover {
  border-color: var(--blue-pale);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.why-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: var(--blue-pale);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
}

.why-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.why-card__text {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.7;
}

@media (max-width: 1100px) {
  .services-v2 { grid-template-columns: repeat(2, 1fr); }
  .svc--wide { grid-column: span 2; grid-template-columns: 1fr; }
  .expertise { grid-template-columns: repeat(3, 1fr); }
  .portfolio-hero__grid { grid-template-columns: 1fr; }
  .work, .work--featured { grid-column: span 6; }
  .work--featured { grid-template-columns: 1fr; }
  .works-preview { grid-template-columns: 1fr 1fr; }
  .work-prev--main { grid-row: span 1; grid-column: span 2; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-light__grid { grid-template-columns: repeat(2, 1fr); }
  .stat-box:nth-child(3) { border-inline-start: none; }
}

@media (max-width: 768px) {
  .services-v2, .svc--wide { grid-template-columns: 1fr; }
  .svc--wide { grid-column: span 1; }
  .expertise { grid-template-columns: repeat(2, 1fr); }
  .work, .work--featured { grid-column: span 12; }
  .works-preview { grid-template-columns: 1fr; }
  .work-prev--main { grid-column: span 1; }
  .why-grid { grid-template-columns: 1fr; }
}

@media print {
  .header, .nav__toggle, .footer__top-btn, .hero__actions, .cta-band { display: none !important; }
  body { background: white; }
  .section { padding-block: 20px; }
  .card, .project, .timeline__card, .work { break-inside: avoid; box-shadow: none; }
}

/* ---- Elementor: preserve theme layout ---- */
.mm-main--elementor .elementor {
  width: 100%;
  max-width: 100%;
}

.mm-main--elementor .elementor-section {
  margin: 0;
}

.mm-main--elementor .elementor-container {
  max-width: none;
  padding: 0;
}

.mm-main--elementor .elementor-column-gap-default > .elementor-column > .elementor-element-populated {
  padding: 0;
}

.mm-main--elementor .elementor-widget-html .elementor-widget-container {
  margin: 0;
  padding: 0;
}

.mm-main--elementor .elementor-section > .elementor-background-overlay {
  pointer-events: none;
}


/* ---- Magazine ---- */
.mag {
  position: relative;
  padding-top: var(--page-top);
  padding-bottom: 110px;
  overflow: clip;
}

.mag__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 85% 0%, rgba(59, 125, 221, 0.12), transparent 60%),
    radial-gradient(700px 380px at 10% 20%, rgba(201, 149, 46, 0.08), transparent 55%),
    linear-gradient(180deg, var(--white) 0%, var(--bg) 42%, var(--bg) 100%);
  z-index: 0;
}

.mag__wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
}

.mag__header {
  max-width: 34rem;
  margin-bottom: 48px;
}

.mag__eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.mag__title {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.mag__lead {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.mag__layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.mag__rail {
  position: sticky;
  top: calc(var(--header-h) + var(--header-offset) + 12px);
}

.mag__rail-inner {
  padding: 4px 0;
}

.mag__rail-label {
  margin: 0 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.mag__cats {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mag__cat {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  text-align: start;
  color: var(--text-soft);
  transition: background var(--ease), color var(--ease), transform var(--ease);
}

.mag__cat:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
}

.mag__cat.is-active {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.mag__cat-name {
  font-size: 0.95rem;
  font-weight: 600;
}

.mag__cat-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 1.5rem;
  text-align: center;
}

.mag__cat.is-active .mag__cat-count {
  color: var(--blue);
}

.mag__masonry {
  column-count: 2;
  column-gap: 22px;
}

.mag-card {
  break-inside: avoid;
  margin: 0 0 22px;
  opacity: 0;
  transform: translateY(14px);
  animation: magIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--mag-delay, 0) * 70ms);
}

.mag-card.is-hidden {
  display: none;
}

@keyframes magIn {
  to {
    opacity: 1;
    transform: none;
  }
}

.mag-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(221, 231, 243, 0.8);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.mag-card__link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

.mag-card__media {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, var(--blue-ghost), var(--blue-pale));
}

.mag-card--wide .mag-card__media { aspect-ratio: 16 / 10; }
.mag-card--tall .mag-card__media { aspect-ratio: 4 / 5; }
.mag-card--square .mag-card__media { aspect-ratio: 1 / 1; }

.mag-card--hero {
  column-span: all;
  margin-bottom: 28px;
}

.mag-card--hero .mag-card__link {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  align-items: stretch;
}

.mag-card--hero .mag-card__media {
  aspect-ratio: auto;
  min-height: 320px;
  height: 100%;
}

.mag-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.mag-card__link:hover .mag-card__media img {
  transform: scale(1.05);
}

.mag-card__media--empty {
  background:
    radial-gradient(circle at 20% 25%, rgba(59, 125, 221, 0.28), transparent 42%),
    radial-gradient(circle at 80% 70%, rgba(201, 149, 46, 0.22), transparent 46%),
    linear-gradient(145deg, #e8f1fc, #f7fafc);
}

.mag-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(12, 29, 53, 0.08));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mag-card__link:hover .mag-card__shade {
  opacity: 1;
}

.mag-card__body {
  padding: 18px 18px 20px;
}

.mag-card--hero .mag-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 28px;
}

.mag-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mag-card__cat {
  color: var(--blue);
  font-weight: 600;
}

.mag-card__title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.55;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.mag-card--hero .mag-card__title {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.45;
  margin-bottom: 12px;
}

.mag-card__link:hover .mag-card__title {
  color: var(--navy-mid);
}

.mag-card__excerpt {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.85;
}

.mag__empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
}

.mag__empty.is-hidden,
.mag__empty[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .mag__layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .mag__rail {
    position: static;
  }

  .mag__cats {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .mag__cat {
    width: auto;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--line-soft);
  }

  .mag__cat.is-active {
    border-color: transparent;
  }

  .mag__rail-label {
    display: none;
  }
}

@media (max-width: 720px) {
  .mag__header {
    margin-bottom: 32px;
  }

  .mag__masonry {
    column-count: 1;
  }

  .mag-card--hero .mag-card__link {
    grid-template-columns: 1fr;
  }

  .mag-card--hero .mag-card__media {
    min-height: 220px;
    aspect-ratio: 16 / 10;
  }

  .mag-card--hero .mag-card__body {
    padding: 20px 18px 22px;
  }
}


/* ---- Magazine Article Template ---- */
body.mm-article-template {
  overflow-x: clip; /* keep sticky working (overflow-x:hidden breaks it) */
}

.mm-article-template {
  background: var(--bg);
}

.mm-article-template .wrap {
  max-width: 1280px;
}

.mm-article {
  padding-bottom: 80px;
}

.article-hero {
  padding-top: var(--page-top);
  padding-bottom: 28px;
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.article-hero__inner {
  max-width: 920px;
  margin-inline: auto;
  text-align: center;
}

.article-hero__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 18px;
}

.article-cat {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--blue-pale);
  color: var(--navy-mid);
  font-size: 0.8rem;
  font-weight: 600;
  transition: background var(--ease), color var(--ease);
}

.article-cat:hover {
  background: var(--navy);
  color: var(--white);
}

.article-hero__title {
  font-size: clamp(1.85rem, 3.4vw, 2.7rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.article-hero__excerpt {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.9;
  margin: 0 auto 28px;
  max-width: 48rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 28px;
  padding-top: 8px;
}

.article-meta__author,
.article-meta__item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: start;
}

.article-meta__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.article-meta__label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.article-meta__value {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
}

.article-cover {
  margin: 36px auto 0;
  max-width: 1100px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line-soft);
  background: var(--blue-ghost);
}

.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  margin-top: 48px;
  max-width: 1280px;
}

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

.article-toc {
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.article-toc__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.article-toc__list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.article-toc__list li {
  counter-increment: toc;
}

.article-toc__list a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
  transition: background var(--ease), color var(--ease);
}

.article-toc__list a::before {
  content: counter(toc, persian);
  flex-shrink: 0;
  width: 1.4em;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.article-toc__list a:hover,
.article-toc__list a.is-active {
  background: var(--blue-ghost);
  color: var(--navy);
}

.article-body {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 2;
}

.article-body > *:first-child {
  margin-top: 0;
}

.article-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.45;
  margin: 2.2em 0 0.7em;
  scroll-margin-top: calc(var(--header-h) + var(--header-offset) + 16px);
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-mid);
  margin: 1.6em 0 0.55em;
}

.article-body p {
  margin-bottom: 1.15em;
}

.article-body a {
  color: var(--blue);
  text-decoration: underline;
  text-decoration-color: rgba(59, 125, 221, 0.35);
  text-underline-offset: 3px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.2em;
  padding-inline-start: 1.3em;
}

.article-body li {
  margin-bottom: 0.45em;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: persian; }

.article-body img {
  border-radius: var(--radius);
  margin: 1.4em 0;
}

.article-body blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--blue);
  background: var(--blue-ghost);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--navy-mid);
}

.article-body .elementor {
  width: 100%;
}

.article-body .elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 100%;
}

.article-aside {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + var(--header-offset) + 12px);
  z-index: 5;
}

.article-cta {
  padding: 16px 14px 14px;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.article-cta__title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 12px;
}

.article-cta__notice {
  font-size: 0.8rem;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.article-cta__notice--ok {
  background: rgba(26, 158, 106, 0.1);
  color: var(--success);
}

.article-cta__notice--err {
  background: rgba(200, 60, 60, 0.08);
  color: #b33;
}

.article-cta__form {
  display: grid;
  gap: 8px;
}

.article-field {
  display: grid;
  gap: 4px;
}

.article-field span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.article-field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  padding: 9px 10px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.article-field input:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(59, 125, 221, 0.12);
  background: var(--white);
}

.article-cta__submit {
  margin-top: 2px;
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}

.article-cta__submit:hover {
  background: var(--navy-mid);
  transform: translateY(-1px);
}

@media (max-width: 960px) {
  .article-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-aside {
    order: -1;
    position: static;
  }
}

@media (max-width: 640px) {
  .article-meta {
    gap: 16px 20px;
  }

  .article-cover {
    border-radius: var(--radius-lg);
  }

  .article-cover img {
    aspect-ratio: 4 / 3;
  }
}
