/* Visual direction: a digital product designer's studio.
   Blue slate, cobalt, white; generous typography and real project previews. */
:root {
  --bg: #F3F6FB;
  --surface: #FFFFFF;
  --surface-alt: #E7EDF6;
  --ink: #182E45;
  --ink-title: #122D45;
  --ink-2: #43576F;
  --ink-3: #52647C;
  --line: #D0DAE8;
  --accent: #2455D6;
  --accent-ink: #1946B8;
  --accent-soft: #E5ECFF;
  --warm: #167168;
  --warm-ink: #125E56;
  --warm-soft: #DDF2EE;
  --font-display: "Manrope", "Segoe UI", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --r-sm: 6px;
  --r-md: 16px;
  --r-lg: 28px;
  --shell: 1360px;
  --nav-h: 80px;
  --pad-section: 100px;
  --shadow-lift: 0 12px 34px rgba(24, 46, 69, .09);
}
:root[data-theme="dark"] {
  --bg: #101E30;
  --surface: #17283D;
  --surface-alt: #1D3048;
  --ink: #FFFFFF;
  --ink-title: #FFFFFF;
  --ink-2: #E6EEF8;
  --ink-3: #CFD9E8;
  --line: #354B66;
  --accent: #93B6FF;
  --accent-ink: #B3CCFF;
  --accent-soft: #263F65;
  --warm: #86D9C9;
  --warm-ink: #B1E9DD;
  --warm-soft: #22473F;
  --shadow-lift: 0 12px 34px rgba(0, 0, 0, .2);
}
/* Keep Bootstrap components on the same foreground/background theme. */
:root {
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--bg);
  --bs-heading-color: var(--ink-title);
  --bs-secondary-color: var(--ink-2);
  --bs-border-color: var(--line);
}
body { font-weight: 400; }
h1, h2, h3, h4 { font-weight: 700; }
.mono { font-family: var(--font-body); letter-spacing: 0; }
.nav { background: color-mix(in srgb, var(--bg) 93%, transparent); }
.nav__inner { gap: 18px; }
.nav__brand { font-weight: 800; font-size: 18px; letter-spacing: -.6px; }
.nav__mark { inline-size: 8px; block-size: 22px; border-radius: 3px; }
.nav__links { gap: 15px; }
.nav__links a { font-size: 12px; font-weight: 600; }
.nav__n { display: none !important; }
/* Bootstrap's offcanvas has its own foreground; match it to our theme. */
.offcanvas.menu { --bs-offcanvas-color: var(--ink); --bs-offcanvas-bg: var(--bg); color: var(--ink); }
.menu__title { color: var(--ink-title); font-weight: 700; }
.menu__close { color: var(--ink); margin-inline-start: auto; min-width: 44px; min-height: 44px; }
.menu .offcanvas-body a { color: var(--ink); font-weight: 600; }
.menu .offcanvas-body a:hover, .menu .offcanvas-body a:focus-visible { color: var(--accent-ink); background: var(--accent-soft); }
.langbar { border-radius: 9px; }
.langbar__long { display: none; }
.langbar__short { display: inline; }
.btn { border-radius: 9px; font-weight: 700; letter-spacing: 0; text-transform: none; font-size: 14px; padding: 15px 22px; }
.btn--solid { background: var(--accent); color: var(--surface); border-color: var(--accent); }
:root[data-theme="dark"] .btn--solid { background: #2455D6; color: #FFFFFF; border-color: transparent; }
.btn--solid:hover { background: var(--accent-ink); color: var(--surface); border-color: var(--accent-ink); }
:root[data-theme="dark"] .btn--solid:hover { background: #1946B8; color: #FFFFFF; }
.btn--ghost { border-color: var(--line); }
.hero { min-block-size: auto; padding-block: calc(var(--nav-h) + 45px) 80px; }
.hero__inner { grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero__kicker { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-2); margin-block-end: 28px; }
.hero__kicker .dot { background: var(--warm); animation: none; }
.hero__title { font-size: clamp(80px, 8.3vw, 124px); letter-spacing: -.075em; line-height: .96; font-weight: 800; margin-block-end: 28px; }
.hero__title .line { padding-block-end: .08em; }
.hero__title .line:nth-child(2) > span { color: var(--ink-title); }
.hero__intro { max-width: 44ch; color: var(--ink-2); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.65; margin-block-end: 30px; }
.hero__cta { gap: 10px; border: 0; padding-block-start: 0; }
.hero__cta > a:last-child { border-color: transparent; padding-inline: 8px; }
.hero__figure { inline-size: 100%; max-inline-size: 430px; justify-self: end; padding: 14px; background: var(--accent); border-radius: 140px 24px 24px 24px; }
.hero__figure::before { display: none; }
.hero__portrait { aspect-ratio: 4/4.7; border-radius: 128px 14px 14px 14px; }
.hero__portrait img { filter: none; object-position: 50% 22%; }
.hero__caption { color: white; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 8px 4px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.hero__signature { font-size: 30px; font-weight: 800; letter-spacing: -2px; }
:root[data-theme="dark"] .hero__caption { color: var(--ink); }
.hero__proof { max-width: 510px; margin-block-start: 32px; padding-block-start: 20px; gap: 16px; }
.hero__proof > div, .hero__proof > div + div { border: 0; padding: 0; }
.hero__proof b { font-size: 27px; font-weight: 700; color: var(--ink-title); }
.hero__proof span { text-transform: none; letter-spacing: 0; font-size: 12px; margin-block-start: 5px; }
.hero__scroll { display: none; }
.section { border: 0; }
.section--major { padding-block: 100px; }
#profile { background: var(--surface); padding-block: 70px; }
.chap { margin-block-end: 44px; }
.chap__n, .chap .rule { display: none; }
.kicker { text-transform: none; letter-spacing: 0; color: var(--accent-ink); font-weight: 700; font-size: 14px; margin-block-end: 16px; }
.h-display, .h-section { font-weight: 700; letter-spacing: -.045em; max-width: 23ch; line-height: 1.15; }
.h-display { font-size: clamp(32px, 3.5vw, 50px); }
.h-section { font-size: clamp(28px, 2.7vw, 39px); }
.lede { font-size: 17px; line-height: 1.7; max-width: 65ch; }
.prose p { font-size: 16px; max-width: 68ch; }
.grid { gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.card { border-radius: 20px; background: var(--surface); box-shadow: none; }
.card:hover { transform: translateY(-3px); }
.card__edge, .card__no { display: none; }
.card__bar { background: var(--surface); padding: 17px 23px; border: 0; font-size: 13px; }
.card__thumb { filter: none; background: var(--surface-alt); transform: none !important; }
.card__info { padding: 27px; }
.card__meta { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--accent-ink); }
.card__title { font-size: 27px; font-weight: 700; letter-spacing: -.035em; }
.card__tagline { font-size: 15px; line-height: 1.75; max-width: 58ch; }
.card__stack li { border: 0; background: var(--bg); font-family: var(--font-body); font-size: 11px; font-weight: 600; border-radius: 5px; padding: 6px 10px; }
.card__actions { margin-block-start: 24px; display: flex; align-items: center; flex-wrap: wrap; gap: 16px; justify-content: space-between; border-block-start: 1px solid var(--line); padding-block-start: 18px; font-size: 13px; font-weight: 700; }
.card__discover { display: flex; gap: 24px; align-items: center; color: var(--ink-title); }
.card__discover > span { font-size: 22px; line-height: 1; color: var(--accent); }
.card__external { position: relative; z-index: 2; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; padding: 4px 0; }
.project-preview { width: 100%; aspect-ratio: 3/2; overflow: hidden; }
.project-preview img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.project-preview--detail { border: 1px solid var(--line); border-radius: 14px; aspect-ratio: 3/2; }
.card--featured .card__thumb { display: grid; align-items: center; padding: 24px; background: var(--accent-soft); border: 0; }
.card--featured .project-preview { border-radius: 10px; box-shadow: 0 12px 30px rgba(18,45,69,.12); }
.card--featured .card__info { padding: 32px; }
.card--featured .card__title { font-size: 36px; }
.tag { text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-size: 11px; border-radius: 20px; }
.panel__card { border-radius: 24px 24px 0 0; }
.panel__title { font-weight: 700; letter-spacing: -.04em; font-size: clamp(29px, 5vw, 56px); }
.panel__problem { font-family: var(--font-body); font-size: 20px; line-height: 1.65; }
.panel__block { transition: none; transform: none; }
.panel.is-ready .panel__block { transition-delay: 0ms; }
.panel__label { text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 700; }
.panel__label > i { display: none; }
.panel__demo { padding-block: 20px; }
.panel__demo a { font-weight: 700; }
.timeline__highlight { background: var(--surface); border-radius: 16px; padding: 25px !important; margin-block: 14px; border: 1px solid var(--line); }
.timeline__highlight::before { display: none; }
.experience__link { display: inline-block; margin-block-start: 9px; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; color: var(--accent-ink); }
.timeline__head { text-transform: none; letter-spacing: 0; font-weight: 700; }
.timeline strong { font-family: var(--font-body); font-weight: 700; }
.skillset { border-block-start-color: var(--line); }
.skillset h3 { font-family: var(--font-body); font-weight: 700; }
.deliv { border-radius: 20px; background: var(--surface); padding: 32px; }
.deliv__name { font-weight: 700; }
.reel { border-radius: 16px; }
#contact { background: var(--surface); }
.cv__hint { color: var(--ink-2); font-size: 14px; margin-block: 12px; }
.cv__previews { display: flex; flex-wrap: wrap; gap: 24px; margin-block-end: 20px; }
.cv__previews a { font-size: 13px; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; }
.cv__meta { letter-spacing: 0; }
.footer { background: var(--bg); }
/* Reveal once at the top; reading the rest of the portfolio needs no animation. */
[data-reveal] { opacity: 1 !important; translate: none !important; transition: none !important; }
.hero__proof, .hero__figure, .hero__cta, .hero__kicker { opacity: 1; clip-path: none; animation: none; }
.hero__proof > div { clip-path: none; animation: none; }
.lang-ar .hero__title { font-family: var(--font-arabic); letter-spacing: 0; line-height: 1.3; font-weight: 600; }
.lang-ar .hero__intro { font-family: var(--font-arabic); }
.lang-ar .card__title { font-family: var(--font-arabic); letter-spacing: 0; }
[dir="rtl"] .hero__kicker { clip-path: none; }
@media (min-width: 768px) {
  .card--featured { grid-template-columns: .85fr 1.15fr; }
  .card--featured .card__bar { grid-column: 1/-1; }
  .card--featured .card__thumb { order: 2; }
}
@media (max-width: 1159px) {
  .hero__inner { gap: 36px; }
  .hero__title { font-size: 88px; }
  .hero__figure { max-width: 360px; }
}
@media (max-width: 767px) {
  :root { --nav-h: 70px; --pad-section: 64px; --shell-pad: 22px; }
  .hero { padding-block: calc(var(--nav-h) + 28px) 52px; }
  .hero__inner { grid-template-columns: 1fr; gap: 36px; }
  .hero__title { font-size: clamp(74px, 19vw, 112px); }
  .hero__intro { font-size: 17px; }
  .hero__figure { justify-self: start; inline-size: min(100%, 410px); max-width: none; border-radius: 90px 20px 20px 20px; }
  .hero__portrait { aspect-ratio: 5/4; border-radius: 78px 10px 10px 10px; }
  .hero__portrait img { object-position: 50% 23%; }
  .hero__proof { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .hero__proof > div:nth-child(n+3) { margin: 0; border: 0; padding: 0; }
  .hero__proof span { font-size: 11px; }
  .section--major { padding-block: 64px; }
  .card--featured .card__thumb { padding: 16px; }
  .card--featured .card__info, .card__info { padding: 23px; }
  .card--featured .card__title { font-size: 29px; }
  .card__actions { font-size: 12px; }
  .timeline__highlight { padding: 20px !important; }
  .nav__brand { font-size: 15px; gap: 8px; }
  .nav__inner { gap: 8px; }
  .nav__end { gap: 8px; }
  .langbar__btn { padding-inline: 5px; }
  .deliv { padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title .line > span { animation: none; transform: none; }
}

/* RH7 identity and application documents. */
.nav__monogram { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; background: var(--accent); color: var(--bg); font-size: 13px; letter-spacing: -1px; flex-shrink: 0; }
.hero__figure--brand { background: var(--surface); padding: 22px; border: 1px solid var(--line); border-radius: 32px; max-inline-size: 460px; }
.hero__figure--brand .hero__portrait { aspect-ratio: 1; border-radius: 18px; background: #F8FAFE; }
.hero__figure--brand .hero__portrait img { object-fit: contain; object-position: center; }
.hero__figure--brand .hero__caption { color: var(--ink-2); font-size: 12px; font-weight: 600; margin-block-start: 18px; }
.hero__avatar { width: 43px; height: 43px; object-fit: cover; object-position: 50% 24%; border-radius: 50%; }
.project-delivery { color: var(--warm-ink); font-size: 12px; font-weight: 700; margin-block: 0 12px; }
.project-gallery { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.project-gallery figure { margin: 0; }
.project-gallery figure:first-child { grid-column: 1/-1; }
.project-gallery img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; }
.project-gallery figcaption { font-size: 12px; color: var(--ink-2); margin-block-start: 8px; }
.media-note, .media-credit { color: var(--ink-2); font-size: 13px; line-height: 1.7; margin-block: 18px 0; }
.media-credit { font-size: 11px; }
.media-credit a { color: var(--accent-ink); text-decoration: underline; }
.documents { margin-block-start: 60px; scroll-margin-top: 110px; border-block-start: 1px solid var(--line); padding-block-start: 38px; }
.document-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin-block: 25px 32px; }
.document-card { padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); }
.document-card__number { font-size: 11px; font-weight: 800; letter-spacing: 1.1px; color: var(--accent-ink); }
.document-card h3 { font-size: 26px; letter-spacing: -.7px; margin-block: 16px 10px; }
.document-card > p:not(:first-child), .letters > p, .letter-custom > p { color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.document-card__links { margin-block-start: 24px; }
.document-card__links > div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; border-block-start: 1px solid var(--line); padding-block: 14px; }
.document-download { font-size: 15px; font-weight: 800; color: var(--ink-title); display: flex; gap: 14px; }
.document-download:hover, .document-preview:hover { color: var(--accent-ink); }
.document-preview { font-size: 12px; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; }
.cv-open { overflow: hidden; }
.cv-dialog { width: min(1060px,calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 40px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 90px #071a3840; overflow-y: auto; overscroll-behavior: contain; }
.cv-dialog::backdrop { background: #071a3899; backdrop-filter: blur(5px); }
.cv-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 25px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; background: var(--surface); }
.cv-dialog__brand { display: flex; gap: 12px; align-items: center; font-weight: 800; font-size: 15px; }
.cv-dialog__close { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; font-size: 27px; line-height: 1; color: var(--ink); background: var(--bg); }
.cv-dialog__layout { display: grid; grid-template-columns: 1fr 1fr; }
.cv-dialog__preview { background: var(--bg); padding: 26px; border-inline-end: 1px solid var(--line); text-align: center; }
.cv-paper { background: white; box-shadow: 0 8px 26px #071a381a; max-width: 370px; margin-inline: auto; min-height: 200px; }
.cv-paper img { display: block; width: 100%; height: auto; }
.cv-paper img[hidden] { display: none; }
#cv-preview-fallback { padding: 30px; color: #122D45; }
.cv-pagination { display: flex; justify-content: center; align-items: center; gap: 18px; margin-block: 18px 9px; direction: ltr; }
.cv-pagination button { width: 35px; height: 35px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.cv-pagination button:disabled { opacity: .35; cursor: default; }
#cv-page-label, #cv-preview-caption { font-size: 12px; color: var(--ink-2); margin: 0; }
.cv-dialog__options { padding: 32px; align-self: center; }
.cv-dialog__options h2 { font-size: clamp(28px,3vw,40px); letter-spacing: -1.1px; line-height: 1.15; margin-bottom: 18px; }
.cv-dialog__options > p { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.cv-dialog fieldset { margin-block: 22px; border: 0; min-width: 0; }
.cv-dialog legend { font-size: 12px; font-weight: 800; float: none; margin-bottom: 10px; }
.cv-market-options, .cv-language-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.cv-market-options button, .cv-language-options button { text-align: start; border: 1px solid var(--line); border-radius: 10px; padding: 14px; color: var(--ink); background: var(--surface); }
.cv-market-options button strong { display: block; font-size: 16px; margin-bottom: 8px; }
.cv-market-options button small { display: block; font-size: 11px; line-height: 1.6; color: var(--ink-2); }
.cv-language-options button { text-align: center; font-size: 13px; }
.cv-dialog button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cv-selection-meta { min-height: 38px; font-size: 11px !important; }
#cv-download { width: 100%; justify-content: space-between; }
.cv-full-preview { display: block; margin-block: 14px 24px; text-align: center; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; color: var(--accent-ink); }
.cv-letter-link { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--ink-title); font-size: 13px; font-weight: 700; }
.bot { inline-size: min(490px,calc(100vw - 32px)); max-block-size: min(79dvh,760px); grid-template-rows: auto minmax(120px,1fr) auto auto; }
.bot__head { padding: 18px; align-items: center; }
.bot__title { font-size: 19px; font-weight: 800; }
.bot__sub { font-size: 11px; line-height: 1.5; }
.bot__reset { margin-inline-start: auto; width: 28px; height: 28px; flex: none; font-size: 24px; color: var(--ink-2); border-radius: 50%; }
.bot__close { margin-inline-start: 0; }
.bot__log { margin: 0; list-style: none; padding: 18px; min-height: 0; }
.bot__msg { max-inline-size: 100%; font-size: 13px; line-height: 1.65; }
.bot__msg--me { max-inline-size: 90%; }
.bot__response h3 { font-size: 16px; line-height: 1.4; margin: 0 0 10px; letter-spacing: -.3px; }
.bot__response p { margin: 0; font-size: 13px; line-height: 1.65; white-space: pre-line; }
.bot__response ul { margin: 10px 0; padding-inline-start: 18px; }
.bot__response li + li { margin-top: 8px; }
.bot__response .bot__sources { font-size: 10px; color: var(--ink-3); margin-top: 12px; border-top: 1px solid var(--line); padding-top: 9px; }
.bot__response .bot__acts { margin-top: 13px; }
.bot__hints { max-height: 100px; overflow-y: auto; padding: 12px 18px; }
.bot__hint { border-style: solid; background: var(--surface); font-size: 11px; line-height: 1.5; text-align: start; }
.bot__form { padding: 12px 16px; }
.bot__input { border-radius: 10px; font-size: 14px; }
:root[data-theme="dark"] :is(.card, .panel__card, .bot) { color: var(--ink); }
:root[data-theme="dark"] :is(.nav__monogram, .bot__open, .bot__send, .bot__msg--me, .bot__act:hover) { background: #2455D6; color: #FFFFFF; }
:root[data-theme="dark"] :is(.bot__open:hover, .bot__send:hover) { background: #1946B8; color: #FFFFFF; }
.bot__input::placeholder { color: var(--ink-3); opacity: 1; }
@media (max-width: 700px) {
  .cv-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .cv-dialog__head { padding: 12px 16px; }
  .cv-dialog__layout { grid-template-columns: 1fr; }
  .cv-dialog__options { padding: 24px 20px; grid-row: 1; }
  .cv-dialog__preview { padding: 24px; border: 0; border-top: 1px solid var(--line); }
  .cv-dialog__options h2 { font-size: 29px; }
  .cv-dialog fieldset { margin-block: 18px; }
  .cv-paper { max-width: 330px; }
  .bot { inset-inline-end: 12px; inset-block-end: 76px; max-block-size: calc(100dvh - 96px); inline-size: calc(100vw - 24px); }
}
.letters h3 { font-size: 22px; margin-block-end: 12px; }
.letter-downloads { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 18px 30px; }
@media (max-width: 600px) {
  .document-grid, .project-gallery { grid-template-columns: 1fr; }
  .document-card { padding: 20px; }
  .hero__figure--brand { padding: 18px; max-inline-size: 390px; }
  .nav__monogram { width: 29px; height: 30px; font-size: 11px; border-radius: 8px; }
  .nav__brand { font-size: 13px; }
}
