/* ══════════════════════════════════════════════════════════
   Al Mutaz Al Rahbi — Personal Brand Website
   Design tokens + base
   Palette: Oman Investment Authority inspired — warm off-white, gold / tan / brown (light theme)
   ══════════════════════════════════════════════════════════ */
:root {
  --navy-950: #e6d8b6;
  --navy-900: #dac99e;
  --navy-800: #f6efdb;
  --navy-700: #e0cfa4;
  --charcoal: #171613;
  --gold: #9a7420;
  --gold-light: #ddaa49;
  --gold-dark: #73510f;
  --gold-dim: rgba(154, 116, 32, 0.18);

  --text: #171613;
  --text-muted: #4a443b;
  --text-faint: #7b7467;

  --border: rgba(46, 37, 24, 0.16);
  --border-strong: rgba(46, 37, 24, 0.30);
  --card: #f6efdb;
  --card-hover: #e9dbb9;
  --bg-accent: #dcc99c;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;

  --shadow: 0 4px 24px rgba(80, 60, 30, 0.12);
  --shadow-lg: 0 16px 48px rgba(80, 60, 30, 0.18);

  --font: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font);
  background: var(--navy-950);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: #fff; }

img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--gold); color: #fff; padding: .6rem 1rem;
  border-radius: 8px; font-weight: 600; transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* Focus states (accessibility) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Layout & typography utilities ── */
.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
  position: relative;
}

.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-kicker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
  padding: .3rem .75rem; border: 1px solid var(--gold-dim);
  border-radius: 999px; background: var(--gold-dim); margin-bottom: 1rem;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: .75rem;
}
.section-lead { color: var(--text-muted); font-size: 1.05rem; }
.muted { color: var(--text-muted); }
.accent { color: var(--gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.4rem; border-radius: 999px; font-size: .9rem; font-weight: 600;
  border: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn i { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #3a2a0e; box-shadow: 0 6px 24px rgba(177, 132, 43, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(177, 132, 43, 0.42); }
.btn-ghost { border: 1.5px solid var(--border-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--card-hover); transform: translateY(-2px); }
.btn-link { color: var(--text-muted); padding-left: .25rem; padding-right: .25rem; }
.btn-link:hover { color: var(--gold); }

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 1.75rem;
  background: rgba(230, 216, 182, 0.86);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.navbar.scrolled { background: rgba(230, 216, 182, 0.97); }

.nav-logo { display: flex; align-items: center; gap: .7rem; font-weight: 600; font-size: 1.02rem; }
.nav-logo em { font-style: normal; color: var(--gold); }
.nav-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  border: 1px solid var(--gold); color: var(--gold-dark);
  font-weight: 700; font-size: .82rem; letter-spacing: .02em;
}

.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-link {
  font-size: .9rem; font-weight: 500; color: var(--text-muted);
  position: relative; padding: .3rem 0; transition: color .2s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; border-radius: 2px; background: var(--gold);
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border);
  border-radius: 10px; width: 42px; height: 42px; color: var(--text);
  align-items: center; justify-content: center;
}
.nav-toggle i { width: 22px; height: 22px; }

/* ── Hero ── */
.hero {
  position: relative; min-height: calc(100vh - 68px);
  display: flex; align-items: center; overflow: hidden;
  padding: 4rem 1.5rem 5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(177, 132, 43, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(177, 132, 43, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 35%, #000 30%, transparent 75%);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 60% 55% at 50% -10%, rgba(244, 199, 108, 0.22), transparent 60%);
}

.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase;
  color: var(--gold-dark); padding: .35rem .8rem; border: 1px solid var(--gold-dim);
  background: var(--gold-dim); border-radius: 999px; margin-bottom: 1.3rem;
}
.hero-badge i { width: 15px; height: 15px; }

.hero-name {
  font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 700;
  letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 1rem;
}
.hero-headline {
  font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 500;
  color: var(--text); margin-bottom: 1rem; letter-spacing: -0.01em;
}
.hero-bio { color: var(--text-muted); font-size: 1.02rem; max-width: 560px; margin-bottom: 1.8rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.6rem; }

.hero-meta { display: flex; align-items: center; gap: .7rem; color: var(--text-faint); font-size: .88rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-meta i { width: 16px; height: 16px; color: var(--gold); }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 3;
  color: var(--text-faint); animation: float 2.4s ease-in-out infinite;
}
.scroll-hint i { width: 22px; height: 22px; }

/* ── Hero photo / monogram placeholder ── */
.hero-photo { display: flex; justify-content: center; }
.photo-frame {
  position: relative; width: min(340px, 78vw); aspect-ratio: 4 / 5;
  border-radius: 24px; padding: 10px;
  background: linear-gradient(160deg, rgba(177,132,43,.4), rgba(177,132,43,.06) 45%, transparent);
}
.photo-frame::before {
  content: ""; position: absolute; inset: 1px; border-radius: 18px;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-950));
}
.photo-monogram {
  position: absolute; inset: 11px; border-radius: 15px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  background:
    radial-gradient(circle at 50% 35%, rgba(177,132,43,.14), transparent 60%),
    linear-gradient(180deg, #f6efdb, #e7d9b4);
  border: 1px solid var(--border);
}
.photo-monogram span {
  font-size: clamp(3rem, 9vw, 4.4rem); font-weight: 300; letter-spacing: .02em;
  color: var(--gold-dark);
}
.photo-monogram small { color: var(--text-faint); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.photo-frame img {
  position: absolute; inset: 11px; width: calc(100% - 22px); height: calc(100% - 22px);
  object-fit: cover; object-position: top center; border-radius: 15px;
}

/* About */
.about-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; margin-bottom: 3rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fact {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 1.4rem 1.2rem; display: flex; flex-direction: column; gap: .25rem;
  transition: transform .2s ease, border-color .2s ease;
}
.fact:hover { transform: translateY(-3px); border-color: var(--gold-dim); }
.fact-num { font-size: 2rem; font-weight: 700; color: var(--gold); letter-spacing: -0.02em; }
.fact-label { font-size: .85rem; color: var(--text-muted); }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; background: linear-gradient(var(--gold), var(--gold-dim), transparent);
}
.timeline-item { position: relative; padding-bottom: 1.9rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -2rem; top: 7px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--navy-950); border: 2px solid var(--gold);
}
.timeline-year {
  font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}
.timeline-item h3 { font-size: 1.08rem; font-weight: 600; margin: .25rem 0 .25rem; }
.timeline-item p { color: var(--text-muted); font-size: .95rem; }

/* ── Skills ── */
.skills-subhead {
  font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); margin: 2.2rem 0 1.1rem;
}
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.skill-card {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.2rem;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.skill-card:hover { transform: translateY(-3px); border-color: var(--gold-dim); background: var(--card-hover); }
.skill-card i {
  width: 26px; height: 26px; color: var(--gold); flex-shrink: 0; margin-top: 2px;
}
.skill-card h4 { font-size: 1rem; font-weight: 600; margin-bottom: .2rem; }
.skill-card p { color: var(--text-muted); font-size: .86rem; line-height: 1.45; }

.soft-skills { display: flex; flex-wrap: wrap; gap: .6rem; }
.soft-skill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem .9rem; border-radius: 999px; font-size: .88rem; font-weight: 500;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  transition: transform .18s ease, border-color .18s ease;
}
.soft-skill:hover { transform: translateY(-2px); border-color: var(--gold-dim); }
.soft-skill i { width: 15px; height: 15px; color: var(--gold); }

/* ── Portfolio ── */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.project-card {
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--card); cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.project-card:hover, .project-card:focus-visible {
  transform: translateY(-5px); border-color: var(--gold-dim); box-shadow: var(--shadow-lg);
}
.project-art {
  height: 150px; display: flex; align-items: center; justify-content: center;
  position: relative;
}
.project-art i { width: 44px; height: 44px; color: rgba(255,255,255,.9); }
.art-tra    { background: linear-gradient(135deg, #1e3a8a, #0e1830); }
.art-oia    { background: linear-gradient(135deg, #7a5c1e, #2a2410); }
.art-fintler{ background: linear-gradient(135deg, #155e4a, #0c2a23); }
.art-dcf    { background: linear-gradient(135deg, #7c3aed, #2a1440); }
.art-risk   { background: linear-gradient(135deg, #b4452f, #3a150d); }
.art-acca   { background: linear-gradient(135deg, #b8860b, #2a1f05); }
.project-art::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(177,132,43,.2), transparent 60%);
}
.project-body { padding: 1.25rem 1.3rem 1.4rem; }
.project-tag {
  font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold);
}
.project-body h3 { font-size: 1.1rem; font-weight: 600; margin: .4rem 0 .5rem; }
.project-body p { color: var(--text-muted); font-size: .9rem; margin-bottom: .9rem; }
.project-open {
  display: inline-flex; align-items: center; gap: .35rem; font-size: .86rem; font-weight: 600; color: var(--gold-dark);
}
.project-open i { width: 15px; height: 15px; transition: transform .2s ease; }
.project-card:hover .project-open i { transform: translate(2px, -2px); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1.25rem; background: rgba(40, 32, 20, 0.55); backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  position: relative; width: 100%; max-width: 520px; background: var(--navy-800);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-lg); transform: translateY(12px); transition: transform .25s ease;
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 1rem; right: 1rem; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; width: 38px; height: 38px; color: var(--text); display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, border-color .18s ease;
}
.modal-close:hover { background: var(--card-hover); border-color: var(--gold-dim); }
.modal-close i { width: 19px; height: 19px; }
.modal-art {
  width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim); border: 1px solid var(--gold-dim); margin-bottom: 1.2rem;
}
.modal-art i { width: 28px; height: 28px; color: var(--gold); }
.modal h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: .7rem; }
.modal-desc { color: var(--text-muted); margin-bottom: 1.3rem; }
.modal-meta { display: flex; flex-direction: column; gap: .7rem; }
.modal-row { border-top: 1px solid var(--border); padding-top: .7rem; }
.modal-row strong { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: .25rem; }
.modal-row span { color: var(--text-muted); font-size: .93rem; }

/* ── Resume ── */
.resume-btn { margin-top: .5rem; }
.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.resume-col { min-width: 0; }
.resume-h {
  display: flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--gold);
  margin: 1.4rem 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border);
}
.resume-h:first-child { margin-top: 0; }
.resume-h i { width: 18px; height: 18px; }
.resume-block { margin-bottom: 1.4rem; }
.resume-block .exp-img {
  display: block; width: 100%; height: 132px; object-fit: cover; object-position: center;
  border-radius: 12px; border: 1px solid var(--border); margin-bottom: .8rem;
  background: var(--bg-accent);
}
.resume-block:hover .exp-img { transform: scale(1.015); }
.resume-block .exp-img { transition: transform .35s ease; }
.resume-when {
  display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: .3rem;
}
.resume-block h4 { font-size: 1.05rem; font-weight: 600; margin-bottom: .2rem; }
.resume-block p { color: var(--text-muted); font-size: .92rem; }
.resume-list { list-style: none; margin-top: .5rem; }
.resume-list li {
  position: relative; padding-left: 1.15rem; color: var(--text-muted); font-size: .9rem; margin-bottom: .4rem;
}
.resume-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ── Contact ── */
.contact-wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; align-items: start; }
.contact-intro { color: var(--text-muted); margin-bottom: 1.4rem; }
.contact-line {
  display: flex; align-items: center; gap: .8rem; padding: .7rem 0;
  color: var(--text); border-bottom: 1px solid var(--border); font-weight: 500;
  transition: color .18s ease;
}
.contact-line i { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; }
.contact-line:hover { color: var(--gold); }
.contact-line .muted { font-weight: 400; font-size: .85rem; }
.contact-note {
  display: flex; gap: .7rem; margin-top: 1.4rem; padding: .9rem 1rem;
  border: 1px solid var(--gold-dim); border-radius: var(--radius-sm); background: var(--gold-dim);
  color: var(--gold-dark); font-size: .86rem; line-height: 1.5;
}
.contact-note i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

.contact-form {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--card); padding: 1.8rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.field label { font-size: .8rem; font-weight: 600; color: var(--text-muted); letter-spacing: .05em; }
.field input, .field textarea {
  width: 100%; padding: .7rem .9rem; background: #f6efdb;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-family: inherit; font-size: .95rem; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.field textarea { resize: vertical; min-height: 110px; }
.field input.invalid, .field textarea.invalid { border-color: #d9482f; }
.field-error { color: #d9482f; font-size: .8rem; min-height: 1em; }
.form-status { margin-top: .8rem; font-size: .9rem; }
.form-status.ok { color: #16a34a; }
.form-status.err { color: #d9482f; }

/* ── FAQ ── */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: .7rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.3rem; background: none; border: none; text-align: left;
  color: var(--text); font-size: 1rem; font-weight: 600; transition: color .18s ease;
}
.faq-q:hover { color: var(--gold-dark); }
.faq-q i { width: 20px; height: 20px; color: var(--gold); flex-shrink: 0; transition: transform .3s ease; }
.faq-item.open .faq-q i { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a p { padding: 0 1.3rem 1.2rem; color: var(--text-muted); font-size: .95rem; }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); background: var(--navy-900); }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 2.4rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: .8rem; font-weight: 500; }
.footer-note { color: var(--text-faint); font-size: .86rem; }

/* ── Animations ── */
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -8px); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-particles { display: none; }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-photo { order: -1; }
  .about-wrap, .resume-grid, .contact-wrap { grid-template-columns: 1fr; }
  .about-facts { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 68px 0 auto 0; z-index: 99;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(230, 216, 182, 0.98); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border); padding: .5rem 1.5rem 1rem;
    transform: translateY(-110%); transition: transform .3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-link { padding: .8rem 0; width: 100%; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav-link:last-child { border-bottom: none; }
  .nav-name em { display: none; }

  .section { padding: 3.5rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }
  .about-facts { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 3rem 1.25rem 4.5rem; }
  .hero-actions { gap: .6rem; }
  .btn { padding: .66rem 1.15rem; font-size: .86rem; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .about-facts { grid-template-columns: 1fr 1fr; }
}


/* ══════════════════════════════════════════════════════════
   Professional refinement (layout & typography)
   ══════════════════════════════════════════════════════════ */
:root {
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 10px rgba(80, 60, 30, 0.06), 0 10px 30px rgba(80, 60, 30, 0.08);
  --shadow-lg: 0 6px 20px rgba(80, 60, 30, 0.09), 0 26px 60px rgba(80, 60, 30, 0.15);
}

/* Serif display for headings — editorial / premium */
.hero-name,
.section-head h2,
.fact-num,
.project-body h3,
.modal h3,
.resume-block h4,
.timeline-item h3 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

.hero-name { font-weight: 600; letter-spacing: -0.04em; }
.section-head h2 { font-weight: 600; }

/* Refined section header — kicker with leading rule */
.section-kicker {
  letter-spacing: 0.2em;
  font-weight: 600;
}
.section-head h2 { margin-bottom: 0.65rem; }


/* ── Hero: sharper, more executive ── */
.hero-badge { letter-spacing: 0.16em; }
.hero-headline { color: var(--gold-dark); font-weight: 600; }
.hero-bio { max-width: 580px; }
.hero-actions { gap: 0.85rem; }
.hero-meta { font-size: 0.86rem; color: var(--text-muted); }

.photo-frame {
  border-radius: 18px;
  padding: 8px;
  background: linear-gradient(160deg, rgba(177, 132, 43, 0.55), rgba(177, 132, 43, 0.1) 50%, transparent);
  box-shadow: var(--shadow-lg);
}
.photo-frame::before { border-radius: 13px; }
.photo-frame img { border-radius: 12px; }

/* ── Buttons: refined ── */
.btn { letter-spacing: 0.01em; }
.btn-primary {
  background: linear-gradient(135deg, #c9973a, var(--gold));
  color: #2f220a;
  box-shadow: 0 4px 16px rgba(177, 132, 43, 0.28);
}
.btn-primary:hover { box-shadow: 0 8px 24px rgba(177, 132, 43, 0.4); }

/* ── Navbar: crisper ── */
.nav-link { font-weight: 500; }
.nav-monogram { border-radius: 9px; }


/* ── Cards & grids: more precise, less bubbly ── */
.about-wrap { gap: 3.25rem; }
.fact { padding: 1.5rem 1.3rem; border-radius: var(--radius); }
.fact-num { font-weight: 600; }

.skill-card { padding: 1.35rem 1.25rem; border-radius: var(--radius); }
.skill-card i { color: var(--gold-dark); }
.skill-card:hover { border-color: var(--gold-dim); box-shadow: var(--shadow); }

.soft-skill { border-radius: 8px; padding: 0.5rem 0.85rem; }

.project-card { border-radius: var(--radius-lg); }
.project-body { padding: 1.35rem 1.4rem 1.5rem; }
.project-body h3 { font-weight: 600; }

.resume-h { color: var(--gold-dark); }
.resume-block .exp-img { border-radius: 10px; }
.resume-block h4 { font-weight: 600; }

.contact-form { border-radius: var(--radius-lg); padding: 2rem; }
.field input, .field textarea { border-radius: var(--radius-sm); }

.faq-item { border-radius: var(--radius); }

/* ── Subtle section rhythm ── */
main > .section + .section { border-top: 1px solid var(--border); }

/* ── Footer ── */
.footer-inner { padding: 2.6rem 1.5rem; }
.footer-brand { font-weight: 600; }


/* Inline brand icons (LinkedIn / GitHub) */
.contact-line svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  flex-shrink: 0;
}

/* ── Bot FAB hover tooltip ("هل تريد مساعدة؟") ── */
#sana-fab-tooltip {
  position: fixed;
  right: 26px;
  bottom: 124px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
#sana-fab-tooltip.show { opacity: 1; transform: translateY(0); }
#sana-fab-tooltip .t {
  background: #0e1a30;
  color: #f5efdf;
  font-weight: 600;
  font-size: .95rem;
  padding: .65rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 166, 92, .55);
  box-shadow: 0 10px 30px rgba(10, 18, 32, .35);
  white-space: nowrap;
}
#sana-fab-tooltip .a {
  width: 12px;
  height: 12px;
  background: #0e1a30;
  border-right: 1px solid rgba(201, 166, 92, .55);
  border-bottom: 1px solid rgba(201, 166, 92, .55);
  transform: rotate(45deg);
  margin-top: -6px;
  margin-right: 58px;
}


/* ── Floating geometric background shapes ── */
.bg-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.sh {
  position: absolute;
  display: block;
  opacity: 0.2;
  will-change: transform;
  animation: shFloat 16s ease-in-out infinite;
}
/* shape primitives */
.sh-ring {
  width: 72px; height: 72px;
  border: 2px solid var(--gold);
  border-radius: 50%;
}
.sh-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
}
.sh-diamond {
  width: 44px; height: 44px;
  background: transparent;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  animation-name: shFloatDiamond;
}
.sh-tri {
  width: 0; height: 0;
  border-left: 26px solid transparent;
  border-right: 26px solid transparent;
  border-bottom: 44px solid var(--gold);
}
.sh-plus { width: 40px; height: 40px; }
.sh-plus::before,
.sh-plus::after {
  content: ""; position: absolute; background: var(--gold);
}
.sh-plus::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.sh-plus::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); }
.sh-square {
  width: 34px; height: 34px;
  border: 2px solid var(--gold);
  border-radius: 6px;
}
/* placements */
.sh-1  { top: 14%;  left: 6%;  animation-delay: 0s;     animation-duration: 15s; }
.sh-2  { top: 22%;  left: 22%; animation-delay: -3s;    animation-duration: 13s; }
.sh-3  { top: 70%;  left: 9%;  animation-delay: -6s;    animation-duration: 18s; }
.sh-4  { top: 12%;  right: 16%; animation-delay: -2s;   animation-duration: 17s; }
.sh-5  { top: 30%;  right: 8%;  animation-delay: -8s;    animation-duration: 14s; }
.sh-6  { top: 60%;  right: 14%; animation-delay: -4s;    animation-duration: 19s; }
.sh-7  { top: 82%;  right: 26%; animation-delay: -7s;    animation-duration: 16s; }
.sh-8  { top: 48%;  left: 3%;   animation-delay: -10s;   animation-duration: 15s; }
.sh-9  { top: 88%;  left: 16%;  animation-delay: -5s;    animation-duration: 20s; }
.sh-10 { top: 8%;   left: 48%;  animation-delay: -9s;    animation-duration: 16s; }
.sh-11 { top: 90%;  left: 52%;  animation-delay: -1s;    animation-duration: 15s; }

@keyframes shFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25%      { transform: translateY(-22px) rotate(8deg); }
  50%      { transform: translateY(-6px) rotate(0deg); }
  75%      { transform: translateY(-30px) rotate(-8deg); }
}
@keyframes shFloatDiamond {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  25%      { transform: rotate(53deg) translateY(-22px); }
  50%      { transform: rotate(45deg) translateY(-6px); }
  75%      { transform: rotate(37deg) translateY(-30px); }
}

@media (prefers-reduced-motion: reduce) {
  .sh { animation: none; }
}
