/* ==========================================================================
   Ahmed Siraj Eldin — Portfolio
   Deep-navy + warm-gold system. Dark by default, full light theme.
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #060a14;
  --bg-alt: #0a101e;
  --surface: #0e1627;
  --surface-2: #131d33;
  --line: rgba(160, 180, 220, .14);
  --line-strong: rgba(160, 180, 220, .28);
  --text: #eef1f8;
  --text-2: #b5bdd0;
  --muted: #8791a8;
  --gold: #e8b64c;
  --gold-2: #f6d27e;
  --gold-ink: #1a1203;
  --gold-soft: rgba(232, 182, 76, .12);
  --blue-glow: rgba(70, 110, 220, .22);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
  --wrap: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  --space: clamp(72px, 9vw, 128px);
  --radius: 18px;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f7f5ef;
  --bg-alt: #efece3;
  --surface: #ffffff;
  --surface-2: #f3f0e7;
  --line: rgba(20, 30, 60, .12);
  --line-strong: rgba(20, 30, 60, .26);
  --text: #0c1426;
  --text-2: #3f4860;
  --muted: #5c657c;
  --gold: #8a5a00;
  --gold-2: #b57a05;
  --gold-ink: #fff9ea;
  --gold-soft: rgba(176, 120, 8, .11);
  --blue-glow: rgba(70, 110, 220, .12);
  --shadow: 0 24px 50px -28px rgba(20, 30, 60, .35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
img { display: block; max-width: 100%; height: auto; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
::selection { background: var(--gold); color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; padding: 10px 18px; background: var(--gold); color: var(--gold-ink); border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin-inline: auto; padding-inline: var(--pad); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--gold); }

/* ---------- scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px; border-radius: 999px; font: 700 14px/1 var(--sans); letter-spacing: .01em; border: 1px solid transparent; transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; }
.btn i { font-style: normal; transition: transform .2s ease; }
.btn:hover i { transform: translateX(3px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--gold-ink); box-shadow: 0 10px 30px -12px var(--gold); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px var(--gold); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-sm { min-height: 40px; padding: 0 20px; font-size: 13px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-grid; place-items: center; transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--gold); color: var(--gold); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 100; transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent; }
.navbar.scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.nav-inner { max-width: calc(var(--wrap) + var(--pad) * 2); margin: auto; padding: 0 var(--pad); height: 72px; display: flex; align-items: center; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.01em; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font: 800 14px var(--sans); color: var(--gold-ink); background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.logo-text { font-size: 15px; }
.nav-links { display: flex; gap: 6px; margin-inline: auto; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.nav-links a { padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--gold-ink); background: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { width: 17px; height: 1.6px; background: currentColor; transition: transform .25s; }
.nav-toggle[aria-expanded='true'] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding-top: clamp(24px, 5vw, 64px); overflow: hidden; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; background:
    radial-gradient(60% 55% at 78% 30%, var(--blue-glow), transparent 70%),
    radial-gradient(40% 40% at 12% 8%, var(--gold-soft), transparent 70%),
    linear-gradient(180deg, transparent 70%, var(--bg)); }
.hero-bg::before { content: ''; position: absolute; inset: 0; background: url('assets/hero-bg-960.webp') center / cover no-repeat; opacity: .32; mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(75% 85% at 70% 35%, #000 20%, transparent 78%); mask-image: radial-gradient(75% 85% at 70% 35%, #000 20%, transparent 78%); }
:root[data-theme='light'] .hero-bg::before { opacity: .07; mix-blend-mode: multiply; filter: invert(1); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(32px, 6vw, 88px); align-items: center; padding-block: clamp(24px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.status { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font: 500 11.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 0 0 rgba(61, 220, 151, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.eyebrow { margin: 30px 0 14px; font: 700 12px var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 14px; }
.eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(46px, 7.2vw, 96px); line-height: .98; letter-spacing: -.045em; font-weight: 800; }
.hero h1 .serif { display: inline-block; font-size: 1.04em; letter-spacing: -.02em; }
.lead { margin-top: 26px; max-width: 54ch; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.7; color: var(--text-2); }
.lead strong { color: var(--text); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; }
.hero-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); transition: color .2s; }
.hero-links a:hover { color: var(--gold); }
.hero-links svg { width: 18px; height: 18px; }

.hero-visual { position: relative; max-width: 460px; margin-inline: auto; width: 100%; }
.portrait-frame { position: relative; aspect-ratio: 4 / 5; border-radius: 240px 240px 28px 28px; overflow: hidden; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow), 0 0 0 10px color-mix(in srgb, var(--gold) 6%, transparent); }
.portrait-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(6, 10, 20, .55)); }
.portrait { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; transform: scale(1.12); transform-origin: 50% 25%; }
.hero-visual::before { content: ''; position: absolute; inset: -22px -22px auto auto; width: 62%; height: 62%; border: 1px dashed var(--gold); opacity: .35; border-radius: 50%; z-index: -1; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip { position: absolute; padding: 9px 15px; border-radius: 999px; font: 700 11.5px var(--mono); letter-spacing: .04em; color: var(--text); background: color-mix(in srgb, var(--surface) 82%, transparent); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.chip::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; }
.chip-a { top: 12%; left: -9%; }
.chip-b { top: 44%; right: -8%; animation-delay: -2s; }
.chip-c { bottom: 24%; left: -11%; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-9px); } }
.id-card { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); padding: 14px 22px; border-radius: 16px; text-align: center; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.id-card span { display: block; font: 500 10px var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.id-card strong { display: block; font-size: 17px; letter-spacing: -.01em; }
.id-card em { font-style: normal; font-size: 12.5px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 72%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); margin-bottom: clamp(32px, 4vw, 56px); margin-top: 28px; }
.stats > div { padding: 26px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: 4px; }
.stats > div:last-child { border: 0; }
.stats dt { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stats dd { display: flex; align-items: baseline; gap: 2px; }
.stats b { font-size: clamp(34px, 4vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stats small { font-size: 22px; font-weight: 700; color: var(--gold); }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; background: var(--bg-alt); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-track span { padding: 22px 34px; font: 700 13px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 34px; }
.marquee-track span::after { content: '✦'; color: var(--gold); font-size: 11px; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding-block: var(--space); position: relative; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 64px); }
.kicker { display: inline-flex; align-items: center; gap: 12px; font: 700 12px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.kicker span { padding: 4px 9px; border: 1px solid color-mix(in srgb, var(--gold) 50%, transparent); border-radius: 999px; letter-spacing: .08em; }
.section-head h2, .contact-card h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1.06; letter-spacing: -.04em; font-weight: 800; text-wrap: balance; }
.section-head h2 .serif, .contact-card h2 .serif { font-size: 1.06em; }
.section-sub { margin-top: 18px; max-width: 60ch; font-size: 17px; color: var(--text-2); }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.about-text p { font-size: 17.5px; line-height: 1.8; color: var(--text-2); }
.about-text p + p { margin-top: 18px; }
.about-text strong { color: var(--text); font-weight: 700; }
.pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 36px; }
.pillars li { padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .25s, transform .25s; }
.pillars li:hover { border-color: var(--gold); transform: translateY(-3px); }
.pillars b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.pillars b::before { content: '⚡'; font-size: 13px; margin-right: 8px; filter: grayscale(1) sepia(1) saturate(4) hue-rotate(-10deg); }
.pillars span { font-size: 13.5px; line-height: 1.55; color: var(--muted); display: block; }
.facts { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 8px 28px; position: sticky; top: 100px; }
.facts div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border: 0; }
.facts dt { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; }
.facts dd { font-size: 15px; color: var(--text); line-height: 1.5; }

/* ---------- projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; }
.filter-btn { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .2s; display: inline-flex; gap: 8px; align-items: center; }
.filter-btn small { font: 500 11px var(--mono); opacity: .65; }
.filter-btn:hover { border-color: var(--gold); color: var(--text); }
.filter-btn.active { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.project-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease; }
.project-card:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: var(--shadow); }
.project-thumb { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.project-card:hover .project-thumb img { transform: scale(1.06); }
.project-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 10, 20, .35), transparent 35%, transparent 60%, rgba(6, 10, 20, .7)); pointer-events: none; }
.project-index { position: absolute; top: 14px; left: 16px; z-index: 2; font: 700 12px var(--mono); letter-spacing: .08em; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.project-open { position: absolute; z-index: 2; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font: 700 12px var(--sans); transform: translateY(0); transition: transform .25s, box-shadow .25s; }
.project-open i { font-style: normal; transition: transform .25s; }
.project-card:hover .project-open { box-shadow: 0 8px 24px -8px var(--gold); }
.project-card:hover .project-open i { transform: translate(2px, -2px); }
@media (hover: hover) { .project-open { opacity: 0; transform: translateY(8px); } .project-card:hover .project-open, .project-thumb:focus-visible .project-open { opacity: 1; transform: none; } }
.project-info { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.project-category { font: 700 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.project-info h3 { font-size: 21px; line-height: 1.2; letter-spacing: -.025em; font-weight: 700; margin-bottom: 12px; }
.project-desc { font-size: 14.5px; line-height: 1.65; color: var(--text-2); margin-bottom: 20px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }
.project-tags li { padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 999px; font: 500 11px var(--mono); color: var(--muted); }
.project-card[hidden] { display: none !important; }

/* ---------- timeline ---------- */
.timeline { position: relative; max-width: 940px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--gold), var(--line) 40%, var(--line)); }
.t-item { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px 40px; padding: 0 0 52px 44px; }
.t-item:last-child { padding-bottom: 0; }
.t-item::before { content: ''; position: absolute; left: 0; top: 7px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.t-item.current::before { background: var(--gold); box-shadow: 0 0 0 6px var(--gold-soft); }
.t-date { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; align-self: start; padding-top: 4px; }
.t-date span { font: 700 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.badge { font: 700 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; font-style: normal; padding: 3px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); }
.t-body h3 { font-size: 24px; letter-spacing: -.03em; line-height: 1.2; }
.t-company { margin-top: 4px; font-weight: 600; color: var(--text-2); }
.t-body ul { margin-top: 18px; display: grid; gap: 10px; }
.t-body li { position: relative; padding-left: 22px; color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.t-body li::before { content: ''; position: absolute; left: 0; top: .72em; width: 10px; height: 1px; background: var(--gold); }

/* ---------- skills ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.skill-card { padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .25s, transform .25s; }
.skill-card:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); transform: translateY(-4px); }
.skill-card h3 { font-size: 17px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.skill-card .n { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--gold-soft); color: var(--gold); font: 700 12px var(--mono); border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); flex: none; }
.skill-card ul { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-card li { padding: 8px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text-2); }

/* ---------- education ---------- */
.edu { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(135deg, var(--surface), var(--surface-2)); position: relative; overflow: hidden; }
.edu::after { content: ''; position: absolute; right: -80px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(var(--gold-soft), transparent 70%); pointer-events: none; }
.edu h3 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; line-height: 1.15; margin-top: 12px; }
.edu-note { margin-top: 16px; color: var(--text-2); }
.edu-note em { color: var(--text); font-style: normal; font-weight: 600; }
.edu-grades { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; position: relative; z-index: 1; }
.edu-grades div { padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--bg) 50%, transparent); }
.edu-grades b { display: block; font-size: clamp(32px, 4vw, 46px); font-weight: 800; letter-spacing: -.04em; line-height: 1.05; }
.edu-grades span { display: block; margin-top: 8px; font: 500 11px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.edu-grades .hl { border-color: color-mix(in srgb, var(--gold) 55%, transparent); background: var(--gold-soft); }
.edu-grades .hl b { color: var(--gold); }

/* ---------- training ---------- */
.training-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.train-card:first-child { grid-column: span 2; }
.train-card { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .25s, transform .25s; display: flex; flex-direction: column; }
.train-card:hover { border-color: color-mix(in srgb, var(--gold) 55%, transparent); transform: translateY(-4px); }
.train-card h3 { font-size: 20px; letter-spacing: -.025em; line-height: 1.25; margin: 14px 0 6px; }
.train-card h3 small { display: block; margin-top: 4px; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.provider { font-weight: 600; font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.train-card p:last-child { font-size: 14.5px; line-height: 1.65; color: var(--muted); }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(56px, 7vw, 96px); }
.contact-card { position: relative; overflow: hidden; padding: clamp(36px, 6vw, 80px); border-radius: 32px; border: 1px solid var(--line-strong); background:
  radial-gradient(60% 90% at 100% 0%, var(--gold-soft), transparent 65%),
  radial-gradient(50% 70% at 0% 100%, var(--blue-glow), transparent 70%),
  var(--surface); }
.contact-card h2 { max-width: 16ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.contact-list { margin-top: 48px; display: grid; grid-template-columns: auto auto auto auto; justify-content: space-between; column-gap: 24px; gap: 0; border-top: 1px solid var(--line-strong); }
.contact-list li { padding: 22px 20px 0 0; }
.contact-list span { display: block; font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.contact-list a, .contact-list p { font-size: 15px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--gold); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 28px; font-size: 13.5px; color: var(--muted); }
.footer-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; align-items: center; }
.footer-tag { font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.footer a:hover { color: var(--gold); }

/* ---------- reveal on scroll (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .projects-grid, .training-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .train-card:first-child { grid-column: auto; }
  .skills-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-list { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; }
  .contact-list li { padding-bottom: 8px; }
}
@media (max-width: 900px) {
  .hero-grid, .about-grid, .edu { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; order: -1; margin-bottom: 18px; }
  .chip-a { left: -4%; } .chip-b { right: -3%; } .chip-c { left: -5%; }
  .facts { position: static; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: 72px; left: var(--pad); right: var(--pad); flex-direction: column; gap: 2px; padding: 10px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(18px); box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s; }
  .nav-links.open { opacity: 1; transform: none; visibility: visible; }
  .nav-links a { padding: 13px 16px; font-size: 15px; }
  .nav-actions { margin-left: auto; }
  .logo-text { display: none; }
  .t-item { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .projects-grid, .training-grid, .skills-grid, .pillars { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stats > div { padding: 20px 18px; }
  .chip { font-size: 10.5px; padding: 7px 12px; }
  .edu-grades { grid-template-columns: 1fr; }
  .contact-list { grid-template-columns: 1fr; }
  .contact-actions .btn { flex: 1 1 100%; white-space: normal; text-align: center; padding: 0 16px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
  .footer-in { flex-direction: column; align-items: flex-start; }
  .project-open { opacity: 1 !important; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media print {
  .navbar, .progress, .marquee, .filters, .chip, .hero-bg { display: none !important; }
  body { background: #fff; color: #000; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .section { padding-block: 24px; }
}
