@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── Design tokens (dark, default) ──────────────────── */
:root {
  --deep:       #060c1a;
  --navy:       #0a1528;
  --navy-md:    #0f1e3a;
  --navy-lt:    #162444;
  --sky:        #4a9fd4;
  --sky-lt:     #7bc0e8;
  --sky-pale:   rgba(74,159,212,.08);
  --gold:       #c9a850;
  --gold-lt:    #e8c97a;
  --gold-pale:  rgba(201,168,80,.10);
  --cream:      #e8e4d8;
  --white:      #ffffff;
  --muted:      rgba(232,228,216,.52);
  --border:     rgba(74,159,212,.18);
  --border-g:   rgba(201,168,80,.25);
  --sh:         0 8px 40px rgba(6,12,26,.6);
  --sh-lg:      0 20px 80px rgba(6,12,26,.8);
  --glow-sky:   0 0 0 3px rgba(74,159,212,.15);
  --glow-gold:  0 0 0 3px rgba(201,168,80,.20);
  --ease:       cubic-bezier(.4,0,.2,1);
  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'Inter', system-ui, sans-serif;
  --r:          12px;
  --r-lg:       20px;
  --nav-h:      68px;
}

/* ── Light mode overrides ────────────────────────────── */
[data-theme="light"] {
  --deep:       #f7f3ea;
  --navy:       #efeadf;
  --navy-md:    #ffffff;
  --navy-lt:    #f4efe3;
  --sky:        #2c5f8a;
  --sky-lt:     #4a86b5;
  --sky-pale:   rgba(44,95,138,.06);
  --gold:       #a8843a;
  --gold-lt:    #c19848;
  --gold-pale:  rgba(168,132,58,.08);
  --cream:      #2b2418;
  --white:      #15110a;
  --muted:      rgba(43,36,24,.55);
  --border:     rgba(44,95,138,.18);
  --border-g:   rgba(168,132,58,.32);
  --sh:         0 10px 36px rgba(60,40,15,.07);
  --sh-lg:      0 24px 60px rgba(60,40,15,.10);
}
[data-theme="light"] .hero-stat { background: rgba(255,255,255,.85); }
[data-theme="light"] .nav-cta { color: #f7f3ea !important; }
[data-theme="light"] #pcanvas { opacity: .22; }
[data-theme="light"] body::before { opacity: .14; }
[data-theme="light"] #nav { border-bottom-color: var(--border); }
[data-theme="light"] #nav.scrolled { background: rgba(247,243,234,.94); }
[data-theme="light"] .tl-line { background: var(--border); }

/* ── Base reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--deep); color: var(--cream); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background .3s var(--ease), color .3s var(--ease); }
img { max-width: 100%; display: block; border-radius: var(--r); }
a { color: inherit; text-decoration: none; }

/* ── Canvas + drift bg ────────────────────────────────── */
#pcanvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(74,159,212,.25) 1px, transparent 1px), radial-gradient(circle, rgba(201,168,80,.14) 1px, transparent 1px);
  background-size: 62px 62px, 94px 94px;
  animation: driftBg 28s linear infinite; opacity: .5;
}
@keyframes driftBg { to { background-position: 62px 62px, 94px 94px; } }

/* ── Layout utilities ────────────────────────────────── */
.section { position: relative; z-index: 1; padding: 120px 0; }
.section.alt { background: var(--navy); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.eyebrow { font-size: .68rem; letter-spacing: .42em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin-bottom: 12px; display: block; }
.section-title { font-family: var(--serif); font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 300; color: var(--white); line-height: 1.08; margin-bottom: 10px; letter-spacing: -.012em; }
.section-title em { font-style: italic; color: var(--gold-lt); }
.section-sub { color: var(--muted); font-size: .9rem; max-width: 540px; line-height: 1.65; }
.section-head { margin-bottom: 56px; }
.gold-bar { display: block; width: 64px; height: 1px; background: var(--gold); margin: 18px 0 22px; }

/* ── Section dividers (gold hairline rhythm) ─────── */
.section + .section { position: relative; }
.section + .section::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 100px; height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: .35; pointer-events: none;
}

/* ── Eyebrow refinement ──────────────────────────── */
.eyebrow { font-weight: 500; }

/* ── Card hover polish ───────────────────────────── */
.proj-card, .lab-card, .cert-card, .award-card, .testi-card, .press-card { transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }

/* ── Pull quote refinement ───────────────────────── */
.proj-card blockquote { background: var(--sky-pale); border-radius: 0 var(--r-sm, 8px) var(--r-sm, 8px) 0; }

/* ── Subtle stat number weight refinement ────────── */
.ach-n, .hero-stat-n, .about-mini-n { font-feature-settings: 'lnum' 1, 'tnum' 1; }

.tag { display: inline-flex; align-items: center; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; background: var(--sky-pale); color: var(--sky-lt); border: 1px solid var(--border); padding: 3px 9px; border-radius: 40px; font-weight: 500; white-space: nowrap; }
.tag.gold { background: var(--gold-pale); color: var(--gold-lt); border-color: var(--border-g); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; } .reveal.d4 { transition-delay: .4s; }
.reveal.revealed { opacity: 1; transform: none; }

/* ── Navigation ──────────────────────────────────────── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: var(--nav-h); padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
#nav.scrolled { background: rgba(6,12,26,.93); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-color: var(--border); box-shadow: 0 4px 32px rgba(6,12,26,.5); }
.nav-brand { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; color: var(--white); flex-shrink: 0; }
.nav-brand span { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 8px; }
#nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-link { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 500; color: var(--muted); transition: color .25s var(--ease); }
.nav-link:hover, .nav-link.active { color: var(--sky-lt); }
.nav-cta { background: var(--gold); color: var(--deep) !important; padding: 7px 16px; border-radius: 6px; font-weight: 600 !important; transition: all .3s var(--ease) !important; letter-spacing: .08em !important; }
.nav-cta:hover { background: var(--gold-lt); transform: translateY(-1px); }
.theme-toggle { width: 36px; height: 36px; border-radius: 8px; background: var(--sky-pale); border: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: all .3s var(--ease); flex-shrink: 0; }
.theme-toggle:hover { border-color: var(--sky); background: rgba(74,159,212,.14); }
#mob-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px 2px; }
#mob-toggle span { display: block; width: 22px; height: 2px; background: var(--cream); border-radius: 2px; transition: all .3s var(--ease); }

/* ── Hero ────────────────────────────────────────────── */
#hero { min-height: 100vh; display: flex; align-items: center; padding: calc(var(--nav-h) + 110px) 40px 80px; position: relative; z-index: 1; }
.hero-wrap { max-width: 1180px; margin: 0 auto; width: 100%; display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: center; }
.hero-tag { display: inline-flex; gap: 8px; align-items: center; background: rgba(74,159,212,.08); border: 1px solid var(--border); border-radius: 40px; padding: 6px 16px; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sky-lt); font-weight: 500; margin-bottom: 26px; backdrop-filter: blur(8px); }
.hero-tag::before { content: '✦'; color: var(--gold); }
.hero-name { font-family: var(--serif); font-size: clamp(3.4rem, 7vw, 5.8rem); font-weight: 300; color: var(--white); line-height: 1.0; letter-spacing: -.01em; margin-bottom: 16px; }
.hero-role { font-size: clamp(.95rem, 1.8vw, 1.15rem); font-weight: 300; color: var(--sky-lt); letter-spacing: .04em; min-height: 1.8em; display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.cursor { display: inline-block; width: 2px; height: 1.1em; background: var(--gold); vertical-align: middle; animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { font-size: .93rem; color: var(--muted); max-width: 520px; margin-bottom: 36px; line-height: 1.72; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 52px; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 12px 24px; border-radius: 8px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; cursor: pointer; transition: all .3s var(--ease); border: none; position: relative; overflow: hidden; text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--deep); }
.btn-gold::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); transform: translateX(-100%); transition: transform .5s; }
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201,168,80,.3); }
.btn-gold:hover::after { transform: translateX(100%); }
.btn-outline { background: transparent; color: var(--cream); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--sky); color: var(--white); background: var(--sky-pale); transform: translateY(-2px); }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; backdrop-filter: blur(8px); }
.hero-stat { background: rgba(10,21,40,.72); padding: 18px 14px; text-align: center; }
[data-theme="light"] .hero-stat { background: rgba(255,255,255,.8); }
.hero-stat-n { font-family: var(--serif); font-size: 2rem; font-weight: 400; color: var(--white); line-height: 1; }
.hero-stat-l { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 5px; font-weight: 500; line-height: 1.3; }

/* Hero photo */
.hero-photo-wrap { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.hero-photo-slot { width: 320px; height: 400px; border-radius: 24px; overflow: hidden; border: 1px solid var(--border-g); box-shadow: var(--sh-lg); position: relative; }
image-slot { width: 100%; height: 100%; display: block; }
.hero-badge { background: var(--navy-md); border: 1px solid var(--border-g); border-radius: var(--r-lg); padding: 14px 18px; display: flex; gap: 12px; align-items: center; width: 100%; }
.hero-badge-icon { width: 36px; height: 36px; border-radius: 8px; background: var(--gold-pale); border: 1px solid var(--border-g); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; }
.hero-badge-text { font-size: .75rem; font-weight: 600; color: var(--white); line-height: 1.3; }
.hero-badge-sub { font-size: .68rem; color: var(--muted); }

/* ── About ───────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.about-body p { font-size: .95rem; line-height: 1.78; color: var(--cream); margin-bottom: 18px; }
.about-body strong { color: var(--white); font-weight: 600; }
.quote-card { background: var(--navy-md); border: 1px solid var(--border-g); border-radius: var(--r-lg); padding: 26px 28px 22px; box-shadow: var(--sh); position: relative; overflow: hidden; margin-bottom: 16px; }
.quote-card::before { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; background: radial-gradient(circle at top right, rgba(201,168,80,.1), transparent 70%); }
.quote-mark { font-family: var(--serif); font-size: 3.5rem; color: var(--gold); line-height: .8; margin-bottom: 8px; opacity: .6; }
.quote-text { font-family: var(--serif); font-size: 1.05rem; font-style: italic; font-weight: 300; color: var(--cream); line-height: 1.55; margin-bottom: 16px; }
.quote-attr { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); font-weight: 600; }
.quote-attr span { display: block; color: var(--muted); font-size: .65rem; letter-spacing: .1em; margin-top: 2px; }
.about-mini-grid { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.about-mini-stat { text-align: center; }
.about-mini-n { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; color: var(--white); }
.about-mini-l { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin-top: 3px; }

/* ── Timeline ─────────────────────────────────────────── */
.timeline { position: relative; }
.tl-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--border); transform: translateX(-50%); overflow: hidden; }
.tl-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: linear-gradient(to bottom, var(--gold), var(--sky)); transition: height 2.6s cubic-bezier(.16,1,.3,1); }
.tl-item { display: grid; grid-template-columns: 1fr 56px 1fr; margin-bottom: 56px; align-items: start; }
.tl-item:last-child { margin-bottom: 0; }
.tl-l { padding-right: 36px; }
.tl-r { padding-left: 36px; }
.tl-c { display: flex; flex-direction: column; align-items: center; padding-top: 8px; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--navy); border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(201,168,80,.18), 0 0 0 6px rgba(201,168,80,.06); flex-shrink: 0; }
.tl-dot.sky { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(74,159,212,.15); }
.tl-card { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--sh); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.tl-card:hover { border-color: var(--sky); transform: translateY(-2px); }
.tl-card.feat { border-color: var(--gold); }
.tl-card.feat:hover { border-color: var(--gold-lt); }
.tl-co { font-size: .65rem; letter-spacing: .24em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin-bottom: 5px; }
.tl-role { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; color: var(--white); margin-bottom: 4px; line-height: 1.2; }
.tl-meta { display: flex; align-items: center; gap: 8px; font-size: .7rem; color: var(--muted); margin-bottom: 13px; flex-wrap: wrap; }
.tl-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.tl-list { list-style: none; display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.tl-list li { font-size: .82rem; color: var(--cream); padding-left: 14px; position: relative; line-height: 1.55; }
.tl-list li::before { content: '✦'; position: absolute; left: 0; font-size: .48rem; top: 5px; color: var(--gold); }
.tl-tags { display: flex; flex-wrap: wrap; gap: 5px; }

/* ── Projects ─────────────────────────────────────────── */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.proj-card { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh); transition: all .3s var(--ease); display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.proj-card::before { content: ''; position: absolute; top: 0; right: 0; width: 100px; height: 100px; background: radial-gradient(circle at top right, rgba(74,159,212,.05), transparent 70%); pointer-events: none; }
.proj-card:hover { border-color: var(--sky); transform: translateY(-4px); box-shadow: 0 20px 56px rgba(6,12,26,.65); }
.proj-card.feat { border-color: var(--gold); }
.proj-card.feat::before { background: radial-gradient(circle at top right, rgba(201,168,80,.07), transparent 70%); }
.proj-card.feat:hover { border-color: var(--gold-lt); }
.proj-card.wide { grid-column: span 2; }
.proj-img { width: 100%; height: 160px; object-fit: cover; border-radius: var(--r); border: 1px solid var(--border); margin-bottom: 4px; }
.proj-icon { width: 42px; height: 42px; border-radius: 10px; background: var(--sky-pale); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.proj-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; color: var(--white); line-height: 1.2; }
.proj-desc { font-size: .82rem; color: var(--muted); line-height: 1.62; flex: 1; }
.proj-metric { background: var(--sky-pale); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.proj-metric strong { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--white); font-weight: 400; line-height: 1.1; }
.proj-metric-l { font-size: .72rem; color: var(--sky-lt); font-weight: 500; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }

/* ── Skills ───────────────────────────────────────────── */
.skills-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.skill-cat-label { font-size: .63rem; letter-spacing: .28em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.skill-cat-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.skill-item { margin-bottom: 15px; }
.skill-row { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .82rem; color: var(--cream); font-weight: 500; }
.skill-pct { color: var(--muted); font-size: .75rem; }
.skill-bar { height: 4px; background: var(--navy-lt); border-radius: 2px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 2px; width: 0; transition: width 1.4s cubic-bezier(.16,1,.3,1); background: linear-gradient(90deg, var(--sky), var(--sky-lt)); }
.skill-fill.gold { background: linear-gradient(90deg, var(--gold), var(--gold-lt)); }

/* ── Skill chips (text-based, no bars) ───────────── */
.skill-block { margin-bottom: 38px; }
.skill-block:last-child { margin-bottom: 0; }
.skill-cat-label.gold { color: var(--gold); }
.skill-cat-label.gold::after { background: linear-gradient(to right, var(--border-g), transparent); }
.skill-intro { font-size: .86rem; color: var(--muted); line-height: 1.65; margin: 0 0 16px; max-width: 480px; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; font-size: .76rem; color: var(--cream); background: var(--navy-md); border: 1px solid var(--border); padding: 6px 13px; border-radius: 40px; font-weight: 500; line-height: 1.3; transition: all .25s var(--ease); }
.chip:hover { border-color: var(--sky); color: var(--white); transform: translateY(-1px); }
.chip.gold { color: var(--gold-lt); border-color: var(--border-g); background: var(--gold-pale); }
.chip.gold:hover { border-color: var(--gold-lt); color: var(--white); }

/* ── Innovation Lab ───────────────────────────────────── */
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lab-card { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh); transition: all .3s var(--ease); position: relative; overflow: hidden; }
.lab-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--gold), var(--sky)); transform: scaleX(0); transition: transform .4s var(--ease); transform-origin: left; }
.lab-card:hover { border-color: var(--sky); transform: translateY(-4px); }
.lab-card:hover::after { transform: scaleX(1); }
.lab-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--sky-pale); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 16px; }
.lab-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 400; color: var(--white); margin-bottom: 8px; line-height: 1.2; }
.lab-body { font-size: .82rem; color: var(--muted); line-height: 1.62; }
.lab-status { display: inline-block; margin-top: 14px; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
.lab-status.exploring { color: var(--sky); }
.lab-status.concept { color: var(--gold); }

/* ── Certifications ───────────────────────────────────── */
.certs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cert-card { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 18px 16px; box-shadow: var(--sh); transition: all .3s var(--ease); }
.cert-card:hover { border-color: var(--sky); transform: translateY(-2px); }
.cert-card.premium { border-color: var(--border-g); }
.cert-card.premium:hover { border-color: var(--gold-lt); box-shadow: 0 8px 40px rgba(201,168,80,.1); }
.cert-badge { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 700; letter-spacing: .04em; margin-bottom: 10px; }
.cert-badge.sky { background: var(--sky-pale); color: var(--sky-lt); border: 1px solid var(--border); }
.cert-badge.gld { background: var(--gold-pale); color: var(--gold-lt); border: 1px solid var(--border-g); }
.cert-name { font-size: .85rem; font-weight: 600; color: var(--white); line-height: 1.3; margin-bottom: 4px; }
.cert-issuer { font-size: .7rem; color: var(--muted); margin-bottom: 8px; }
.cert-year { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); font-weight: 600; }

/* ── Achievements ─────────────────────────────────────── */
.ach-counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 52px; }
.ach-stat { background: var(--navy-md); padding: 36px 20px; text-align: center; }
.ach-n { font-family: var(--serif); font-size: clamp(2.6rem, 4.5vw, 4rem); font-weight: 300; color: var(--white); line-height: 1; }
.ach-l { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 8px; font-weight: 500; }
.awards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.award-card { background: var(--navy-md); border: 1px solid var(--border-g); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh); position: relative; overflow: hidden; }
.award-card::before { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; background: radial-gradient(circle at top right, rgba(201,168,80,.09), transparent 70%); }
.award-ico { font-size: 1.5rem; margin-bottom: 10px; }
.award-title { font-family: var(--serif); font-size: 1.08rem; font-weight: 400; color: var(--white); margin-bottom: 6px; line-height: 1.2; }
.award-body { font-size: .78rem; color: var(--muted); line-height: 1.55; }
.award-yr { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: 12px; display: block; }

/* ── Speaking Gallery ─────────────────────────────────── */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.gallery-img { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--border); box-shadow: var(--sh-lg); object-fit: cover; max-height: 400px; }
.gallery-text { display: flex; flex-direction: column; gap: 16px; }
.gallery-event { background: var(--navy-md); border: 1px solid var(--border-g); border-radius: var(--r-lg); padding: 20px 22px; }
.gallery-event-title { font-family: var(--serif); font-size: 1.15rem; color: var(--white); margin-bottom: 4px; }
.gallery-event-sub { font-size: .8rem; color: var(--muted); line-height: 1.55; }
.gallery-event-date { font-size: .65rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: 10px; display: block; }

/* ── Contact ──────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 18px; }
.c-item { display: flex; align-items: flex-start; gap: 14px; }
.c-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--sky-pale); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .9rem; flex-shrink: 0; color: var(--sky-lt); font-family: var(--sans); font-weight: 600; font-size: .75rem; }
.c-body { display: flex; flex-direction: column; gap: 2px; }
.c-label { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sky); font-weight: 600; }
.c-val { font-size: .9rem; color: var(--cream); }
.c-val a:hover { color: var(--sky-lt); text-decoration: underline; }
.contact-form { display: flex; flex-direction: column; gap: 14px; }
.f-group { display: flex; flex-direction: column; gap: 6px; }
.f-label { font-size: .65rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sky); font-weight: 600; }
.f-input, .f-textarea { background: var(--navy-lt); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 16px; color: var(--cream); font-family: var(--sans); font-size: .88rem; outline: none; transition: all .3s var(--ease); width: 100%; }
.f-input:focus, .f-textarea:focus { border-color: var(--sky); background: var(--navy-md); box-shadow: var(--glow-sky); }
.f-textarea { min-height: 110px; resize: vertical; }
::placeholder { color: var(--muted); }

/* ── Phone Request (privacy + animated) ─────────── */
.phone-request {
  background: var(--navy-md); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 12px; cursor: pointer; font-family: var(--sans);
  display: inline-flex; align-items: center; gap: 8px; color: var(--cream);
  transition: all .35s var(--ease); position: relative; overflow: hidden;
}
.phone-request::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201,168,80,.12), transparent);
  transform: translateX(-100%); transition: transform .8s var(--ease);
}
.phone-request:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 6px 24px rgba(201,168,80,.15); }
.phone-request:hover::before { transform: translateX(100%); }
.phone-lock { font-size: .78rem; opacity: .8; animation: lockPulse 2.4s ease-in-out infinite; }
@keyframes lockPulse { 0%,100% { opacity: .6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
.phone-redact { display: inline-flex; gap: 3px; align-items: center; }
.phone-redact .ast { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: astPulse 1.6s ease-in-out infinite; }
.phone-redact .ast:nth-child(2) { animation-delay: .15s; }
.phone-redact .ast:nth-child(3) { animation-delay: .3s; }
.phone-redact .ast:nth-child(4) { animation-delay: .45s; }
.phone-redact .ast:nth-child(5) { animation-delay: .6s; }
@keyframes astPulse { 0%,100% { opacity: .35; transform: scale(1); background: var(--muted); } 50% { opacity: 1; transform: scale(1.3); background: var(--gold); } }
.phone-cta { font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-lt); font-weight: 600; }
.phone-request:hover .phone-cta { color: var(--white); }

/* ── Phone Modal ─────────────────────────────────── */
.phone-modal { position: fixed; inset: 0; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); display: flex; align-items: center; justify-content: center; padding: 24px; }
.phone-modal.open { opacity: 1; pointer-events: auto; }
.phone-modal-backdrop { position: absolute; inset: 0; background: rgba(6,12,26,.75); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.phone-modal-card { position: relative; background: var(--navy-md); border: 1px solid var(--border-g); border-radius: var(--r-lg); padding: 36px 36px 32px; max-width: 480px; width: 100%; box-shadow: var(--sh-lg); transform: translateY(20px) scale(.97); transition: transform .4s var(--ease); max-height: 92vh; overflow-y: auto; }
.phone-modal.open .phone-modal-card { transform: translateY(0) scale(1); }
.phone-modal-x { position: absolute; top: 14px; right: 16px; background: transparent; border: none; color: var(--muted); font-size: 1.6rem; cursor: pointer; line-height: 1; padding: 6px 10px; border-radius: 6px; transition: all .25s var(--ease); }
.phone-modal-x:hover { color: var(--white); background: var(--sky-pale); }
.phone-modal-title { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; color: var(--white); line-height: 1.1; margin-top: 4px; }
.phone-modal-title em { font-style: italic; color: var(--gold-lt); }
.phone-modal-sub { font-size: .88rem; color: var(--muted); line-height: 1.6; margin-bottom: 22px; }
.phone-modal-form { display: flex; flex-direction: column; gap: 12px; }
.phone-modal-success { display: none; text-align: center; padding: 12px 0 8px; }
.phone-modal.success .phone-modal-form { display: none; }
.phone-modal.success .phone-modal-success { display: block; }
@media (max-width: 640px) { .phone-modal-card { padding: 28px 24px 24px; } }
footer { background: var(--navy); border-top: 2px solid var(--gold); padding: 36px; text-align: center; position: relative; z-index: 1; }
.footer-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 300; color: var(--white); margin-bottom: 8px; }
.footer-name em { font-style: italic; color: var(--gold-lt); }
.footer-sub { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); line-height: 1.8; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.footer-links a { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; transition: color .25s var(--ease); }
.footer-links a:hover { color: var(--sky-lt); }

/* ── Print / PDF ──────────────────────────────────────── */
/* ── Hero profile photo ──────────────────────────────── */
.hero-profile-img { width: 100%; height: 100%; object-fit: cover; object-position: top center; border-radius: 22px; display: block; }

/* ── Cloud POS zoom image ────────────────────────────── */
.proj-img-zoom { overflow: hidden; border-radius: var(--r); border: 1px solid var(--border); height: 155px; cursor: zoom-in; flex-shrink: 0; }
.proj-img-zoom img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transition: transform .55s var(--ease); border-radius: 0; border: none; display: block; margin: 0; }
.proj-img-zoom:hover img { transform: scale(1.16); }

/* ── Testimonials ────────────────────────────────────── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.testi-card { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 10px; transition: border-color .3s var(--ease); position: relative; overflow: hidden; }
.testi-card::before { content: ''; position: absolute; top: 0; right: 0; width: 70px; height: 70px; background: radial-gradient(circle at top right, rgba(74,159,212,.06), transparent 70%); }
.testi-card.gold-testi { border-color: var(--border-g); }
.testi-card.gold-testi::before { background: radial-gradient(circle at top right, rgba(201,168,80,.08), transparent 70%); }
.testi-card:hover { border-color: var(--sky); }
.testi-card.gold-testi:hover { border-color: var(--gold-lt); }
.testi-q { font-family: var(--serif); font-size: 2.4rem; color: var(--sky); line-height: .8; opacity: .5; }
.testi-q.gold { color: var(--gold); }
.testi-text { font-family: var(--serif); font-size: .98rem; font-style: italic; font-weight: 300; color: var(--cream); line-height: 1.55; flex: 1; }
.testi-name { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); font-weight: 600; }
.testi-role { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.testi-ctx { font-size: .68rem; color: var(--gold); font-weight: 500; margin-top: 6px; }

/* ── Press & Media ───────────────────────────────────── */
.press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
.press-card { background: var(--navy-md); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh); transition: all .3s var(--ease); display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.press-card:hover { border-color: var(--sky); transform: translateY(-3px); }
.press-source-row { display: flex; align-items: center; gap: 10px; }
.press-source-badge { width: 32px; height: 32px; border-radius: 8px; background: var(--sky-pale); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 700; color: var(--sky-lt); letter-spacing: .04em; flex-shrink: 0; }
.press-source { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sky); font-weight: 600; }
.press-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; color: var(--white); line-height: 1.25; }
.press-excerpt { font-size: .78rem; color: var(--muted); line-height: 1.55; flex: 1; }
.press-meta { display: flex; align-items: center; justify-content: space-between; }
.press-date { font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.press-read { font-size: .68rem; color: var(--sky-lt); font-weight: 600; letter-spacing: .06em; }
.rami-quote-box { background: var(--navy-md); border-left: 3px solid var(--gold); border-radius: 0 var(--r) var(--r) 0; padding: 20px 24px; margin-top: 8px; }
.rami-quote-box p { font-family: var(--serif); font-size: 1.05rem; font-style: italic; font-weight: 300; color: var(--cream); line-height: 1.6; }
.rami-quote-box cite { font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--sky); font-weight: 600; margin-top: 8px; display: block; font-style: normal; }

/* ── Gallery improvements ────────────────────────────── */
.gallery-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery-photos img { width: 100%; border-radius: var(--r); border: 1px solid var(--border); object-fit: cover; height: 200px; transition: transform .4s var(--ease), border-color .3s var(--ease); cursor: pointer; }
.gallery-photos img:hover { transform: scale(1.02); border-color: var(--sky); }
.gallery-photos img.tall { height: 410px; }

/* ── Award photo ─────────────────────────────────────── */
.award-photo { width: 100%; border-radius: var(--r-lg); border: 1px solid var(--border-g); object-fit: cover; margin-bottom: 12px; max-height: 220px; }

@media (max-width: 900px) {
  .testimonials-grid, .press-grid { grid-template-columns: 1fr 1fr; }
  .gallery-photos { grid-template-columns: 1fr; }
  .gallery-photos img.tall { height: 260px; }
}
@media (max-width: 640px) {
  .testimonials-grid, .press-grid { grid-template-columns: 1fr; }
}

@media print {
  #pcanvas, body::before, #nav, .hero-btns, .contact-form, footer .footer-links, .theme-toggle, #mob-toggle { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  .section { padding: 40px 0; }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo-wrap { flex-direction: row; justify-content: center; }
  .hero-photo-slot { width: 260px; height: 320px; }
  .proj-card.wide { grid-column: span 1; }
}
@media (max-width: 900px) {
  .container { padding: 0 28px; }
  .about-grid, .contact-grid, .skills-cols, .gallery-grid { grid-template-columns: 1fr; gap: 36px; }
  .tl-item { grid-template-columns: 1fr; }
  .tl-c { display: none; }
  .tl-l, .tl-r { padding: 0; }
  .tl-line { display: none; }
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .lab-grid { grid-template-columns: 1fr 1fr; }
  .certs-grid { grid-template-columns: repeat(2, 1fr); }
  .ach-counters { grid-template-columns: repeat(2, 1fr); }
  .awards-grid { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  #nav { padding: 0 20px; }
  #mob-toggle { display: flex; }
  #nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: rgba(6,12,26,.97); backdrop-filter: blur(20px);
    flex-direction: column; padding: 28px 24px; gap: 22px;
    border-bottom: 1px solid var(--border); display: none; z-index: 199;
  }
  [data-theme="light"] #nav-links { background: rgba(240,237,230,.97); }
  #nav-links.open { display: flex; }
  .nav-link { font-size: .78rem; }
  .hero-wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-name { font-size: clamp(2.8rem, 10vw, 4rem); }
  .hero-photo-wrap { order: -1; flex-direction: column; gap: 12px; align-items: stretch; }
  .hero-photo-slot { width: 220px; height: 270px; margin: 0 auto; }
  .hero-badge { padding: 10px 12px; gap: 10px; }
  .hero-badge-text { font-size: .72rem; }
  .hero-badge-sub { font-size: .62rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .proj-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr 1fr; }
  .ach-counters { grid-template-columns: 1fr 1fr; }
  .awards-grid { grid-template-columns: 1fr; }
  .hero-btns { gap: 10px; }
  .btn { padding: 11px 18px; font-size: .72rem; }
  .section-title { font-size: 1.7rem; }
  /* Inline grids — gallery & Bermuda */
  #speaking [style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr !important; }
  #speaking [style*="grid-template-columns:2fr 1fr"] { grid-template-columns: 1fr !important; }
  #speaking [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  #speaking img[style*="height:280px"], #speaking img[style*="height:260px"], #speaking img[style*="height:220px"], #speaking img[style*="height:340px"] { height: 220px !important; }
  #speaking img[style*="height:360px"] { height: 240px !important; }
  /* Contact section adjustments */
  .c-icon { width: 36px; height: 36px; font-size: .7rem; }
  .c-val { font-size: .82rem; word-break: break-word; }
  .footer-links { gap: 14px; }
  .footer-sub { font-size: .65rem; padding: 0 12px; }
  /* Phone modal */
  .phone-modal-card { padding: 28px 22px 22px; }
  .phone-modal-title { font-size: 1.5rem; }
}
@media (max-width: 640px) {
  .ach-counters { grid-template-columns: repeat(2, 1fr); gap: 1px; }
  .ach-stat { padding: 28px 12px; }
  .ach-n { font-size: clamp(2rem, 9vw, 3rem); }
  .ach-l { font-size: .58rem; letter-spacing: .12em; }
  .awards-grid { grid-template-columns: 1fr !important; gap: 14px; }
  .award-card { padding: 20px 18px; }
  .award-title { font-size: 1rem; }
  .award-body { font-size: .76rem; }
}
