:root {
  --bg: #0a1a2f;
  --bg2: #0f2540;
  --panel: rgba(255,255,255,.04);
  --line: rgba(120,180,255,.25);
  --accent: #1fa2ff;
  --text: #e8eef6;
  --muted: #a9b8cc;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-height: 100vh; background-attachment: fixed; font-family: "Segoe UI", system-ui, sans-serif; color: var(--text); line-height: 1.6;
  background: radial-gradient(1200px 600px at 80% 10%, #0d3a6e 0%, transparent 60%), var(--bg); }
a { color: var(--accent); }

.site-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: .8rem 2rem; background: rgba(10,26,47,.85); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 600; text-decoration: none; }
.logo { font-style: italic; font-weight: 800; color: var(--accent); font-size: 1.4rem; }
nav { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
nav a { color: var(--text); text-decoration: none; }

.btn { display: inline-block; padding: .7rem 1.6rem; border-radius: 2px; text-decoration: none; font-weight: 600; color: #fff; }
.btn-primary { background: linear-gradient(#2aa8ff, #0f84e0); }
.btn-outline { border: 1px solid var(--accent); background: transparent; }
nav .btn { padding: .5rem 1.1rem; }

.hero { position: relative; display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; align-items: end; gap: 1rem;
  max-width: 1500px; margin: 0 auto; padding: 1rem 3rem 0; overflow: hidden; }
.portrait { position: relative; z-index: 1; width: auto; max-width: 100%; justify-self: center; height: min(60vh, 600px); object-fit: contain; object-position: bottom center;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.5)); }
.hero-text { position: relative; z-index: 1; align-self: center; padding-bottom: 1rem; }
.bg-deco { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ico { width: 1.9rem; height: 1.9rem; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.az-hero { position: absolute; right: 3%; top: 50%; transform: translateY(-55%); width: min(22vw, 360px); opacity: .9; pointer-events: none; }
.badge { display: flex; align-items: center; gap: .9rem; }
.badge p { margin: 0; display: flex; flex-direction: column; }
.ms-logo { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 44px; height: 44px; }
.ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.az-mark { width: 48px; height: 48px; }
.eyebrow { letter-spacing: .2em; text-transform: uppercase; font-size: .8rem; margin: 0 0 1.5rem; }
.eyebrow::after { content: ""; display: block; width: 50px; height: 3px; background: var(--accent); margin-top: .6rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; margin: 0; }
.accent { color: var(--accent); }
.hero h2 { margin: .4rem 0 1rem; font-weight: 500; font-size: clamp(1.3rem, 3vw, 2rem); }
.lead { max-width: 33rem; font-size: 1.15rem; }
.badges { display: flex; gap: 2rem; flex-wrap: wrap; margin: 1.5rem 0; }
.badges div { display: flex; padding-right: 2rem; border-right: 1px solid var(--line); }
.badges div:last-child { border: 0; }
.badges span { color: var(--muted); font-size: .9rem; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.band { max-width: 1400px; margin: 0 auto; padding: 1.2rem 3rem; }
.section-title { position: relative; padding-bottom: .5rem; margin: 0 0 1.2rem; font-size: 1.5rem; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.5rem; height: 2px; background: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.tile, .card, .stats { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.tile { padding: 1rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .4rem; font-size: .95rem; }
.tile .ico { width: 2rem; height: 2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; padding: 1rem 1.2rem; }
.stats div { display: flex; align-items: center; gap: .8rem; }
.stats p { margin: 0; display: flex; flex-direction: column; }
.stats span { color: var(--muted); font-size: .85rem; }

.grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { padding: 1.2rem; }
.card h3 { margin-top: 0; }
.card a + a { margin-left: 1rem; }
#projects-list { grid-template-columns: 1fr; }
#projects-list .card { padding: 1.4rem 1.6rem; }
#projects-list .card h3 { font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.highlights { margin: .8rem 0 1rem; padding-left: 1.2rem; font-size: .95rem; line-height: 1.6; }
.highlights li::marker { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.tags li { border: 1px solid var(--line); border-radius: 12px; padding: .1rem .7rem; font-size: .8rem; color: var(--accent); }
.cert-list { list-style: none; padding: 0; margin: 0; font-size: .95rem; line-height: 1.7; }
.cert-list li { white-space: nowrap; }
.cert-list strong { color: var(--accent); display: inline-block; min-width: 3.9rem; }
.page.certs { padding-bottom: .5rem; }
.page.certs .grid { grid-template-columns: 1fr 1fr; gap: .8rem; }
.page.certs .card { padding: .8rem 1.1rem; }
.page.certs .card h3 { margin: 0 0 .4rem; font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.page.certs .card.tall { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 800px) {
  .page.certs .grid { grid-template-columns: 1fr; }
  .page.certs .card.tall { grid-column: auto; grid-row: auto; }
  .cert-list li { white-space: normal; }
}
.subhead { margin: 2rem 0 1rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 1.5rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.timeline .years { min-width: 110px; color: var(--accent); }
footer { text-align: center; padding: 2rem; color: var(--muted); }

nav a.active:not(.btn) { color: var(--accent); }
.page { min-height: 60vh; }
.page > p { max-width: 60rem; font-size: .95rem; }
.page.about { min-height: 0; padding-bottom: .5rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-bio p { margin: 0 0 .9rem; font-size: .95rem; line-height: 1.6; }
.about .subhead { margin: 0 0 .4rem; font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.about .timeline li { padding: .45rem 0; gap: 1.2rem; line-height: 1.45; font-size: .95rem; }
.about .timeline .years { min-width: 95px; }
@media (max-width: 1000px) { .about-grid { grid-template-columns: 1fr; gap: 1rem; } }

/* Landing: single screen, no scroll */
body.landing { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.landing .site-header { position: static; flex: none; }
.landing main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.landing .hero { flex: 1; min-height: 0; width: 100%; grid-template-rows: minmax(0, 1fr); align-items: stretch; padding-top: 0; }
.landing .hero::before { content: ""; position: absolute; left: 0; bottom: 0; width: 42%; height: 100%; pointer-events: none;
  background:
    radial-gradient(ellipse 28% 5% at 50% 97%, rgba(31,162,255,.55), transparent 75%),
    radial-gradient(ellipse 50% 60% at 50% 42%, rgba(46,120,200,.40), transparent 72%); }
.bg-dots { position: absolute; left: 0; bottom: 0; width: 30%; max-height: 55%; pointer-events: none; }
.landing .portrait { height: 100%; align-self: end; filter: drop-shadow(0 18px 30px rgba(0,0,0,.65)) drop-shadow(0 0 40px rgba(31,162,255,.18)); }
.landing .hero-text { position: relative; align-self: center; padding-bottom: 0; }
.seals { position: absolute; z-index: 2; display: flex; align-items: center; gap: clamp(.6rem, 1.6vh, 1.1rem); top: clamp(.6rem, 4vh, 2.4rem); left: calc(clamp(2.4rem, 11vh, 6.2rem) * 4.5 + 4.5rem); }
.seals img { display: block; width: clamp(70px, 13vh, 125px); height: auto; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)) drop-shadow(0 0 24px rgba(31,162,255,.3)); }
.seals a { transition: transform .2s; }
.seals a:hover { transform: scale(1.06); }
.landing .hero h1 { font-size: clamp(2.4rem, 11vh, 6.2rem); }
.landing .hero h2 { font-size: clamp(1.2rem, 3.6vh, 2.3rem); margin: clamp(1.8rem, 5.2vh, 3.6rem) 0 0; }
.landing .hero h2.h2-second { margin: 0 0 .8rem; }
.landing .lead { font-size: clamp(.9rem, 2.2vh, 1.25rem); margin: 0; max-width: 38rem; }
.landing .eyebrow { margin-bottom: clamp(.5rem, 2vh, 1.5rem); }
.landing .badges { margin: clamp(.6rem, 2vh, 1.4rem) 0; flex-wrap: nowrap; gap: 1.1rem; }
.landing .badges div { padding-right: 1.1rem; }
.landing .hero-text { max-width: 39rem; }
.landing .az-hero { width: min(18vw, 320px); right: 1.5%; }
.mini-title { position: relative; padding-bottom: .5rem; margin: clamp(.8rem, 2.4vh, 1.6rem) 0 .6rem; font-size: 1.5rem; }
.mini-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.5rem; height: 2px; background: var(--accent); }
.landing .tiles { grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.landing .tile { flex-direction: row; text-align: left; justify-content: flex-start; gap: .5rem; padding: .55rem .6rem; font-size: .82rem; }
.landing .tile .ico { width: 1.5rem; height: 1.5rem; }
.site-header { justify-content: flex-end; padding: .35rem 2rem; }
.site-header nav { gap: 1.3rem; }
.site-header nav .btn { padding: .3rem .9rem; font-size: .9rem; }
.site-header { justify-content: space-between; padding: .4rem 2rem; background: rgba(3,14,34,.72); border-top: 1px solid rgba(90,160,255,.18); border-bottom: 1px solid rgba(90,160,255,.18); }
.brand-group { display: flex; align-items: center; }
.wordmark { font-size: 1.3rem; font-weight: 500; letter-spacing: .02em; line-height: 1; color: #fff; text-decoration: none; }
.wordmark span { color: var(--accent); }
.divider { width: 1px; height: 1.4rem; margin-left: 1.3rem; background: rgba(255,255,255,.45); }
.site-header nav { gap: 1rem; }
.site-header nav a:not(.btn) { position: relative; padding: .35rem .6rem; font-size: 1rem; }
.site-header nav a.active:not(.btn) { color: #fff; font-weight: 600; }
.site-header nav a.active:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.4rem; height: 3px; border-radius: 2px; background: var(--accent); }
.site-header nav .btn { border: 2px solid var(--accent); border-radius: 5px; padding: .3rem .95rem; margin-left: .4rem; }
.landing .hero h2.h2-second { margin: 0 0 clamp(.8rem, 2.4vh, 1.8rem); }
.landing .badges { margin: clamp(.9rem, 3vh, 2.2rem) 0; }
.landing .actions { margin-bottom: clamp(.2rem, 1vh, .8rem); }
.landing .mini-title { margin: clamp(1rem, 3.4vh, 2.4rem) 0 .8rem; }
.landing .tiles { gap: .8rem; }
.landing .tile { padding: .75rem .8rem; }
@media (max-height: 760px) { .landing .tiles, .landing .mini-title { display: none; } }
@media (max-height: 600px) { .landing .badges { display: none; } }

@media (max-width: 800px) {
  body.landing { height: auto; overflow: auto; }
  .landing .hero { grid-template-rows: auto; }
  .landing .portrait { height: 320px; justify-self: center; }
  .landing .tiles, .landing .mini-title { display: grid; }
  .landing .badges { display: flex; }
  .seals { position: static; margin-bottom: 1rem; }
  .site-header { justify-content: center; }
  .divider { display: none; }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; padding: 1.5rem; }
  .portrait { height: 360px; }
  .az-hero { display: none; }
  .site-header { flex-direction: column; gap: .5rem; }
}

@media (max-width: 800px) {
  html, body { overflow-x: hidden; }
  .site-header { padding: .5rem .8rem; gap: .4rem; }
  .site-header nav { flex-wrap: wrap; justify-content: center; gap: .2rem .3rem; }
  .site-header nav a:not(.btn) { padding: .3rem .5rem; font-size: .92rem; }
  .site-header nav .btn { margin-left: 0; }
  .band, .page { padding-left: 1.2rem; padding-right: 1.2rem; }
  .landing .hero { padding: 1rem 1.2rem 1.5rem; }
  .landing .hero h1 { font-size: clamp(2.6rem, 17vw, 4.5rem); line-height: 1.05; }
  .landing .hero h2 { font-size: 1.25rem; margin-top: 1.2rem; }
  .landing .lead { font-size: 1rem; }
  .landing .eyebrow { font-size: .7rem; letter-spacing: .1em; }
  .landing .badges { flex-wrap: wrap; gap: .8rem; }
  .landing .tiles { grid-template-columns: repeat(2, 1fr); }
  .landing .portrait { height: 300px; }
  .seals img { width: 72px; }
  .timeline li, .about .timeline li { flex-direction: column; gap: .1rem; }
  .about .timeline .years { min-width: 0; }
}

@media (max-width: 800px) {
  .site-header nav .btn { padding: .25rem .6rem; font-size: 1rem; }
}

@media (max-width: 800px) {
  .site-header nav .btn { border: 0; background: none; }
}

@media (max-width: 800px) {
  .bg-deco { opacity: .25; }
  .landing .hero-text { max-width: none; }
  .seals { justify-content: center; margin: .2rem 0 1rem; }
  .landing .eyebrow, .landing .hero h1, .landing .hero h2, .landing .lead { text-align: center; }
  .landing .eyebrow::after, .landing .eyebrow:after { margin-left: auto; margin-right: auto; }
  .landing .badges { flex-direction: column; align-items: stretch; gap: .6rem; margin: 1.2rem 0; }
  .landing .badges div { border: 0; padding: .7rem .9rem; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 4px; }
  .landing .badge > :first-child { flex: none; }
  .landing .actions { flex-direction: column; }
  .landing .actions .btn { text-align: center; justify-content: center; }
  .landing .mini-title { text-align: left; }
}

#projects-summary { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
#projects-summary .card { padding: 1.1rem 1.3rem; }
#projects-summary .card h3 { font-size: 1.15rem; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .5rem; }
#projects-summary .card p { margin: 0 0 .8rem; font-size: .95rem; line-height: 1.55; }
.more { margin: 1.2rem 0 0; text-align: right; }
.more a { color: var(--accent); font-weight: 600; text-decoration: none; letter-spacing: .04em; }
.more a:hover { text-decoration: underline; }
@media (max-width: 800px) { #projects-summary { grid-template-columns: 1fr; } }

.card-head { display: flex; align-items: center; gap: .9rem; margin-bottom: .6rem; }
.card-head svg { width: 2.6rem; height: 2.6rem; flex: none; }
.card-head h3 { margin: 0 !important; }

#projects-summary { grid-template-columns: repeat(4, 1fr); gap: .9rem; align-items: stretch; }
#projects-summary .card { display: flex; flex-direction: column; padding: 1rem 1.1rem; }
#projects-summary .card-head { flex-direction: column; align-items: flex-start; gap: .7rem; }
#projects-summary .card h3 { font-size: 1.05rem; }
#projects-summary .card p { font-size: .9rem; }
#projects-summary .tags { margin: auto 0 0; }
#projects-summary .tags li { font-size: .75rem; padding: .1rem .55rem; }
@media (max-width: 1100px) { #projects-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { #projects-summary { grid-template-columns: 1fr; } }

.site-header { justify-content: flex-end; }
.section-title { display: flex; align-items: center; gap: .7rem; }
.section-title .ms-logo { width: 26px; height: 26px; gap: 2px; }
.section-title .az-mark { width: 30px; height: 30px; }

.section-title .ms-logo, .section-title .az-mark { margin-left: auto; }

@media (max-width: 800px) {
  .site-header { flex-direction: row; justify-content: flex-end; }
  .site-header nav { justify-content: flex-end; }
}

.section-title .ms-logo { width: 42px; height: 42px; gap: 3px; }
.section-title .az-mark { width: 46px; height: 46px; }
.section-title .ms-logo, .section-title .az-mark { align-self: flex-end; margin-bottom: -.5rem; }

.home-ico { display: block; width: 1.3rem; height: 1.3rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.about-photo { margin: 2rem 0 .5rem; max-width: 640px; }
.about-photo img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.about-photo figcaption { margin-top: .6rem; font-size: .9rem; color: var(--muted); }

.about-photo { margin: 0; max-width: none; text-align: center; }
.about-photo img { margin: 0 auto; }
.about-photo figcaption { font-style: italic; text-align: center; }
@media (min-width: 801px) {
  .page.about { height: calc(100dvh - 52px); display: flex; flex-direction: column; padding-bottom: 1rem; overflow: hidden; }
  .about-grid { grid-template-columns: 1.6fr 1fr; gap: 2.5rem; flex: none; }
  .about .timeline li { padding: .3rem 0; }
  .about-photo { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; margin-top: 1rem; }
  .about-photo img { width: auto; max-width: 100%; flex: 1; min-height: 0; object-fit: contain; }
  .about-photo figcaption { flex: none; margin-top: .4rem; }
}
@media (max-width: 800px) { .about-photo { margin-top: 1.5rem; } }

.about-go p { margin: 0 0 .9rem; font-size: .95rem; line-height: 1.6; }
@media (min-width: 1001px) {
  .page.about .about-grid { grid-template-columns: 1fr 1fr 1fr; gap: 2rem; flex: 1; min-height: 0; }
  .about-go { display: flex; flex-direction: column; min-height: 0; height: 100%; }
  .about-go .about-photo { margin-top: 0; }
  .about .timeline li { flex-direction: column; gap: 0; }
  .about .timeline .years { min-width: 0; }
}
@media (min-width: 801px) and (max-width: 1000px) {
  .about-go .about-photo { margin-top: 0; }
}

@media (min-width: 801px) {
  .about-go .about-photo { flex: none; align-items: stretch; }
  .about-go .about-photo img { width: 100%; height: auto; flex: none; max-height: calc(100dvh - 380px); object-fit: cover; }
}

.card-head img { width: 2.6rem; height: 2.6rem; flex: none; }

@media (max-width: 800px) {
  .site-header { justify-content: center; }
  .site-header nav { justify-content: center; }
  .landing .hero { display: flex; flex-direction: column; align-items: stretch; }
  .landing .hero-text { display: contents; }
  .landing .eyebrow { order: 1; margin-top: 1rem; }
  .landing .hero h1 { order: 2; }
  .landing .portrait { order: 3; align-self: center; height: 320px; margin: .5rem 0; }
  .landing .seals { order: 4; }
  .landing .hero h2 { order: 5; }
  .landing .hero h2.h2-second { order: 6; }
  .landing .lead { order: 7; }
  .landing .badges { order: 8; }
  .landing .actions { order: 9; }
  .landing .mini-title { order: 10; }
  .landing .tiles { order: 11; }
}

@media (max-width: 800px) {
  .landing .portrait { width: min(80%, 300px); height: 300px; object-fit: cover; object-position: top center; -webkit-mask-image: linear-gradient(#000 80%, transparent); mask-image: linear-gradient(#000 80%, transparent); }
  .landing .hero h1 { font-size: clamp(2.2rem, 12vw, 3.4rem); }
}
