:root {
  color-scheme: dark;
  --ink: #e5eef8;
  --muted: #a8b5c7;
  --line: rgba(148, 163, 184, .22);
  --panel: rgba(15, 23, 42, .78);
  --soft: #09111f;
  --brand: #2dd4bf;
  --brand-strong: #5eead4;
  --accent: #60a5fa;
  --dark: #030712;
  --gold: #f6c35f;
  --shadow: 0 22px 60px rgba(0, 0, 0, .34);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, .24);
  --radius: 12px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #030712 0, #09111f 100%);
  line-height: 1.6;
}
a { color: var(--accent); font-weight: 700; text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 20;
}
.skip-link:focus { left: 12px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.site-header {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .94), rgba(10, 32, 54, .96)),
    radial-gradient(circle at 20% 10%, rgba(45, 212, 191, .34), transparent 28rem);
  border-bottom: 1px solid rgba(94, 234, 212, .38);
}
.home-hero { min-height: 640px; display: flex; flex-direction: column; justify-content: center; }
.compact-hero .hero { padding: 56px 0 34px; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-size: 15px; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 900;
}
.nav { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nav-link, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, .45);
  border-radius: 10px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, .08);
  color: #e6f4ff;
  text-decoration: none;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.nav-link:hover, .button:hover { transform: translateY(-1px); border-color: rgba(94, 234, 212, .7); }
.button { background: #eef6ff; color: #113a62; }
.button.primary { background: linear-gradient(135deg, var(--brand), #0e8f83); border-color: var(--brand); color: #fff; box-shadow: 0 14px 28px rgba(15, 118, 110, .26); }
.button.dark { background: #111827; border-color: #334155; color: #fff; }
.button.ghost { background: rgba(255, 255, 255, .78); color: #0f172a; }
.button.large { min-height: 46px; padding: 11px 16px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 36px; align-items: center; padding: 78px 24px 86px; }
.hero { padding: 40px 0 32px; }
.eyebrow {
  margin: 0 0 10px;
  color: #5eead4;
  font-weight: 900;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
h1, h2, h3 { line-height: 1.15; letter-spacing: 0; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 74px); max-width: 940px; }
.home-hero h1 span {
  display: block;
  max-width: 780px;
  font-size: clamp(50px, 7vw, 88px);
  letter-spacing: -.02em;
}
.home-hero h1 small {
  display: block;
  margin-top: 24px;
  max-width: 760px;
  color: #dff7ff;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 800;
  line-height: 1.25;
}
h2 { margin: 0 0 14px; font-size: clamp(25px, 3vw, 38px); color: var(--ink); }
h3 { margin: 0 0 9px; font-size: 19px; }
p { margin: 8px 0; }
.subtitle, .hero-statement { color: #d7e6f7; max-width: 880px; font-size: 18px; }
.hero-statement { font-size: 20px; margin-top: 20px; }
.availability-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 24px 0 8px;
  padding: 10px 14px;
  border: 1px solid rgba(94, 234, 212, .4);
  border-radius: 999px;
  background: rgba(15, 118, 110, .18);
  color: #e6fffb;
}
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 6px rgba(34,197,94,.18); }
.hero-actions, .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, .38);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #e6f4ff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.social-link:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 234, 212, .75);
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.social-link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}
.glass-card {
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 8%, rgba(94, 234, 212, .16), transparent 16rem),
    linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.06));
  box-shadow: 0 20px 55px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
}
.panel-header, .card-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 900; }
.profile-visual {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.profile-visual img {
  width: 104px;
  height: 104px;
  border-radius: 28px;
  object-fit: cover;
  border: 2px solid rgba(94, 234, 212, .62);
  box-shadow: 0 22px 42px rgba(0, 0, 0, .3), 0 0 0 7px rgba(45, 212, 191, .1);
}
.profile-visual strong,
.profile-visual span,
.profile-visual small {
  display: block;
}
.profile-visual strong {
  color: #fff;
  font-size: 21px;
  line-height: 1.2;
}
.profile-visual span {
  margin-top: 5px;
  color: #bfe9ff;
  font-size: 13px;
  font-weight: 750;
}
.profile-visual small {
  margin-top: 8px;
  color: #9ff7e9;
  font-size: 12px;
  font-weight: 850;
}
.live-pill { border-radius: 999px; padding: 4px 9px; background: rgba(34,197,94,.18); color: #bbf7d0; font-size: 12px; }
main { max-width: 1200px; margin: 0 auto; padding: 30px 24px 70px; }
.section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(22px, 4vw, 34px);
  margin-bottom: 24px;
  box-shadow: var(--shadow-soft);
}
.feature { box-shadow: var(--shadow); }
.section-heading { max-width: 860px; margin-bottom: 20px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 24px; align-items: start; }
.grid, .project-grid, .skills-grid, .incident-grid, .metric-grid, .logo-strip, .contact-grid { display: grid; gap: 16px; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.skills-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.incident-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.premium-card, .project-card, .skill-card, .incident-card, .award-card, .metric, .cert-card, .logo-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.74);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(15,23,42,.04);
}
[data-theme="dark"] .premium-card, [data-theme="dark"] .project-card, [data-theme="dark"] .skill-card, [data-theme="dark"] .incident-card, [data-theme="dark"] .award-card, [data-theme="dark"] .metric, [data-theme="dark"] .cert-card, [data-theme="dark"] .logo-tile {
  background: rgba(15, 23, 42, .74);
}
.premium-card, .project-card { display: flex; flex-direction: column; min-height: 330px; }
.project-card .links { margin-top: auto; }
.card-topline { color: var(--brand); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.metric b { display: block; color: var(--brand); font-size: 30px; line-height: 1; margin-bottom: 8px; }
.metric span, .muted { color: var(--muted); }
.hero-panel .metric {
  min-height: 116px;
  background: linear-gradient(180deg, rgba(248, 250, 252, .96), rgba(226, 232, 240, .94));
  color: #102033;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 14px 28px rgba(2, 6, 23, .14);
}
.hero-panel .metric b { color: #0f766e; font-size: 28px; }
.hero-panel .metric span { color: #48576a; }
.hero-panel .metric em {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.tag {
  display: inline-block;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: 999px;
  padding: 5px 10px;
  margin: 5px 5px 0 0;
  color: var(--brand-strong);
  background: color-mix(in srgb, var(--brand) 9%, transparent);
  font-size: 12px;
  font-weight: 800;
}
.note {
  border-left: 4px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  padding: 14px 16px;
  border-radius: 10px;
  color: var(--ink);
}
.logo-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 18px; }
.logo-tile { display: flex; align-items: center; gap: 10px; }
.logo-tile img, .skill-icon img, .cert-card img { width: 34px; height: 34px; object-fit: contain; }
.skill-card { min-height: 185px; }
.skill-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: #fff; margin-bottom: 12px; }
.diagram-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255,255,255,.72);
}
[data-theme="dark"] .diagram-shell { background: rgba(2, 6, 23, .68); }
.diagram-shell .mermaid { min-width: 980px; text-align: center; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.toc {
  position: sticky;
  top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.toc h2 { font-size: 18px; }
.toc a { display: block; margin: 9px 0; text-decoration: none; }
.toc-actions { margin-top: 18px; }
.meta-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.meta {
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.08);
  color: #e5eef8;
}
.meta b { display: block; color: #5eead4; }
.mini-architecture { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 22px; }
.mini-architecture div {
  flex: 1 1 76px;
  min-width: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 10px;
  padding: 10px 8px;
  color: #e6fffb;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255,255,255,.06);
}
.mini-architecture img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  padding: 2px;
  border-radius: 5px;
  background: rgba(255,255,255,.9);
}
.mini-architecture span { flex: 0 0 14px; height: 2px; background: #5eead4; }
.timeline { position: relative; display: grid; gap: 16px; }
.timeline article { padding: 2px 0 18px; }
.timeline time { display: inline-block; color: var(--brand); font-weight: 900; margin-bottom: 6px; }
.timeline-list { list-style: none; padding: 0; counter-reset: step; }
.timeline-list li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; margin: 12px 0; align-items: start; }
.timeline-list span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 900; }
.incident-card dl { margin: 0; }
.incident-card dt { color: var(--brand); font-weight: 900; margin-top: 10px; }
.incident-card dd { margin: 3px 0 0; color: var(--muted); }
.cert-card { display: flex; gap: 18px; align-items: center; }
.contact-section { background: linear-gradient(135deg, rgba(15,118,110,.12), rgba(37,99,235,.08)); }
.contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.contact-grid a, .contact-grid span { text-decoration: none; }
.contact-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 13px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.contact-item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  box-shadow: var(--shadow-soft);
}
.contact-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15,118,110,.14), rgba(37,99,235,.12));
  color: var(--brand-strong);
}
.contact-icon svg,
.contact-icon img {
  width: 23px;
  height: 23px;
  object-fit: contain;
  fill: currentColor;
}
.contact-item strong,
.contact-item small {
  display: block;
}
.contact-item strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}
.contact-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}
.code-block {
  background: #0f172a;
  color: #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  overflow-x: auto;
  font-size: 13px;
}
.placeholder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.placeholder-grid div {
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  text-align: center;
  padding: 14px;
}
.project-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media (max-width: 980px) {
  .hero-grid, .two-col, .grid, .project-grid, .three, .skills-grid, .incident-grid, .project-list, .case-layout, .contact-grid { grid-template-columns: 1fr; }
  .metric-grid, .logo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-row { align-items: flex-start; flex-direction: column; }
  .toc { position: static; }
  .home-hero { min-height: auto; }
}
@media (max-width: 620px) {
  .wrap, main { padding-left: 16px; padding-right: 16px; }
  .hero-grid { padding-top: 44px; padding-bottom: 52px; }
  .social-link { flex: 1 1 130px; justify-content: center; }
  .profile-visual { grid-template-columns: 76px 1fr; }
  .profile-visual img { width: 76px; height: 76px; border-radius: 20px; }
  h1 { font-size: 36px; }
  .hero-statement { font-size: 17px; }
  .metric-grid, .logo-strip, .placeholder-grid { grid-template-columns: 1fr; }
  .button, .nav-link { width: 100%; }
  .mini-architecture { grid-template-columns: 1fr; }
  .mini-architecture span { display: none; }
  .contact-item { grid-template-columns: 42px 1fr; }
  .contact-icon { width: 42px; height: 42px; border-radius: 12px; }
}
