:root {
  --navy: #0b1f33;
  --navy-2: #132f49;
  --navy-3: #1c415f;
  --ink: #152433;
  --muted: #64717c;
  --soft: #f3f5f6;
  --soft-2: #e9edef;
  --white: #ffffff;
  --green: #1d5b4c;
  --green-2: #2c7964;
  --gold: #bea66f;
  --gold-soft: #e7ddc4;
  --line: #dce2e6;
  --danger: #8c2430;
  --shadow: 0 22px 54px rgba(9, 31, 50, 0.10);
  --shadow-sm: 0 12px 30px rgba(9, 31, 50, 0.07);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
::selection { background: var(--gold-soft); color: var(--navy); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 9999;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
  font-weight: 800;
}
.skip-link:focus { transform: translateY(0); }

.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.section { padding: 88px 0; }
.section--light { background: var(--soft); }
.eyebrow {
  margin: 0 0 10px;
  color: var(--green-2);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.eyebrow--gold { color: #dbc78f; }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 410px);
  gap: 42px;
  align-items: end;
  margin-bottom: 34px;
}
.section-heading h2 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.1rem, 4.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.045em;
}
.section-heading > p { margin: 0; color: var(--muted); }
.section-heading--inverse h2 { color: var(--white); }
.section-heading--inverse > p { color: #b8c5cf; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .91rem;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.button:focus-visible,
.filter-button:focus-visible,
.project-open:focus-visible,
.timeline-toggle:focus-visible,
.menu-toggle:focus-visible,
.dialog-close:focus-visible,
.image-dialog-close:focus-visible,
.gallery-thumb:focus-visible,
.gallery-main:focus-visible {
  outline: 3px solid rgba(190, 166, 111, .55);
  outline-offset: 3px;
}
.button--primary { background: var(--navy); color: var(--white); box-shadow: 0 10px 24px rgba(11,31,51,.15); }
.button--primary:hover { transform: translateY(-2px); background: var(--navy-2); }
.button--secondary { background: var(--white); color: var(--navy); border-color: #cbd4db; }
.button--secondary:hover { transform: translateY(-2px); border-color: #9babb6; }
.button--text { padding-inline: 8px; color: var(--green); }
.button--text:hover { transform: translateY(-2px); }
.button--light { background: var(--white); color: var(--navy); }
.button--light:hover { transform: translateY(-2px); }
.button--outline-light { border-color: rgba(255,255,255,.34); color: var(--white); }
.button--outline-light:hover { transform: translateY(-2px); border-color: var(--white); background: rgba(255,255,255,.08); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(11,31,51,.08);
  background: rgba(255,255,255,.91);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.monogram {
  position: relative;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--navy);
  color: var(--white);
  font-weight: 950;
  letter-spacing: -.08em;
  box-shadow: 0 8px 20px rgba(11,31,51,.18);
}
.monogram::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  right: -10px;
  bottom: -10px;
  border-radius: 50%;
  background: var(--gold);
}
.brand-copy { line-height: 1.2; }
.brand-copy strong { display: block; font-size: .96rem; }
.brand-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: .68rem; letter-spacing: .03em; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.main-nav a { position: relative; color: #46535f; font-size: .84rem; font-weight: 720; }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--green);
  transition: right .2s ease;
}
.main-nav a:hover { color: var(--navy); }
.main-nav a:hover::after { right: 0; }
.header-cta { flex: 0 0 auto; }
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.menu-toggle span { display: block; width: 100%; height: 2px; margin: 5px 0; border-radius: 9px; background: var(--navy); transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 62px;
  background:
    radial-gradient(circle at 80% 15%, rgba(190,166,111,.14), transparent 28%),
    linear-gradient(180deg, #fbfcfc 0%, #ffffff 100%);
}
.hero::before {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  right: -280px;
  top: -180px;
  border: 1px solid rgba(11,31,51,.07);
  border-radius: 50%;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(350px, .85fr); gap: 70px; align-items: center; }
.hero h1 {
  margin: 12px 0 22px;
  color: var(--navy);
  font-size: clamp(4rem, 7.8vw, 7.4rem);
  font-weight: 950;
  line-height: .84;
  letter-spacing: -.075em;
}
.hero h1 span { color: var(--green); }
.hero-role { margin: 0 0 18px; max-width: 760px; color: #26394a; font-size: clamp(1.15rem, 2vw, 1.42rem); font-weight: 780; line-height: 1.35; }
.hero-lead, .hero-support { max-width: 720px; color: var(--muted); }
.hero-lead { margin: 0 0 10px; font-size: 1.02rem; }
.hero-support { margin: 0 0 28px; font-size: .98rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.hero-signals { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); color: #5b6874; font-size: .78rem; font-weight: 700; }
.hero-signals span { position: relative; padding-left: 14px; }
.hero-signals span::before { content: ""; position: absolute; left: 0; top: .56em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-photo-wrap { position: relative; min-height: 585px; }
.hero-photo-frame { position: absolute; inset: 0; overflow: hidden; border-radius: 34px; background: var(--soft); box-shadow: var(--shadow); }
.hero-photo-frame::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.42); border-radius: inherit; pointer-events: none; }
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 41%; }
.hero-photo-note {
  position: absolute;
  left: -30px;
  bottom: 28px;
  width: 250px;
  padding: 16px 18px;
  border: 1px solid rgba(11,31,51,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow-sm);
}
.hero-photo-note strong { display: block; margin-bottom: 3px; color: var(--navy); font-size: .86rem; }
.hero-photo-note span { display: block; color: var(--muted); font-size: .73rem; line-height: 1.45; }

.proof-strip { padding: 0 0 20px; background: var(--white); }
.proof-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(11,31,51,.05);
}
.proof-grid article { position: relative; min-height: 118px; padding: 20px 18px; }
.proof-grid article:not(:last-child)::after { content: ""; position: absolute; top: 18px; right: 0; bottom: 18px; width: 1px; background: var(--line); }
.proof-grid strong { display: block; color: var(--navy); font-size: clamp(1.3rem, 2vw, 1.8rem); letter-spacing: -.035em; line-height: 1.05; }
.proof-grid span { display: block; margin-top: 8px; color: var(--muted); font-size: .72rem; line-height: 1.35; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(290px, .8fr); gap: 16px; }
.profile-main, .profile-side { border-radius: var(--radius-lg); }
.profile-main { padding: 36px; border: 1px solid var(--line); background: var(--white); }
.profile-main p { margin: 0 0 17px; color: #485763; }
.profile-main p:last-child { margin-bottom: 0; }
.profile-side { display: flex; flex-direction: column; justify-content: space-between; padding: 34px; background: var(--navy); color: var(--white); box-shadow: var(--shadow-sm); }
.profile-quote { margin: 0 0 32px; font-size: 1.28rem; font-weight: 740; line-height: 1.45; letter-spacing: -.015em; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-tags span { padding: 8px 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 999px; background: rgba(255,255,255,.05); color: #dce4eb; font-size: .72rem; font-weight: 720; }

.expertise-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.expertise-card {
  min-height: 176px;
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.expertise-card:hover { transform: translateY(-3px); border-color: #c6d0d7; box-shadow: var(--shadow-sm); }
.expertise-card > span { color: var(--gold); font-size: .67rem; font-weight: 900; letter-spacing: .14em; }
.expertise-card h3 { margin: 12px 0 8px; color: var(--navy); font-size: 1rem; line-height: 1.3; }
.expertise-card p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.55; }

.management-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.management-card { padding: 36px; border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--white); }
.management-card--dark { border: 0; background: linear-gradient(145deg, var(--navy), #173b58); color: var(--white); box-shadow: var(--shadow); }
.management-card h2 { margin: 0 0 18px; font-size: clamp(2rem, 3.8vw, 3.35rem); line-height: 1.04; letter-spacing: -.045em; }
.management-card p { margin: 0 0 16px; color: var(--muted); }
.management-card--dark p { color: #d3dee6; }
.check-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding: 10px 10px 10px 28px; border: 1px solid rgba(255,255,255,.11); border-radius: 12px; background: rgba(255,255,255,.045); color: #e6edf2; font-size: .78rem; }
.check-list li::before { content: "✓"; position: absolute; left: 10px; color: #d8c48e; font-weight: 900; }
.technology-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.technology-pills span { padding: 9px 11px; border: 1px solid #ced7dd; border-radius: 12px; background: var(--soft); color: #3d4d59; font-size: .78rem; font-weight: 760; }

.projects-section { position: relative; overflow: hidden; background: #07192a; }
.projects-section::before { content: ""; position: absolute; width: 620px; height: 620px; top: -320px; right: -260px; border-radius: 50%; background: radial-gradient(circle, rgba(190,166,111,.18), transparent 68%); }
.project-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-button { padding: 9px 14px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(255,255,255,.04); color: #d7e0e7; font-size: .78rem; font-weight: 780; cursor: pointer; }
.filter-button:hover { background: rgba(255,255,255,.08); }
.filter-button.is-active { border-color: var(--white); background: var(--white); color: var(--navy); }
.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.project-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.11); border-radius: 22px; background: rgba(255,255,255,.055); transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.075); }
.project-card[hidden] { display: none; }
.project-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.08); }
.project-cover--image { background: #dfe6eb; }
.project-cover--image img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .35s ease; }
.project-card:hover .project-cover--image img { transform: scale(1.025); }
.project-cover--brand { display: grid; place-content: center; padding: 28px; background: linear-gradient(140deg, #183b58, #0d2438); text-align: center; }
.project-cover--brand::after { content: ""; position: absolute; width: 180px; height: 180px; top: -90px; right: -70px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.project-cover--brand span { display: block; color: #f2ead7; font-size: 2.8rem; font-weight: 950; letter-spacing: -.08em; line-height: 1; }
.project-cover--brand small { display: block; margin-top: 9px; color: #bac8d2; font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.project-cover--green { background: linear-gradient(140deg, #1e5b4d, #102f29); }
.project-cover--warm { background: linear-gradient(140deg, #684f46, #2f2624); }
.project-cover--slate { background: linear-gradient(140deg, #35465b, #172230); }
.project-card-body { display: flex; flex: 1; flex-direction: column; padding: 18px; }
.project-card-meta { margin-bottom: 8px; color: #d4c18d; font-size: .66rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.project-card h3 { margin: 0 0 8px; color: var(--white); font-size: 1.08rem; line-height: 1.28; letter-spacing: -.012em; }
.project-card p { display: -webkit-box; margin: 0 0 14px; overflow: hidden; color: #b9c5ce; font-size: .79rem; line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.tag-row span { padding: 5px 8px; border-radius: 999px; background: rgba(255,255,255,.07); color: #d4dde4; font-size: .64rem; font-weight: 720; }
.project-open { align-self: flex-start; margin-top: 16px; padding: 8px 0; border: 0; background: transparent; color: #f0dfae; font-size: .79rem; font-weight: 850; cursor: pointer; }
.project-open::after { content: "  ↗"; }
.project-open:hover { color: var(--white); }
.noscript-note { color: #d7e0e7; }

.timeline { position: relative; border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 34px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline-years { color: var(--green); font-size: .82rem; font-weight: 850; letter-spacing: .04em; }
.timeline-item h3 { margin: 0 0 8px; color: var(--navy); font-size: 1.05rem; }
.timeline-item p { margin: 0; max-width: 820px; color: var(--muted); font-size: .9rem; }
.timeline-results { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.timeline-results span { padding: 6px 9px; border: 1px solid #d1d9df; border-radius: 999px; background: var(--white); color: #4d5b66; font-size: .68rem; font-weight: 740; }
.timeline-toggle { margin-top: 20px; padding: 10px 0; border: 0; background: transparent; color: var(--green); font-weight: 850; cursor: pointer; }
.timeline-toggle::after { content: " ↓"; }
.timeline-toggle[aria-expanded="true"]::after { content: " ↑"; }

.skills-layout { display: grid; grid-template-columns: minmax(270px, .75fr) minmax(0, 1.25fr); gap: 60px; align-items: start; }
.skills-layout h2 { margin: 0 0 16px; font-size: clamp(2.1rem, 4.2vw, 3.8rem); line-height: 1.04; letter-spacing: -.045em; }
.skills-intro { margin: 0; color: var(--muted); }
.skills-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.skills-cloud span { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: #485763; font-size: .76rem; font-weight: 720; }

.why-section { padding-top: 0; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.why-grid article { min-height: 150px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); }
.why-grid strong { color: var(--navy); font-size: .95rem; }
.why-grid p { margin: 8px 0 0; color: var(--muted); font-size: .82rem; }

.contact-section { padding: 28px 0 72px; }
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 42px; align-items: end; padding: 44px; border-radius: var(--radius-xl); background: linear-gradient(140deg, var(--navy), #173b58); color: var(--white); box-shadow: var(--shadow); }
.contact-card h2 { margin: 0 0 16px; max-width: 850px; font-size: clamp(2.1rem, 4.5vw, 4rem); line-height: 1.03; letter-spacing: -.045em; }
.contact-card p:not(.eyebrow) { margin: 0; max-width: 800px; color: #cfdae2; }
.contact-actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }

.site-footer { padding: 36px 0 24px; border-top: 1px solid var(--line); background: #fafbfb; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.monogram--footer { width: 46px; height: 46px; }
.footer-brand strong { display: block; color: var(--navy); }
.footer-brand span:not(.monogram) { display: block; max-width: 620px; margin-top: 4px; color: var(--muted); font-size: .73rem; }
.footer-meta { display: grid; gap: 3px; text-align: right; color: var(--muted); font-size: .74rem; }
.footer-meta a:hover { color: var(--navy); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: #7a858d; font-size: .68rem; }
.footer-bottom a:hover { color: var(--navy); }

/* Project dialog */
dialog { border: 0; padding: 0; }
dialog::backdrop { background: rgba(4, 16, 26, .74); backdrop-filter: blur(5px); }
.project-dialog { width: min(1120px, calc(100% - 32px)); max-height: calc(100dvh - 32px); border-radius: 26px; background: var(--white); color: var(--ink); box-shadow: 0 34px 90px rgba(0,0,0,.28); }
.project-dialog[open] { animation: dialogIn .18s ease-out; }
.dialog-shell { position: relative; max-height: calc(100dvh - 32px); overflow: auto; }
.dialog-close { position: sticky; top: 12px; float: right; z-index: 10; width: 42px; height: 42px; margin: 12px 12px -54px 0; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.94); color: var(--navy); font-size: 1.55rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); }
.dialog-content { display: grid; grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr); gap: 28px; padding: 34px; }
.dialog-copy { padding: 16px 4px 10px 8px; }
.dialog-category { margin: 0 0 8px; color: var(--green); font-size: .7rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.dialog-copy h2 { margin: 0 0 14px; color: var(--navy); font-size: clamp(1.8rem, 3.8vw, 3rem); line-height: 1.06; letter-spacing: -.04em; }
.dialog-description { margin: 0 0 20px; color: var(--muted); }
.dialog-features { display: grid; gap: 8px; margin: 0 0 20px; }
.dialog-features span { position: relative; padding-left: 18px; color: #3f4e59; font-size: .81rem; }
.dialog-features span::before { content: ""; position: absolute; left: 0; top: .68em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.dialog-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.dialog-tags span { padding: 6px 9px; border-radius: 999px; background: var(--soft); color: #54626d; font-size: .67rem; font-weight: 740; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dialog-gallery { min-width: 0; }
.gallery-main { width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #edf1f3; cursor: zoom-in; }
.gallery-main img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: #eef2f4; }
.gallery-main-caption { padding: 10px 12px; color: var(--muted); font-size: .72rem; text-align: left; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.gallery-thumb { padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 10px; background: #eef2f4; cursor: pointer; }
.gallery-thumb.is-active { border-color: var(--green); }
.gallery-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center; }
.gallery-placeholder { display: grid; min-height: 420px; place-items: center; padding: 36px; border-radius: 20px; background: linear-gradient(145deg, #0d263c, #1d5b4c); color: var(--white); text-align: center; }
.gallery-placeholder strong { display: block; font-size: 3.8rem; letter-spacing: -.08em; }
.gallery-placeholder span { display: block; max-width: 430px; margin-top: 12px; color: #d6e1e5; }

.image-dialog { width: min(1500px, calc(100% - 28px)); max-height: calc(100dvh - 28px); overflow: auto; border-radius: 20px; background: #07111a; color: var(--white); box-shadow: 0 30px 80px rgba(0,0,0,.38); }
.image-dialog img { width: 100%; height: auto; max-height: calc(100dvh - 110px); object-fit: contain; background: #e8edef; }
.image-dialog p { margin: 0; padding: 10px 16px 14px; color: #cbd5dc; font-size: .75rem; }
.image-dialog-close { position: fixed; top: 22px; right: 28px; z-index: 20; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(4,16,26,.88); color: var(--white); font-size: 1.7rem; cursor: pointer; }

@keyframes dialogIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1080px) {
  .main-nav { gap: 12px; }
  .main-nav a { font-size: .78rem; }
  .header-cta { display: none; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(320px, .8fr); gap: 44px; }
  .proof-grid { grid-template-columns: repeat(3, 1fr); }
  .proof-grid article:nth-child(3)::after { display: none; }
  .proof-grid article:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .expertise-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  html { scroll-padding-top: 74px; }
  .container { width: min(calc(100% - 30px), var(--container)); }
  .section { padding: 72px 0; }
  .menu-toggle { display: block; }
  .main-nav {
    position: fixed;
    top: 74px;
    left: 15px;
    right: 15px;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .main-nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; font-size: .9rem; }
  .main-nav a:hover { background: var(--soft); }
  .main-nav a::after { display: none; }

  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .hero { padding: 58px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero h1 { font-size: clamp(3.6rem, 14vw, 6.2rem); }
  .hero-photo-wrap { min-height: 540px; width: min(100%, 540px); margin-inline: auto; }
  .hero-photo-note { left: 18px; bottom: 18px; }

  .section-heading { grid-template-columns: 1fr; gap: 14px; }
  .section-heading > p { max-width: 620px; }
  .profile-grid, .management-grid, .skills-layout, .contact-card, .footer-grid, .dialog-content { grid-template-columns: 1fr; }
  .skills-layout { gap: 30px; }
  .contact-actions { flex-direction: row; flex-wrap: wrap; }
  .contact-actions .button { flex: 1 1 150px; }
  .footer-meta { text-align: left; }
  .dialog-content { gap: 18px; padding: 24px; }
  .dialog-copy { padding: 18px 4px 0; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .section { padding: 58px 0; }
  .header-inner { min-height: 68px; }
  .brand-copy small { display: none; }
  .main-nav { top: 68px; left: 12px; right: 12px; }

  .hero { padding-top: 44px; }
  .hero h1 { margin-top: 9px; margin-bottom: 18px; font-size: clamp(3.25rem, 18vw, 5rem); }
  .hero-role { font-size: 1.03rem; }
  .hero-lead, .hero-support { font-size: .91rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions .button { width: 100%; }
  .hero-actions .button--text { grid-column: 1 / -1; min-height: 38px; justify-content: flex-start; }
  .hero-signals { display: grid; gap: 8px; }
  .hero-photo-wrap { min-height: 470px; }
  .hero-photo-frame { border-radius: 26px; }
  .hero-photo-note { width: calc(100% - 36px); }

  .proof-grid { grid-template-columns: repeat(2, 1fr); border-radius: 18px; }
  .proof-grid article { min-height: 108px; padding: 17px 15px; }
  .proof-grid article:nth-child(2n)::after { display: none; }
  .proof-grid article:nth-child(3)::after { display: block; }
  .proof-grid article:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .proof-grid article:nth-child(5) { border-bottom: 0; }

  .section-heading h2 { font-size: clamp(2rem, 11vw, 3rem); }
  .profile-main, .profile-side, .management-card, .contact-card { padding: 24px; border-radius: 22px; }
  .profile-main p { font-size: .91rem; }
  .profile-quote { font-size: 1.1rem; }
  .expertise-grid { grid-template-columns: 1fr; }
  .expertise-card { min-height: auto; }
  .check-list { grid-template-columns: 1fr; }

  .project-toolbar { flex-wrap: nowrap; overflow-x: auto; margin-right: -12px; padding-right: 12px; scrollbar-width: none; }
  .project-toolbar::-webkit-scrollbar { display: none; }
  .filter-button { flex: 0 0 auto; }
  .project-grid { grid-template-columns: 1fr; gap: 12px; }
  .project-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); border-radius: 18px; }
  .project-cover { aspect-ratio: auto; min-height: 100%; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.08); }
  .project-cover--brand { padding: 14px; }
  .project-cover--brand span { font-size: 2rem; }
  .project-cover--brand small { font-size: .55rem; }
  .project-cover--image img { height: 100%; min-height: 170px; object-fit: cover; object-position: top center; }
  .project-card-body { padding: 14px 14px 13px; }
  .project-card h3 { font-size: .96rem; }
  .project-card p { display: -webkit-box; margin-bottom: 10px; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .75rem; }
  .tag-row span:nth-child(n+3) { display: none; }
  .project-open { margin-top: 9px; }

  .timeline-item { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .timeline-results { gap: 5px; }
  .skills-cloud { gap: 6px; }
  .skills-cloud span { padding: 7px 9px; font-size: .69rem; }
  .why-grid { grid-template-columns: 1fr; }
  .why-grid article { min-height: auto; }

  .contact-card { gap: 26px; }
  .contact-card h2 { font-size: clamp(2rem, 10vw, 2.8rem); }
  .contact-actions { display: grid; grid-template-columns: 1fr; }
  .contact-actions .button { width: 100%; }
  .footer-grid { gap: 22px; }
  .footer-bottom { display: grid; }

  .project-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 18px; }
  .dialog-shell { max-height: calc(100dvh - 16px); }
  .dialog-content { padding: 18px; }
  .dialog-copy { padding: 12px 2px 0; }
  .dialog-copy h2 { font-size: 1.9rem; }
  .dialog-gallery { order: -1; padding-top: 44px; }
  .gallery-main img { aspect-ratio: 16 / 11; }
  .gallery-thumbs { grid-template-columns: repeat(5, 78px); overflow-x: auto; padding-bottom: 3px; scrollbar-width: thin; }
  .gallery-placeholder { min-height: 280px; }
  .gallery-placeholder strong { font-size: 2.8rem; }
  .image-dialog-close { top: 14px; right: 18px; }
}

@media (max-width: 380px) {
  .brand-copy strong { font-size: .87rem; }
  .monogram { width: 40px; height: 40px; }
  .hero-actions { grid-template-columns: 1fr; }
  .hero-actions .button--text { grid-column: auto; }
  .hero-photo-wrap { min-height: 430px; }
  .project-card { grid-template-columns: 105px minmax(0, 1fr); }
  .project-card-body { padding: 12px; }
  .project-card-meta { font-size: .59rem; }
}

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

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--soft); }
.error-box { width: min(620px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 28px; background: var(--white); box-shadow: var(--shadow); }
.error-box h1 { margin: 22px 0 10px; color: var(--navy); font-size: clamp(2rem, 8vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.error-box p { margin: 0 0 14px; color: var(--muted); }
