/* oalfawzan.sa — shared visual system
   Loaded directly after each page's local structural CSS. */

:root {
  color-scheme: dark;
  --site-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --site-bg: #010204;
  --site-accent: #007aff;
  --site-text: #ffffff;
  --site-text-muted: rgba(255,255,255,.60);
  --site-text-faint: rgba(255,255,255,.44);

  --site-glass-fill: rgba(255,255,255,.032);
  --site-glass-fill-strong: rgba(255,255,255,.050);
  --site-glass-border: rgba(255,255,255,.13);
  --site-glass-highlight: rgba(255,255,255,.20);
  --site-glass-shadow: rgba(0,0,0,.14);
  --site-glass-blur: 20px;
  --site-glass-saturation: 160%;

  --site-width: 900px;
  --site-page-pad: 16px;
  --site-radius-card: 24px;
  --site-radius-nav: 28px;
  --site-radius-control: 18px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --type-hero: clamp(2.55rem, 6vw, 3.35rem);
  --type-page: clamp(2.20rem, 5vw, 2.85rem);
  --type-section: 1.35rem;
  --type-card: 1.05rem;
  --type-body: .96rem;
  --type-small: .84rem;
  --type-label: .72rem;

  --bg: var(--site-bg);
  --accent: var(--site-accent);
  --text-p: var(--site-text);
  --text-s: var(--site-text-muted);
  --text: var(--site-text);
  --muted: var(--site-text-muted);
  --glass: var(--site-glass-fill);
  --surface: var(--site-glass-fill);
  --surface-strong: var(--site-glass-fill-strong);
  --glass-border: var(--site-glass-border);
  --border: var(--site-glass-border);
  --border-strong: rgba(255,255,255,.22);
  --glass-shine: var(--site-glass-highlight);
}

html[data-theme="light"] {
  color-scheme: light;
  --site-bg: #dce8f5;
  --site-accent: #0062cc;
  --site-text: #111827;
  --site-text-muted: rgba(24,33,49,.76);
  --site-text-faint: rgba(24,33,49,.68);
  --site-glass-fill: rgba(255,255,255,.50);
  --site-glass-fill-strong: rgba(255,255,255,.66);
  --site-glass-border: rgba(255,255,255,.82);
  --site-glass-highlight: rgba(255,255,255,.98);
  --site-glass-shadow: rgba(46,65,90,.16);
  --border-strong: rgba(55,75,102,.28);
}

* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  background: var(--site-bg);
}

body,
button,
input,
textarea,
select {
  font-family: var(--site-font) !important;
}

/* Hide page scrollbars while preserving normal scrolling. */
html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  min-height: 100vh;
  display: flow-root;
  color: var(--site-text) !important;
  font-size: 16px;
  line-height: 1.6;
  background:
    linear-gradient(rgba(13,22,45,.84), rgba(1,2,4,.94)),
    url('/image-1600.webp') center / cover fixed !important;
  background-color: var(--site-bg) !important;
  overflow-x: hidden;
}

html[data-theme="light"] body {
  background:
    url('/image-1600.webp') center / cover fixed !important;
  background-color: var(--site-bg) !important;
}

.container,
body:has(.photo-grid) .container {
  width: 100% !important;
  max-width: var(--site-width) !important;
  margin: 0 auto !important;
  padding-left: var(--site-page-pad) !important;
  padding-right: var(--site-page-pad) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6,
.hero h1,
.page-header h1,
.gallery-title,
.blog-title,
.project-name,
.company,
.tl-title {
  font-family: var(--site-font) !important;
  font-style: normal !important;
}

.hero h1 {
  font-size: var(--type-hero) !important;
  font-weight: 700 !important;
  line-height: 1.06 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

.page-header h1,
body:not(:has(.hero)) > .container > header h1,
body:has(.photo-grid) .hero h1 {
  font-size: var(--type-page) !important;
  font-weight: 700 !important;
  line-height: 1.08 !important;
  letter-spacing: -.035em !important;
  text-wrap: balance;
}

.hero h1 em,
.page-header .accent,
body:has(.photo-grid) .hero h1 em {
  color: var(--site-accent) !important;
  font: inherit !important;
  font-style: normal !important;
}

.gallery-title {
  font-size: var(--type-section) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em !important;
}

.project-name,
.company,
.tl-title,
.blog-title {
  font-size: var(--type-card) !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: -.015em !important;
}

.hero-role,
.headline {
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}

p,
li,
.desc-list,
.hero-sub,
.intro,
.blog-excerpt,
.project-desc,
.tl-body,
.learned-text,
.gallery-copy {
  font-family: var(--site-font) !important;
  font-size: var(--type-body) !important;
  line-height: 1.65 !important;
}

.hero-sub,
.intro,
.blog-excerpt,
.project-desc,
.tl-body,
.learned-text,
.gallery-copy,
.period,
.blog-meta,
.gallery-counter,
footer {
  color: var(--site-text-muted) !important;
}

.section-title,
.worked-label,
.gallery-kicker,
.hero-eyebrow,
.eyebrow,
.blog-tag,
.tl-year,
.learned-label {
  font-family: var(--site-font) !important;
  font-size: var(--type-label) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase;
}

.period,
.blog-meta,
.gallery-counter,
.meta-pill,
.pill,
footer {
  font-family: var(--site-font) !important;
  font-size: var(--type-small) !important;
}

/* Transparent liquid material */
.glass,
.glass-card,
.project-card,
.blog-card,
.social-link,
.meta-pill,
.action-btn,
.pill,
.logo-pill {
  background:
    linear-gradient(145deg, rgba(255,255,255,.045), rgba(255,255,255,.004) 58%),
    var(--site-glass-fill) !important;
  border: 1px solid var(--site-glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--site-glass-highlight),
    0 8px 26px var(--site-glass-shadow) !important;
  -webkit-backdrop-filter: blur(var(--site-glass-blur)) saturate(var(--site-glass-saturation)) !important;
  backdrop-filter: blur(var(--site-glass-blur)) saturate(var(--site-glass-saturation)) !important;
}

html[data-theme="light"] .glass,
html[data-theme="light"] .glass-card,
html[data-theme="light"] .project-card,
html[data-theme="light"] .blog-card,
html[data-theme="light"] .social-link,
html[data-theme="light"] .meta-pill,
html[data-theme="light"] .action-btn,
html[data-theme="light"] .pill,
html[data-theme="light"] .logo-pill {
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(255,255,255,.24) 62%),
    var(--site-glass-fill) !important;
  border-color: var(--site-glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--site-glass-highlight),
    inset 0 -1px 0 rgba(71,85,105,.10),
    0 12px 32px var(--site-glass-shadow) !important;
}

.glass-card,
.project-card { border-radius: var(--site-radius-card) !important; }
.blog-card { border-radius: 20px !important; }

/* Navigation */
.nav,
.nav.glass-card,
body:has(.photo-grid) .nav {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto auto;
  align-items: center !important;
  gap: 8px 10px !important;
  padding: 10px 14px !important;
  margin: 16px 0 38px !important;
  border-radius: var(--site-radius-nav) !important;
  background:
    linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.008) 58%),
    var(--site-glass-fill) !important;
  border: 1px solid var(--site-glass-border) !important;
  box-shadow:
    inset 0 1px 0 var(--site-glass-highlight),
    0 8px 24px var(--site-glass-shadow) !important;
  -webkit-backdrop-filter: blur(var(--site-glass-blur)) saturate(var(--site-glass-saturation)) !important;
  backdrop-filter: blur(var(--site-glass-blur)) saturate(var(--site-glass-saturation)) !important;
}

html[data-theme="light"] .nav,
html[data-theme="light"] .nav.glass-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.30) 62%),
    var(--site-glass-fill) !important;
  box-shadow:
    inset 0 1px 0 var(--site-glass-highlight),
    inset 0 -1px 0 rgba(71,85,105,.10),
    0 12px 32px var(--site-glass-shadow) !important;
}

.nav-name {
  display: block !important;
  grid-column: 1;
  color: var(--site-text) !important;
  font-family: var(--site-font) !important;
  font-size: 1.02rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: -.02em !important;
  white-space: nowrap;
}

.nav-buttons {
  grid-column: 2;
  display: flex !important;
  align-items: center;
  gap: 7px !important;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-buttons::-webkit-scrollbar { display: none; }

.btn-sm {
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 7px 13px !important;
  border-radius: var(--site-radius-control) !important;
  color: var(--site-text) !important;
  font-family: var(--site-font) !important;
  font-size: .80rem !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-decoration: none;
  background: rgba(255,255,255,.035) !important;
  border: 1px solid var(--site-glass-border) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  -webkit-backdrop-filter: blur(12px) saturate(145%) !important;
  backdrop-filter: blur(12px) saturate(145%) !important;
}

html[data-theme="light"] .btn-sm {
  color: var(--site-text) !important;
  background: rgba(255,255,255,.42) !important;
  border-color: rgba(255,255,255,.78) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 3px 10px rgba(46,65,90,.08) !important;
}

.btn-sm.active {
  color: #fff !important;
  background: rgba(0,122,255,.90) !important;
  border-color: rgba(255,255,255,.22) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 3px 10px rgba(0,122,255,.18) !important;
}

.theme-toggle {
  grid-column: 3;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--site-text) !important;
  background: transparent !important;
  cursor: pointer;
}
.theme-toggle svg {
  width: 17px;
  height: 17px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-icon-sun { display: none !important; }
html[data-theme="light"] .theme-icon-sun { display: block !important; }
html[data-theme="light"] .theme-icon-moon { display: none !important; }

/* Shared controls */
.filter-pill,
.social-btn,
.cta-secondary,
.action-btn,
.project-link,
.blog-read {
  font-family: var(--site-font) !important;
  font-size: .82rem !important;
  font-weight: 500 !important;
}

.filter-pill,
.social-btn,
.cta-secondary,
.action-btn:not(.primary) {
  background: rgba(255,255,255,.035) !important;
  border: 1px solid var(--site-glass-border) !important;
  border-radius: var(--site-radius-control) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
  -webkit-backdrop-filter: blur(12px) saturate(145%) !important;
  backdrop-filter: blur(12px) saturate(145%) !important;
}

html[data-theme="light"] .filter-pill,
html[data-theme="light"] .social-btn,
html[data-theme="light"] .cta-secondary,
html[data-theme="light"] .action-btn:not(.primary) {
  color: var(--site-text) !important;
  background: rgba(255,255,255,.44) !important;
  border-color: rgba(255,255,255,.78) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.96), 0 4px 12px rgba(46,65,90,.08) !important;
}

html[data-theme="light"] .btn-sm.active,
html[data-theme="light"] .filter-pill.active,
html[data-theme="light"] .action-btn.primary,
html[data-theme="light"] .cta-primary {
  color: #fff !important;
  background: #0062cc !important;
  border-color: rgba(255,255,255,.62) !important;
}

html[data-theme="light"] .hero-eyebrow {
  color: var(--site-text-faint) !important;
}

html[data-theme="light"] .meta-pill {
  color: var(--site-text-muted) !important;
}

.filter-pill.active,
.action-btn.primary,
.cta-primary {
  color: #fff !important;
  background: rgba(0,122,255,.90) !important;
  border-color: rgba(255,255,255,.20) !important;
}

html[data-theme="light"] .logo-pill img,
html[data-theme="light"] .logo-pill svg {
  filter: brightness(0) !important;
  opacity: .72 !important;
}

html[data-theme="light"] .logo-pill {
  color: var(--site-text) !important;
}

/* Artwork stays intentionally dark in both themes; keep its glyphs legible. */
.blog-cover .site-svg-icon {
  color: rgba(255,255,255,.88) !important;
}

html[data-theme="light"] a[href^="mailto:"] svg {
  fill: var(--site-accent) !important;
}

html[data-theme="light"] body:has(article) article a {
  color: var(--site-accent) !important;
  text-decoration-color: rgba(0,98,204,.45);
}

html[data-theme="light"] body:has(article) article a:hover {
  color: #004fa8 !important;
  text-decoration-color: currentColor;
}

html[data-theme="light"] .project-link:hover,
html[data-theme="light"] .project-link:focus-visible {
  color: #fff !important;
  background: var(--site-accent) !important;
  border-color: var(--site-accent) !important;
}

/* Shared page rhythm */
.hero,
.page-header,
body:has(.photo-grid) .hero { text-align: center; }

.hero img {
  width: 120px;
  height: 120px;
  display: block;
  object-fit: cover;
  border: 2px solid var(--site-glass-border);
  border-radius: 50%;
  margin: 0 auto 24px;
}

.hero-role { color: var(--site-accent) !important; }

.hero { padding: 10px 0 46px !important; }
.page-header,
body:has(.photo-grid) .hero { margin-bottom: 42px !important; }
.section-title { margin-top: 48px !important; margin-bottom: 20px !important; }

/* Blog */
body:has(.blog-grid) .page-header {
  margin-bottom: 28px !important;
}
body:has(.blog-grid) .page-header p {
  max-width: 560px;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: .95rem !important;
  line-height: 1.6 !important;
}
body:has(.blog-grid) .section-title {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}
body:has(.blog-grid) .filter-row {
  gap: 7px !important;
  margin-bottom: 28px !important;
}
body:has(.blog-grid) .filter-pill {
  min-height: 34px !important;
  padding: 7px 13px !important;
}
body:has(.blog-grid) .blog-grid {
  gap: 18px !important;
  margin-bottom: 52px !important;
}
body:has(.blog-grid) .blog-card { margin-bottom: 0 !important; }

/* Experience */
body:has(.exp-item) header { margin-bottom: 44px !important; }
body:has(.exp-item) .glass-card:not(.nav) { padding: 26px !important; }
body:has(.exp-item) .exp-item { margin-bottom: 26px !important; padding-bottom: 26px !important; }
body:has(.exp-item) .pill { border-radius: 12px !important; padding: 5px 10px !important; }

/* Social: unique gallery, same shell and typography */
body:has(.photo-grid) {
  color: var(--site-text) !important;
  font-family: var(--site-font) !important;
  background:
    linear-gradient(rgba(13,22,45,.84), rgba(1,2,4,.94)),
    url('/image-1600.webp') center / cover fixed !important;
}
html[data-theme="light"] body:has(.photo-grid) {
  background:
    url('/image-1600.webp') center / cover fixed !important;
}
body:has(.photo-grid) .hero {
  max-width: 680px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 8px 0 38px !important;
}
body:has(.photo-grid) .hero-sub {
  max-width: 520px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body:has(.photo-grid) .social-row { margin-bottom: 38px !important; }
body:has(.photo-grid) footer { padding: 34px 0 !important; }

/* Privacy */
body:has(article) article.glass-card { padding: 26px !important; }
body:has(article) article h2 {
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 24px 0 7px !important;
}

/* Home */
body:has(.timeline) .worked-section,
body:has(.timeline) .summary-section { margin-bottom: 52px !important; }
body:has(.timeline) .bio-section,
body:has(.timeline) .projects-section { margin-bottom: 64px !important; }

/* SVG primitives and project artwork */
.site-svg-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.learned-label .site-svg-icon { width: 15px; height: 15px; margin-right: 6px; }
.social-icon .site-svg-icon { width: 15px; height: 15px; vertical-align: 0; }
.lightbox-control .site-svg-icon { width: 20px; height: 20px; vertical-align: 0; }

.banner-icon {
  width: 48px;
  height: 48px;
  display: inline-grid;
  place-items: center;
  font-size: 0 !important;
  color: rgba(255,255,255,.92);
}
.banner-icon::before {
  content: '';
  display: block;
  width: 46px;
  height: 46px;
  background: currentColor;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.banner-elhaq .banner-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5V6.8A1.8 1.8 0 0 1 4.8 5h14.4A1.8 1.8 0 0 1 21 6.8v1.7a2.5 2.5 0 0 0 0 5v1.7a1.8 1.8 0 0 1-1.8 1.8H4.8A1.8 1.8 0 0 1 3 15.2v-1.7a2.5 2.5 0 0 0 0-5Z'/%3E%3Cpath d='M9 5v12M15 5v12' stroke-dasharray='1.5 2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5V6.8A1.8 1.8 0 0 1 4.8 5h14.4A1.8 1.8 0 0 1 21 6.8v1.7a2.5 2.5 0 0 0 0 5v1.7a1.8 1.8 0 0 1-1.8 1.8H4.8A1.8 1.8 0 0 1 3 15.2v-1.7a2.5 2.5 0 0 0 0-5Z'/%3E%3Cpath d='M9 5v12M15 5v12' stroke-dasharray='1.5 2'/%3E%3C/svg%3E");
}
.banner-coffee .banner-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h12v5.5A4.5 4.5 0 0 1 11.5 19h-3A4.5 4.5 0 0 1 4 14.5V9Z'/%3E%3Cpath d='M16 11h1.5a2.5 2.5 0 0 1 0 5H16M7 5.5c0 1 1 1 1 2M11 5.5c0 1 1 1 1 2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h12v5.5A4.5 4.5 0 0 1 11.5 19h-3A4.5 4.5 0 0 1 4 14.5V9Z'/%3E%3Cpath d='M16 11h1.5a2.5 2.5 0 0 1 0 5H16M7 5.5c0 1 1 1 1 2M11 5.5c0 1 1 1 1 2'/%3E%3C/svg%3E");
}
.banner-podcast .banner-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='3' width='8' height='12' rx='4'/%3E%3Cpath d='M5.5 11.5a6.5 6.5 0 0 0 13 0M12 18v3M9 21h6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='3' width='8' height='12' rx='4'/%3E%3Cpath d='M5.5 11.5a6.5 6.5 0 0 0 13 0M12 18v3M9 21h6'/%3E%3C/svg%3E");
}
.banner-restate .banner-icon::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 9-7 9 7'/%3E%3Cpath d='M5.5 9.5V20h13V9.5M9 20v-6h6v6'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 11 9-7 9 7'/%3E%3Cpath d='M5.5 9.5V20h13V9.5M9 20v-6h6v6'/%3E%3C/svg%3E");
}

/* Accessibility */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 3px;
}
button, a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img, svg { max-width: 100%; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 10px 14px;
  border-radius: 10px;
  color: #fff;
  background: var(--site-accent);
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: translateY(0); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.lightbox-open { overflow: hidden; }
.lightbox { overscroll-behavior: contain; }

@media (hover:hover) and (pointer:fine) {
  .btn-sm:hover,
  .filter-pill:hover,
  .social-btn:hover,
  .cta-secondary:hover {
    background: var(--site-glass-fill-strong) !important;
    border-color: var(--border-strong) !important;
  }

  .theme-toggle:hover {
    background: var(--site-glass-fill-strong) !important;
  }
}

/* iPhone/touch performance and restrained sizing */
@media (max-width:700px), (pointer:coarse) {
  :root {
    --site-page-pad: 14px;
    --site-glass-blur: 14px;
    --site-glass-saturation: 145%;
    --type-hero: 2.48rem;
    --type-page: 2.20rem;
    --type-section: 1.25rem;
    --type-card: 1.02rem;
    --type-body: .94rem;
  }

  body,
  html[data-theme="light"] body,
  body:has(.photo-grid),
  html[data-theme="light"] body:has(.photo-grid) {
    background-attachment: scroll !important;
  }

  .nav,
  .nav.glass-card,
  body:has(.photo-grid) .nav {
    grid-template-columns: minmax(0,1fr) auto !important;
    gap: 7px 8px !important;
    padding: 10px 12px !important;
    margin: 12px 0 34px !important;
    border-radius: 26px !important;
  }

  .nav-name {
    display: block !important;
    grid-column: 1;
    grid-row: 1;
    font-size: 1rem !important;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    width: 32px;
    height: 32px;
  }

  .nav-buttons {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    gap: 6px !important;
  }

  .btn-sm {
    min-height: 34px !important;
    padding: 7px 12px !important;
    font-size: .78rem !important;
  }

  .hero { padding: 4px 0 38px !important; }
  .page-header,
  body:has(.photo-grid) .hero { margin-bottom: 34px !important; }
  .section-title { margin-top: 40px !important; margin-bottom: 18px !important; }

  body:has(.blog-grid) .page-header { margin-bottom: 24px !important; }
  body:has(.blog-grid) .section-title { margin-top: 0 !important; margin-bottom: 14px !important; }
  body:has(.blog-grid) .filter-row { margin-bottom: 24px !important; }

  .glass,
  .glass-card,
  .project-card,
  .blog-card,
  .social-link,
  .nav {
    -webkit-backdrop-filter: blur(14px) saturate(145%) !important;
    backdrop-filter: blur(14px) saturate(145%) !important;
  }

  body:has(.exp-item) .glass-card:not(.nav),
  body:has(article) article.glass-card { padding: 22px !important; }

  .photo-item:hover img { transform: none !important; }
}

@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Theme rules moved out of parser-blocking JavaScript so they can be cached as CSS. */
html[data-theme="dark"]{background-color:#1b2942!important}
    html[data-theme="dark"] body{background-color:#1b2942!important}

    html[data-theme="light"][data-theme="light"]{
      color-scheme:light;
      --site-bg:#e7eff8!important;
      --site-accent:#0062cc!important;
      --site-text:#0f172a!important;
      --site-text-muted:#334155!important;
      --site-text-faint:#415166!important;
      --site-glass-fill:rgba(255,255,255,.70)!important;
      --site-glass-fill-strong:rgba(255,255,255,.84)!important;
      --site-glass-border:rgba(71,85,105,.16)!important;
      --site-glass-highlight:rgba(255,255,255,.96)!important;
      --site-glass-shadow:rgba(38,55,78,.13)!important;
      --site-glass-blur:22px!important;
      --site-glass-saturation:135%!important;
      --border-strong:rgba(51,65,85,.30)!important;
      background-color:#e7eff8!important
    }

    html[data-theme="light"][data-theme="light"] body,
    html[data-theme="light"][data-theme="light"] body:has(.photo-grid){
      position:relative!important;
      isolation:isolate!important;
      color:var(--site-text)!important;
      background:var(--site-bg)!important
    }

    html[data-theme="light"][data-theme="light"] body::before,
    html[data-theme="light"][data-theme="light"] body:has(.photo-grid)::before{
      content:""!important;
      position:fixed!important;
      inset:-34px!important;
      z-index:-1!important;
      pointer-events:none!important;
      background:
        linear-gradient(rgba(231,239,248,.82),rgba(231,239,248,.86)),
        url('/image-1600.webp') center/cover no-repeat!important;
      filter:blur(22px) saturate(.72) brightness(1.06)!important;
      -webkit-filter:blur(22px) saturate(.72) brightness(1.06)!important;
      transform:scale(1.08)!important;
      transform-origin:center!important
    }

    body{
      min-height:100dvh;
      padding-left:env(safe-area-inset-left,0px);
      padding-right:env(safe-area-inset-right,0px)
    }

    @supports(padding:max(0px)){
      .container{
        padding-left:max(var(--site-page-pad,16px),env(safe-area-inset-left,0px))!important;
        padding-right:max(var(--site-page-pad,16px),env(safe-area-inset-right,0px))!important
      }
    }

    html[data-theme="light"][data-theme="light"] h1,
    html[data-theme="light"][data-theme="light"] h2,
    html[data-theme="light"][data-theme="light"] h3,
    html[data-theme="light"][data-theme="light"] h4,
    html[data-theme="light"][data-theme="light"] .nav-name,
    html[data-theme="light"][data-theme="light"] .company,
    html[data-theme="light"][data-theme="light"] .tl-title,
    html[data-theme="light"][data-theme="light"] .project-name,
    html[data-theme="light"][data-theme="light"] .blog-title,
    html[data-theme="light"][data-theme="light"] .gallery-title{
      color:var(--site-text)!important
    }

    html[data-theme="light"][data-theme="light"] .hero-sub,
    html[data-theme="light"][data-theme="light"] .intro,
    html[data-theme="light"][data-theme="light"] .blog-excerpt,
    html[data-theme="light"][data-theme="light"] .project-desc,
    html[data-theme="light"][data-theme="light"] .tl-body,
    html[data-theme="light"][data-theme="light"] .learned-text,
    html[data-theme="light"][data-theme="light"] .gallery-copy,
    html[data-theme="light"][data-theme="light"] .period,
    html[data-theme="light"][data-theme="light"] .blog-meta,
    html[data-theme="light"][data-theme="light"] .gallery-counter,
    html[data-theme="light"][data-theme="light"] footer,
    html[data-theme="light"][data-theme="light"] body:has(article) article p,
    html[data-theme="light"][data-theme="light"] body:has(article) article li{
      color:var(--site-text-muted)!important
    }

    html[data-theme="light"][data-theme="light"] .hero-sub,
    html[data-theme="light"][data-theme="light"] .intro,
    html[data-theme="light"][data-theme="light"] .blog-excerpt,
    html[data-theme="light"][data-theme="light"] .project-desc,
    html[data-theme="light"][data-theme="light"] .tl-body,
    html[data-theme="light"][data-theme="light"] .learned-text,
    html[data-theme="light"][data-theme="light"] .gallery-copy,
    html[data-theme="light"][data-theme="light"] .summary-section .glass-card>p,
    html[data-theme="light"][data-theme="light"] body:has(article) article p,
    html[data-theme="light"][data-theme="light"] body:has(article) article li{
      font-weight:400!important
    }

    html[data-theme="light"][data-theme="light"] .section-title,
    html[data-theme="light"][data-theme="light"] .worked-label,
    html[data-theme="light"][data-theme="light"] .hero-eyebrow,
    html[data-theme="light"][data-theme="light"] .meta-pill{
      color:var(--site-text-faint)!important
    }

    html[data-theme="light"][data-theme="light"] .section-title::after{
      background:rgba(51,65,85,.22)!important
    }

    html[data-theme="light"][data-theme="light"] .hero-role,
    html[data-theme="light"][data-theme="light"] .headline,
    html[data-theme="light"][data-theme="light"] .tl-year,
    html[data-theme="light"][data-theme="light"] .blog-tag,
    html[data-theme="light"][data-theme="light"] .gallery-kicker,
    html[data-theme="light"][data-theme="light"] .eyebrow,
    html[data-theme="light"][data-theme="light"] .learned-label,
    html[data-theme="light"][data-theme="light"] .page-header p .accent,
    html[data-theme="light"][data-theme="light"] .blog-read,
    html[data-theme="light"][data-theme="light"] body:has(article) article a{
      color:#004ea6!important
    }

    html[data-theme="light"][data-theme="light"] .glass,
    html[data-theme="light"][data-theme="light"] .glass-card,
    html[data-theme="light"][data-theme="light"] .project-card,
    html[data-theme="light"][data-theme="light"] .blog-card,
    html[data-theme="light"][data-theme="light"] .social-link,
    html[data-theme="light"][data-theme="light"] .meta-pill,
    html[data-theme="light"][data-theme="light"] .pill,
    html[data-theme="light"][data-theme="light"] .logo-pill{
      background:
        linear-gradient(145deg,rgba(255,255,255,.88),rgba(255,255,255,.54) 62%),
        var(--site-glass-fill)!important;
      border-color:var(--site-glass-border)!important;
      box-shadow:
        inset 0 1px 0 var(--site-glass-highlight),
        inset 0 -1px 0 rgba(51,65,85,.06),
        0 12px 30px var(--site-glass-shadow)!important;
      -webkit-backdrop-filter:blur(var(--site-glass-blur)) saturate(var(--site-glass-saturation))!important;
      backdrop-filter:blur(var(--site-glass-blur)) saturate(var(--site-glass-saturation))!important
    }

    html[data-theme="light"][data-theme="light"] .nav,
    html[data-theme="light"][data-theme="light"] .nav.glass-card,
    html[data-theme="light"][data-theme="light"] body:has(.photo-grid) .nav{
      background:
        linear-gradient(145deg,rgba(255,255,255,.93),rgba(255,255,255,.62) 64%),
        rgba(255,255,255,.72)!important;
      border-color:rgba(71,85,105,.15)!important;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.98),
        0 12px 28px rgba(38,55,78,.12)!important
    }

    html[data-theme="light"][data-theme="light"] .btn-sm,
    html[data-theme="light"][data-theme="light"] .filter-pill,
    html[data-theme="light"][data-theme="light"] .social-btn,
    html[data-theme="light"][data-theme="light"] .cta-secondary,
    html[data-theme="light"][data-theme="light"] .action-btn:not(.primary),
    html[data-theme="light"][data-theme="light"] .project-link{
      color:var(--site-text)!important;
      background:rgba(255,255,255,.64)!important;
      border-color:rgba(71,85,105,.18)!important;
      box-shadow:inset 0 1px 0 rgba(255,255,255,.94),0 3px 10px rgba(38,55,78,.06)!important
    }

    html[data-theme="light"][data-theme="light"] .btn-sm.active,
    html[data-theme="light"][data-theme="light"] .filter-pill.active,
    html[data-theme="light"][data-theme="light"] .action-btn.primary,
    html[data-theme="light"][data-theme="light"] .cta-primary{
      color:#fff!important;
      background:var(--site-accent)!important;
      border-color:rgba(255,255,255,.58)!important;
      box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 4px 14px rgba(0,98,204,.20)!important
    }

    html[data-theme="light"][data-theme="light"] .theme-toggle{
      color:#1e293b!important;
      background:rgba(255,255,255,.55)!important;
      border:1px solid rgba(71,85,105,.14)!important;
      box-shadow:inset 0 1px 0 rgba(255,255,255,.95)!important
    }

    html[data-theme="light"][data-theme="light"] .timeline::before{
      background:linear-gradient(to bottom,var(--site-accent),rgba(0,98,204,.18))!important
    }

    html[data-theme="light"][data-theme="light"] .tl-dot{
      background:#f8fbff!important;
      border-color:var(--site-accent)!important;
      box-shadow:0 0 0 3px rgba(0,98,204,.08),0 0 12px rgba(0,98,204,.20)!important
    }

    html[data-theme="light"][data-theme="light"] .tl-dot.big{
      background:var(--site-accent)!important
    }

    html[data-theme="light"][data-theme="light"] .ptag{
      background:rgba(0,98,204,.08)!important;
      border-color:rgba(0,98,204,.20)!important;
      color:#004ea6!important
    }

    html[data-theme="light"][data-theme="light"] .ptag.year{
      background:rgba(15,23,42,.045)!important;
      border-color:rgba(71,85,105,.14)!important;
      color:var(--site-text-muted)!important
    }

    html[data-theme="light"][data-theme="light"] .project-learned{
      background:rgba(219,234,254,.58)!important;
      border-color:rgba(0,98,204,.16)!important
    }

    html[data-theme="light"][data-theme="light"] .logo-pill svg{
      filter:none!important;
      opacity:.82!important;
      color:#1e293b!important;
      fill:#1e293b!important
    }

    html[data-theme="light"][data-theme="light"] .logo-pill svg [fill="white"],
    html[data-theme="light"][data-theme="light"] .logo-pill svg [fill="#fff"],
    html[data-theme="light"][data-theme="light"] .logo-pill svg [fill="#ffffff"],
    html[data-theme="light"][data-theme="light"] .logo-pill svg [fill="#FFFFFF"]{
      fill:#1e293b!important
    }

    html[data-theme="light"][data-theme="light"] .logo-pill img{
      filter:brightness(0) saturate(100%)!important;
      opacity:.78!important
    }

    html[data-theme="light"][data-theme="light"] .blog-cover{
      border-bottom:1px solid rgba(15,23,42,.10)!important
    }

    html[data-theme="light"][data-theme="light"] .blog-meta{
      border-top-color:rgba(51,65,85,.16)!important
    }

    html[data-theme="light"][data-theme="light"] body:has(.exp-item) .exp-item{
      border-bottom-color:rgba(51,65,85,.16)!important
    }

    html[data-theme="light"][data-theme="light"] .social-link{
      color:var(--site-text)!important
    }

    html[data-theme="light"][data-theme="light"] a[href^="mailto:"] svg{
      fill:var(--site-accent)!important
    }

    html[data-theme="light"][data-theme="light"] body:has(article) article h2{
      color:var(--site-text)!important
    }

    html[data-theme="light"][data-theme="light"] body:has(.photo-grid) .hero h1 em{
      color:var(--site-accent)!important
    }

    html[data-theme="light"][data-theme="light"] body:has(.photo-grid) .social-icon{
      color:#334155!important;
      background:rgba(15,23,42,.06)!important
    }

    html[data-theme="light"][data-theme="light"] body:has(.photo-grid) .photo-item{
      border-color:rgba(71,85,105,.16)!important;
      background:rgba(255,255,255,.50)!important;
      box-shadow:0 8px 24px rgba(38,55,78,.10)!important
    }

    html[data-theme="light"][data-theme="light"] .lightbox,
    html[data-theme="light"][data-theme="light"] .lightbox-control,
    html[data-theme="light"][data-theme="light"] .lightbox-info{
      color:#fff!important
    }

    @media(hover:hover) and (pointer:fine){
      html[data-theme="light"][data-theme="light"] .btn-sm:not(.active):hover,
      html[data-theme="light"][data-theme="light"] .filter-pill:not(.active):hover,
      html[data-theme="light"][data-theme="light"] .social-btn:hover,
      html[data-theme="light"][data-theme="light"] .cta-secondary:hover,
      html[data-theme="light"][data-theme="light"] .action-btn:not(.primary):hover{
        color:#0f172a!important;
        background:rgba(255,255,255,.86)!important;
        border-color:rgba(51,65,85,.28)!important
      }

      html[data-theme="light"][data-theme="light"] .theme-toggle:hover{
        background:rgba(255,255,255,.86)!important;
        border-color:rgba(51,65,85,.22)!important
      }

      html[data-theme="light"][data-theme="light"] .social-link:hover,
      html[data-theme="light"][data-theme="light"] .project-card:hover,
      html[data-theme="light"][data-theme="light"] .blog-card:hover{
        border-color:rgba(0,98,204,.28)!important;
        box-shadow:inset 0 1px 0 rgba(255,255,255,.98),0 14px 34px rgba(38,55,78,.15)!important
      }
    }

    @media(max-width:700px),(pointer:coarse){
      html[data-theme="light"][data-theme="light"]{
        --site-glass-blur:16px!important;
        --site-glass-saturation:125%!important
      }

      html[data-theme="light"][data-theme="light"] body::before,
      html[data-theme="light"][data-theme="light"] body:has(.photo-grid)::before{
        inset:-26px!important;
        filter:blur(18px) saturate(.70) brightness(1.06)!important;
        -webkit-filter:blur(18px) saturate(.70) brightness(1.06)!important;
        transform:scale(1.09)!important
      }
    }

    @supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
      html[data-theme="light"][data-theme="light"] .glass,
      html[data-theme="light"][data-theme="light"] .glass-card,
      html[data-theme="light"][data-theme="light"] .project-card,
      html[data-theme="light"][data-theme="light"] .blog-card,
      html[data-theme="light"][data-theme="light"] .social-link,
      html[data-theme="light"][data-theme="light"] .nav{
        background:rgba(248,251,255,.94)!important
      }
    }

/* Footer trust/navigation links */
footer a {
  color: inherit;
  text-decoration-color: currentColor;
  text-underline-offset: .18em;
}
footer a:hover,
footer a:focus-visible {
  color: var(--site-accent);
}
