/* ============================================================
   Umesh Ghimire — PHP & WordPress Developer in Nepal
   Single stylesheet for the whole multi-page portfolio.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-elev: #ffffff;
  --fg: #0b1020;
  --fg-soft: #4a5169;
  --fg-mute: #6b7185;
  --border: #e6e8f0;
  --border-strong: #d6d9e6;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #dbeafe;
  --accent: #06b6d4;
  --grad: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --shadow-sm: 0 1px 2px rgba(11, 16, 32, .06), 0 1px 3px rgba(11, 16, 32, .04);
  --shadow-md: 0 8px 24px rgba(11, 16, 32, .08);
  --shadow-lg: 0 20px 50px rgba(11, 16, 32, .12);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --container: 1180px;
  --maxw: min(var(--container), 92vw);
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  --bg: #0b1020;
  --bg-soft: #0f1530;
  --bg-elev: #131a35;
  --fg: #eef1ff;
  --fg-soft: #b8bfd8;
  --fg-mute: #8b91ad;
  --border: #1f2748;
  --border-strong: #2a3358;
  --brand: #6ea8ff;
  --brand-strong: #93b8ff;
  --brand-soft: #1a2348;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow-md: 0 12px 28px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-strong); }
ul { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--fg-soft); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }

.container { width: var(--maxw); margin: 0 auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  padding: .75rem 1rem; background: var(--brand); color: #fff; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; outline: 3px solid var(--brand-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.2rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { color: #fff; box-shadow: var(--shadow-lg); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--fg); }
.btn--full { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; gap: 1rem; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--fg); white-space: nowrap; flex-shrink: 0; }
.brand:hover { color: var(--fg); }
.brand__text { font-size: 1rem; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--grad); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .85rem; letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
  overflow: hidden; flex-shrink: 0;
  border: 1.5px solid color-mix(in srgb, var(--brand) 30%, transparent);
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav__links { display: flex; gap: 1.5rem; align-items: center; }
.nav__links a { color: var(--fg-soft); font-weight: 500; font-size: .95rem; position: relative; white-space: nowrap; padding: .25rem 0; }
.nav__links a:hover { color: var(--fg); }
.nav__links a.active { color: var(--fg); }
.nav__links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.4rem;
  height: 2px; background: var(--grad); border-radius: 2px;
}
.nav__actions { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

/* Mid-size tablets / small laptops — tighten gaps */
@media (max-width: 1100px) {
  .nav__links { gap: 1.1rem; }
  .nav__links a { font-size: .9rem; }
  .brand__text { display: none; }
}

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--fg-soft); cursor: pointer;
  display: grid; place-items: center;
}
.theme-toggle:hover { color: var(--fg); border-color: var(--border-strong); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon--moon { display: none; }
[data-theme="dark"] .theme-toggle .icon--sun { display: none; }
[data-theme="dark"] .theme-toggle .icon--moon { display: block; }

.nav__menu {
  display: none; width: 40px; height: 40px; padding: 0;
  background: transparent; border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; align-items: center; justify-content: center; flex-direction: column;
}
.nav__menu:hover { border-color: var(--border-strong); background: var(--bg-elev); }
.nav__menu span { display: block; width: 20px; height: 2px; background: var(--fg); margin: 2.5px 0; transition: transform .2s, opacity .2s; border-radius: 2px; }
.nav.is-open .nav__menu span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__menu span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__menu span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile + small tablet: collapse menu */
@media (max-width: 900px) {
  .nav__cta { display: none; }
  .brand__text { display: inline; font-size: .98rem; }
  .nav__menu { display: flex; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column; align-items: stretch;
    padding: .5rem 0;
    gap: 0;
    display: none;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
  .nav__links a {
    padding: .9rem 5vw;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__links a.active { background: color-mix(in srgb, var(--brand) 8%, transparent); }
  .nav__links a.active::after { display: none; }
  .nav.is-open .nav__links { display: flex; }
}

/* Very small phones (<= 380px) */
@media (max-width: 380px) {
  .nav__inner { gap: .5rem; }
  .brand__text { display: none; }
  .theme-toggle { width: 36px; height: 36px; }
  .nav__menu { width: 38px; height: 38px; }
}

/* ---------- Page header / hero ---------- */
.page-hero {
  position: relative;
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 100% 0%, color-mix(in srgb, var(--brand) 14%, transparent) 0%, transparent 60%),
    radial-gradient(60% 70% at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero .breadcrumbs { margin-bottom: 1rem; color: var(--fg-mute); font-size: .85rem; }
.page-hero .breadcrumbs a { color: var(--fg-mute); }
.page-hero .breadcrumbs a:hover { color: var(--fg); }
.page-hero .breadcrumbs span[aria-current] { color: var(--fg-soft); }
.page-hero .lede { font-size: 1.1rem; color: var(--fg-soft); max-width: 64ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-soft); padding: .35rem .75rem;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 999px; margin-bottom: 1rem;
}
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .15); }

.kicker { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .5rem; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Home hero (specific) ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(50% 60% at 80% 10%, color-mix(in srgb, var(--brand) 18%, transparent) 0%, transparent 60%),
    radial-gradient(50% 60% at 10% 90%, color-mix(in srgb, var(--accent) 18%, transparent) 0%, transparent 60%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 4vw, 4rem); align-items: center;
}
.hero__title { margin-bottom: 1rem; }
.hero__lede { font-size: 1.15rem; color: var(--fg-soft); max-width: 52ch; }
.hero__cta { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.4rem 0 1.6rem; }
.hero__trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; padding: 1rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.hero__trust li { text-align: center; }
.hero__trust strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--fg); }
.hero__trust span { font-size: .8rem; color: var(--fg-mute); }

/* ---------- Profile card (replaces code block in hero) ---------- */
.profile-card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 1.6rem; display: grid; gap: 1.1rem;
  position: relative; overflow: hidden;
}
.profile-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 50% at 50% 0%, color-mix(in srgb, var(--brand) 12%, transparent) 0%, transparent 70%);
}
.profile-card > * { position: relative; }
.profile-card__header { display: flex; align-items: center; gap: 1rem; }
.profile-card__avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; letter-spacing: -.02em;
  box-shadow: var(--shadow-md);
  overflow: hidden; flex-shrink: 0;
  border: 2px solid color-mix(in srgb, var(--brand) 35%, transparent);
}
.profile-card__avatar img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.profile-card__name { font-size: 1.05rem; font-weight: 700; color: var(--fg); }
.profile-card__role { font-size: .9rem; color: var(--fg-soft); }
.profile-card__status {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; color: #047857; font-weight: 600;
  padding: .25rem .6rem; border-radius: 999px;
  background: color-mix(in srgb, #10b981 15%, transparent);
}
[data-theme="dark"] .profile-card__status { color: #6ee7b7; }
.profile-card__status .dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.profile-card__row {
  display: grid; grid-template-columns: auto 1fr; gap: .35rem .85rem;
  font-size: .9rem;
}
.profile-card__row dt { color: var(--fg-mute); font-weight: 500; }
.profile-card__row dd { margin: 0; color: var(--fg); font-weight: 500; }
.profile-card__chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.profile-card__chips li {
  font-size: .76rem; padding: .2rem .55rem; border-radius: 999px;
  background: var(--bg-soft); border: 1px solid var(--border-strong); color: var(--fg-soft);
  font-family: var(--font-mono);
}
.profile-card__cta { display: flex; gap: .5rem; flex-wrap: wrap; padding-top: .25rem; }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__trust { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; position: relative; }
.section--alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section--cta { padding-block: clamp(3rem, 6vw, 5rem); }
.section__head { max-width: 56ch; margin: 0 auto 2.5rem; text-align: center; }
.section__head p { color: var(--fg-soft); }

/* ---------- Logos strip ---------- */
.logos { padding: 1.5rem 0; border-block: 1px solid var(--border); background: var(--bg-soft); }
.logos__label { text-align: center; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-mute); margin: 0 0 .8rem; }
.logos__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2rem; }
.logos__list li { font-weight: 600; color: var(--fg-mute); letter-spacing: .02em; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.service__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 1rem; }
.service__icon svg { width: 22px; height: 22px; }
.service h3 { margin-bottom: .4rem; }
.service p { font-size: .96rem; }

.ticks { display: grid; gap: .5rem; padding: 0; }
.ticks li { padding-left: 1.6rem; position: relative; color: var(--fg-soft); font-size: .92rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 14px; height: 8px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg); border-radius: 1px;
}
.ticks--lg li { display: grid; gap: .15rem; padding-left: 1.6rem; }
.ticks--lg li strong { color: var(--fg); }
.ticks--lg li span { color: var(--fg-mute); font-size: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; }
.chips li {
  font-size: .78rem; font-weight: 500; color: var(--fg-soft);
  padding: .25rem .65rem; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--bg);
}
.chips--lg li { font-size: .85rem; padding: .35rem .8rem; }

/* ---------- Projects ---------- */
.project { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.project__media {
  aspect-ratio: 16 / 9; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 1.4rem; font-weight: 700; color: #fff;
  letter-spacing: .04em;
}
.project__media {
  position: relative;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #0e7490 100%);
}
.project__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 60% at 20% 20%, rgba(255,255,255,.18) 0%, transparent 60%),
    radial-gradient(40% 60% at 80% 80%, rgba(0,0,0,.25) 0%, transparent 60%);
  pointer-events: none;
}
.project__media > span { position: relative; z-index: 1; }
.project__media--yatra    { background: linear-gradient(135deg, #0c4a6e 0%, #1e3a8a 100%); }
.project__media--sikshya  { background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%); }
.project__media--ur       { background: linear-gradient(135deg, #155e75 0%, #0c4a6e 100%); }
.project__media--icopick  { background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%); }
.project__media--edd      { background: linear-gradient(135deg, #134e4a 0%, #115e59 100%); }
.project__media--more     { background: linear-gradient(135deg, #1f2937 0%, #0f172a 100%); }
.project__body { padding: 1.3rem 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.project__body p { font-size: .94rem; flex: 1; }
.project__body .link { margin-top: .8rem; font-weight: 600; }
.link { color: var(--brand); font-weight: 600; }

/* ---------- Stack ---------- */
.stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.stack__group { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.stack__group h4 { margin: 0 0 .8rem; font-size: 1rem; color: var(--fg); }
@media (max-width: 720px) { .stack { grid-template-columns: 1fr; } }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 1.4rem; max-width: 760px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: .35rem; top: .6rem; bottom: .6rem; width: 2px; background: var(--border-strong); }
.timeline__item { position: relative; padding: 0 0 1.6rem 1.4rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -.05rem; top: .55rem;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--brand);
}
.timeline__date { font-size: .82rem; color: var(--fg-mute); font-weight: 600; letter-spacing: .04em; margin-bottom: .25rem; }
.timeline__body h3 { margin-bottom: .3rem; }

/* ---------- About / pricing aside ---------- */
.about { display: grid; grid-template-columns: 1.3fr .9fr; gap: 2.5rem; align-items: start; }
.about__copy p { font-size: 1rem; }
.about__meta { display: grid; gap: .6rem; margin-top: 1.2rem; padding: 1rem 1.2rem; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); }
.about__meta strong { display: block; font-size: .82rem; color: var(--fg-mute); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.about__meta span { color: var(--fg); }
.pricing h3 { margin-bottom: 1rem; }
.pricing .ticks { margin-bottom: 1.2rem; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact__channels { display: grid; gap: .7rem; margin: 1rem 0 1.4rem; }
.contact__channels li { display: inline-flex; align-items: center; gap: .6rem; color: var(--fg); }
.contact__channels a { color: var(--fg); }
.contact__channels a:hover { color: var(--brand); }

.socials { display: flex; gap: .6rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--fg-soft);
}
.socials a:hover { color: var(--fg); border-color: var(--border-strong); }
.socials svg { width: 18px; height: 18px; }

.contact__form { display: grid; gap: 1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--fg); }
.field input, .field select, .field textarea {
  padding: .7rem .85rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--fg); font-family: inherit; font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 0; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field--row > div { display: grid; gap: .35rem; }
.hp { position: absolute; left: -9999px; }
.form__note { font-size: .82rem; color: var(--fg-mute); margin: 0; }
.form__success { padding: 1rem; background: color-mix(in srgb, #16a34a 12%, transparent); border: 1px solid color-mix(in srgb, #16a34a 35%, transparent); border-radius: var(--radius-sm); color: var(--fg); }

@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } .field--row { grid-template-columns: 1fr; } }

/* ---------- Markdown view banner (AI/LLM SEO) ---------- */
.md-banner { padding: 1.25rem 0; border-top: 1px dashed var(--border); margin-top: 1.5rem; }
.md-banner__inner { display: flex; justify-content: flex-end; align-items: center; gap: .75rem; flex-wrap: wrap; }
.md-banner__hint { font-size: .8rem; color: var(--fg-mute); margin: 0; }
.md-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem 1rem; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--bg-elev);
  color: var(--fg-soft); font-size: .85rem; font-weight: 600;
  transition: border-color .15s, color .15s, background .15s;
}
.md-link:hover { color: var(--fg); border-color: var(--brand); background: var(--bg); }
.md-link svg { width: 16px; height: 16px; }

@media (max-width: 600px) {
  .md-banner__inner { justify-content: flex-end; }
}

/* ---------- Footer ---------- */
.footer { padding: 1.6rem 0 2.4rem; border-top: 1px solid var(--border); margin-top: 2rem; background: var(--bg-soft); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer__inner p { margin: 0; color: var(--fg-mute); font-size: .9rem; }
.footer__meta a { color: var(--fg-soft); }

/* ---------- Misc ---------- */
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 80;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow-lg);
  display: grid; gap: .15rem; max-width: 320px;
}
.toast strong { color: var(--fg); }
.toast span { color: var(--fg-soft); font-size: .9rem; }
[hidden] { display: none !important; }

.contact__success { padding: 2rem; text-align: center; }
.contact__success h2 { margin: 0 0 .6rem; }
.contact__success p { color: var(--fg-soft); margin: 0 0 1rem; }
.contact__success p:last-child { margin: 1.2rem 0 0; }

.cta-banner {
  text-align: center; padding: 2.4rem 1.5rem; border-radius: var(--radius-lg);
  background: var(--grad); color: #fff; box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; margin-bottom: .4rem; }
.cta-banner p { color: rgba(255, 255, 255, .9); margin-bottom: 1.2rem; }
.cta-banner .btn--primary { background: #fff; color: var(--brand); }
.cta-banner .btn--primary:hover { color: var(--brand-strong); }
.cta-banner .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta-banner .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: .6rem; }
.faq details {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.2rem; transition: border-color .15s;
}
.faq details[open] { border-color: var(--brand); }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--fg);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .8rem 0 0; color: var(--fg-soft); }

/* ============================================================
   CV / Resume page
   ============================================================ */
.cv {
  max-width: 920px; margin: 0 auto;
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.cv__header {
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem;
  padding-bottom: 1.25rem; border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem; align-items: end;
}
.cv__header h1, .cv__name {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -0.02em;
  margin: 0 0 .25rem; color: var(--fg); line-height: 1.2;
}
.cv__header .role { color: var(--fg-soft); font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 500; }
.cv__contact { display: grid; grid-template-columns: repeat(2, auto); gap: .25rem 1.25rem; font-size: .9rem; }
.cv__contact a { color: var(--fg); }
.cv__contact a:hover { color: var(--brand); }
.cv__contact span { color: var(--fg-mute); margin-right: .35rem; font-weight: 500; }

.cv__actions { display: flex; flex-direction: column; gap: .5rem; align-items: flex-end; }

.cv section { margin-bottom: 1.75rem; }
.cv section:last-child { margin-bottom: 0; }
.cv h2 {
  font-size: .95rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand);
  padding-bottom: .35rem; border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.cv__role-block { margin-bottom: 1.25rem; }
.cv__role-block:last-child { margin-bottom: 0; }
.cv__role-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .25rem;
}
.cv__role-title { font-size: 1.05rem; font-weight: 700; color: var(--fg); }
.cv__role-company { font-weight: 500; color: var(--fg-soft); }
.cv__role-date { font-size: .85rem; color: var(--fg-mute); font-weight: 500; white-space: nowrap; }
.cv__role-bullets { padding-left: 1.2rem; margin: .5rem 0 0; list-style: disc; }
.cv__role-bullets li { color: var(--fg-soft); font-size: .94rem; margin: .15rem 0; }
.cv__skills { display: grid; grid-template-columns: 180px 1fr; gap: .5rem 1.5rem; align-items: start; }
.cv__skills dt { font-weight: 600; color: var(--fg); font-size: .92rem; }
.cv__skills dd { margin: 0; color: var(--fg-soft); font-size: .92rem; }
.cv__projects { display: grid; gap: .85rem; }
.cv__projects > div { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; }
.cv__projects strong { color: var(--fg); }
.cv__projects p { margin: 0; color: var(--fg-soft); font-size: .94rem; }

@media (max-width: 720px) {
  .cv__header { grid-template-columns: 1fr; }
  .cv__actions { flex-direction: row; align-items: flex-start; flex-wrap: wrap; }
  .cv__contact { grid-template-columns: 1fr; }
  .cv__skills { grid-template-columns: 1fr; gap: .25rem; }
  .cv__skills dt { margin-top: .5rem; }
  .cv__projects > div { grid-template-columns: 1fr; gap: .25rem; }
}

/* ---------- Print styles (CV is the primary printable view) ---------- */
@media print {
  :root { --bg: #fff; --bg-soft: #fff; --bg-elev: #fff; --fg: #111; --fg-soft: #333; --fg-mute: #555; --border: #ddd; --border-strong: #ccc; --brand: #0b3a8c; }
  body { font-size: 11pt; color: #111; background: #fff; }
  .nav, .footer, .cta-banner, .nav__menu, .theme-toggle, .skip-link, .toast, .cv__actions, .page-hero::before, .hero__bg { display: none !important; }
  .page-hero { padding: 0 !important; }
  .page-hero .breadcrumbs { display: none; }
  main { padding: 0; }
  .section { padding: .25rem 0 !important; }
  .container { width: 100%; max-width: none; padding: 0; }
  .cv {
    max-width: none; padding: 0; border: 0; box-shadow: none; border-radius: 0;
  }
  .cv h2 { page-break-after: avoid; }
  .cv__role-block { page-break-inside: avoid; }
  a { color: #0b3a8c !important; text-decoration: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
