/* ==========================================================================
   Girish Burade — DevOps / Cloud Engineer portfolio
   Dark-first engineering UI. No framework; loaded by index.html only.
   ========================================================================== */

:root {
   --bg: #07090e;
   --bg-2: #0a0e16;
   --surface: rgba(16, 21, 32, .72);
   --surface-solid: #0e131d;
   --surface-2: #121926;
   --border: rgba(148, 163, 184, .12);
   --border-strong: rgba(148, 163, 184, .26);
   --text: #e6eaf2;
   --muted: #a3afc2;
   --dim: #6b7890;
   --cyan: #22d3ee;
   --blue: #3b82f6;
   --purple: #a78bfa;
   --green: #34d399;
   --amber: #fbbf24;
   --grad: linear-gradient(100deg, #22d3ee 0%, #60a5fa 45%, #a78bfa 100%);
   --radius: 14px;
   --radius-sm: 9px;
   --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
   --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
   --shadow: 0 24px 60px rgba(0, 0, 0, .45);
   --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
   margin: 0;
   background: var(--bg);
   color: var(--text);
   font-family: var(--sans);
   font-size: 16px;
   line-height: 1.65;
   overflow-x: hidden;
   -webkit-font-smoothing: antialiased;
}
body::before {
   content: "";
   position: fixed;
   inset: 0;
   z-index: -1;
   pointer-events: none;
   background:
      radial-gradient(800px 480px at 90% -8%, rgba(167, 139, 250, .13), transparent 60%),
      radial-gradient(700px 520px at -10% 10%, rgba(34, 211, 238, .09), transparent 60%),
      linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 44px 44px,
      linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 44px 44px;
   -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 70vh, rgba(0, 0, 0, .35) 100vh);
   mask-image: linear-gradient(to bottom, #000 0, #000 70vh, rgba(0, 0, 0, .35) 100vh);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
h1, h2, h3, h4 { color: #fff; line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); font-size: .8em; }
.dim { color: var(--dim); }
.accent { color: var(--cyan); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cyan); color: #000; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* Icons ------------------------------------------------------------------ */
.ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-xs { width: 13px; height: 13px; }
.ic-lg { width: 26px; height: 26px; }

/* Buttons ---------------------------------------------------------------- */
.btn {
   display: inline-flex; align-items: center; justify-content: center; gap: 8px;
   min-height: 44px; padding: 10px 18px;
   border-radius: 10px; border: 1px solid var(--border-strong);
   font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap;
   color: var(--text); background: rgba(255, 255, 255, .02);
   cursor: pointer; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s, color .2s;
}
.btn:hover { color: #fff; border-color: var(--cyan); transform: translateY(-1px); }
.btn-primary { background: var(--cyan); border-color: var(--cyan); color: #04121a; }
.btn-primary:hover { color: #04121a; background: #67e8f9; box-shadow: 0 10px 30px rgba(34, 211, 238, .25); }
.btn-outline { border-color: rgba(34, 211, 238, .45); color: var(--cyan); }
.btn-outline:hover { background: rgba(34, 211, 238, .08); }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: #fff; border-color: var(--border-strong); }

.pill {
   display: inline-flex; align-items: center; gap: 8px;
   padding: 4px 12px; border-radius: 999px;
   border: 1px solid var(--border); background: rgba(255, 255, 255, .02);
   font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: ping 2.2s infinite; flex-shrink: 0; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 11.5px; padding: 3px 9px; border-radius: 6px; color: #a5e9f5; background: rgba(34, 211, 238, .07); border: 1px solid rgba(34, 211, 238, .18); }

/* Navbar ----------------------------------------------------------------- */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); background: rgba(7, 9, 14, .72); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--border); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; }
.brand:hover { color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-size: 13px; color: var(--cyan); border: 1.5px solid rgba(34, 211, 238, .6); background: rgba(34, 211, 238, .06); }
.brand-text { font-family: var(--mono); font-size: 15px; }
.brand-text span { color: var(--dim); }
.nav-menu { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-menu > a:not(.btn) { position: relative; padding: 8px 11px; font-size: 14.5px; color: var(--muted); border-radius: 8px; }
.nav-menu > a:not(.btn):hover { color: #fff; background: rgba(255, 255, 255, .04); }
.nav-menu > a.active { color: #fff; }
.nav-menu > a.active::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }
.nav-menu .btn { margin-left: 10px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border-strong); background: transparent; cursor: pointer; place-items: center; }

/* Hero ------------------------------------------------------------------- */
.hero { padding: 84px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan); padding: 6px 14px; border: 1px solid rgba(34, 211, 238, .28); border-radius: 999px; background: rgba(34, 211, 238, .05); }
.hero h1 { margin: 22px 0 18px; font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 580px; }
.lead strong { color: var(--text); font-weight: 600; }
.tech-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 30px; }
.tech-badges li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--border); animation: floaty 6s ease-in-out infinite; }
.tech-badges li .ic { color: var(--cyan); width: 16px; height: 16px; }
.tech-badges li:nth-child(2n) { animation-delay: -2s; }
.tech-badges li:nth-child(3n) { animation-delay: -4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Sections --------------------------------------------------------------- */
.section { padding: 96px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, transparent, rgba(14, 19, 29, .55) 12%, rgba(14, 19, 29, .55) 88%, transparent); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p { margin-top: 12px; color: var(--muted); }
.kicker { display: inline-block; font-family: var(--mono); font-size: 13px; color: var(--cyan); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.kicker::before { content: "// "; color: var(--dim); }
.section h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; letter-spacing: -.025em; }
.infra-sub { margin: 72px 0 22px; }
.infra-sub h3 { font-size: clamp(22px, 2.6vw, 28px); }

.pill-live { color: var(--green); border-color: rgba(52, 211, 153, .35); }

/* Hero capability tiles -------------------------------------------------- */
.hero-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.tile::before { content: ""; position: absolute; inset: -1px; background: radial-gradient(220px 120px at 100% 0%, rgba(34, 211, 238, .12), transparent 70%); pointer-events: none; }
.tile:hover { border-color: rgba(34, 211, 238, .45); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.tile .ic { color: var(--cyan); margin-bottom: 12px; }
.tile-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.tile b { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.tile > span:last-child { font-size: 13px; color: var(--muted); }
@media (min-width: 961px) { .tile:nth-child(even) { margin: 26px 0 -26px; } }

/* About profile banner --------------------------------------------------- */
.profile-banner { display: grid; grid-template-columns: 320px minmax(0, 1fr); margin-bottom: 44px; border-radius: 20px; border: 1px solid var(--border-strong); overflow: hidden; box-shadow: var(--shadow);
   background: radial-gradient(520px 260px at 100% 0%, rgba(167, 139, 250, .12), transparent 70%), radial-gradient(480px 260px at 30% 100%, rgba(34, 211, 238, .08), transparent 70%), var(--surface-solid); }
.pb-photo { position: relative; min-height: 340px; }
.pb-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.pb-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, rgba(14, 19, 29, .9)); pointer-events: none; }
.pb-body { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 34px 38px; min-width: 0; }
.pb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.pb-head h3 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.pb-role { margin-top: 4px; font-family: var(--mono); font-size: 15px; color: var(--cyan); }
.pb-exp { text-align: right; }
.pb-exp-value { display: block; font-size: clamp(42px, 5.4vw, 64px); font-weight: 800; line-height: 1; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pb-exp-label { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.certs { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 12px; }
.cert { display: flex; align-items: center; gap: 14px; height: 100%; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255, 255, 255, .02); color: inherit; transition: border-color .25s, transform .25s, background .25s; }
.cert:hover { border-color: rgba(167, 139, 250, .45); transform: translateY(-2px); color: inherit; }
.cert img { width: 76px; height: 76px; border-radius: 12px; flex-shrink: 0; }
.cert-icon { display: grid; place-items: center; width: 58px; height: 58px; flex-shrink: 0; border-radius: 14px; color: var(--purple); background: rgba(167, 139, 250, .1); border: 1px solid rgba(167, 139, 250, .3); }
.cert-text { display: flex; flex-direction: column; min-width: 0; }
.cert-text small { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.cert-text b { font-size: 16.5px; line-height: 1.3; color: #fff; }
.cert-text em { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-style: normal; font-size: 12.5px; color: var(--muted); }
.cert-primary { border-color: rgba(34, 211, 238, .38); background: rgba(34, 211, 238, .06); }
.cert-primary:hover { border-color: var(--cyan); }
.cert-primary em { color: var(--cyan); }

/* About ------------------------------------------------------------------ */
.about-body { max-width: 980px; }
.about-lead { font-size: 18px; color: var(--muted); }
.about-lead strong { color: #fff; font-weight: 600; }
.focus-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.focus-list li { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.focus-list .ic { color: var(--cyan); margin-top: 3px; }
.focus-list b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.focus-list span { font-size: 14px; color: var(--muted); }
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.principles div { padding: 14px 16px; border-left: 2px solid rgba(34, 211, 238, .4); background: rgba(255, 255, 255, .015); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.principles p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* Diagrams (rendered by js/portfolio.js) --------------------------------- */
.infra-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.diagram { position: relative; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.diagram::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 260px at 50% 45%, rgba(34, 211, 238, .06), transparent 70%); }
.flow { --gap: 16px; position: relative; max-width: 560px; margin: 0 auto; }
.flow-row { display: grid; gap: var(--gap); }
.node {
   position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0;
   padding: 12px 14px; text-align: left; cursor: pointer;
   border-radius: 11px; border: 1px solid var(--border-strong);
   background: linear-gradient(180deg, rgba(22, 29, 44, .95), rgba(14, 19, 29, .95));
   transition: border-color .25s, box-shadow .25s, transform .25s;
}
.node .ic { width: 22px; height: 22px; color: var(--cyan); }
.node-text { display: flex; flex-direction: column; min-width: 0; }
.node-title { font-weight: 600; font-size: 14.5px; color: #fff; line-height: 1.3; }
.node-sub { font-family: var(--mono); font-size: 11.5px; color: var(--dim); line-height: 1.35; }
.node:hover, .node.is-active { border-color: rgba(34, 211, 238, .7); box-shadow: 0 0 0 4px rgba(34, 211, 238, .08), 0 0 24px rgba(34, 211, 238, .18); }
.node[data-kind="az"] { border-style: dashed; }
.node[data-kind="az"] .ic { color: var(--purple); }
.node[data-kind="watch"] .ic { color: var(--green); }
.node[data-kind="source"] .ic { color: var(--amber); }
.node::after { content: ""; position: absolute; top: 9px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); opacity: .8; box-shadow: 0 0 8px var(--green); }

.conn { position: relative; height: 36px; }
.conn i { position: absolute; display: block; background-color: rgba(148, 163, 184, .28); }
.conn .v { width: 2px; margin-left: -1px; }
.conn .h { height: 2px; top: calc(50% - 1px); }
.conn .v::after, .conn .h::after { content: ""; position: absolute; inset: 0; background-repeat: no-repeat; }
.conn .v::after { background-image: linear-gradient(to bottom, transparent, var(--cyan), transparent); background-size: 100% 14px; animation: flowY 1.6s linear infinite; }
.conn .h::after { background-image: linear-gradient(to right, transparent, var(--cyan), transparent); background-size: 24px 100%; animation: flowX 1.6s linear infinite; }
@keyframes flowY { from { background-position: 0 -14px; } to { background-position: 0 24px; } }
@keyframes flowX { from { background-position: -24px 0; } to { background-position: calc(100% + 24px) 0; } }

/* sequential node reveal */
.flow .node, .flow .conn { opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease, border-color .25s, box-shadow .25s; transition-delay: calc(var(--i, 0) * 90ms), calc(var(--i, 0) * 90ms), 0s, 0s; }
.flow.in .node, .flow.in .conn { opacity: 1; transform: none; }

.inspector { position: sticky; top: calc(var(--nav-h) + 20px); padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.inspector-head { display: flex; gap: 14px; align-items: center; margin: 12px 0 12px; }
.inspector-head .ic { color: var(--cyan); padding: 10px; width: 46px; height: 46px; border-radius: 12px; background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .2); }
.inspector h3 { font-size: 18px; }
.inspector p { color: var(--muted); font-size: 15px; min-height: 72px; }
.legend { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 13px; color: var(--dim); }
.legend li { display: flex; align-items: center; gap: 10px; }
.lg { display: inline-block; flex-shrink: 0; }
.lg-flow { width: 22px; height: 2px; background: linear-gradient(90deg, rgba(148, 163, 184, .3), var(--cyan)); }
.lg-node { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.lg-az { width: 14px; height: 14px; border-radius: 4px; border: 1px dashed var(--purple); }

/* Pipeline --------------------------------------------------------------- */
.pipeline-block { margin-top: 0; padding: 30px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: linear-gradient(180deg, rgba(18, 25, 38, .9), rgba(10, 14, 22, .9)); box-shadow: var(--shadow); }
.pipeline-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.pipeline-head h3 { font-size: clamp(22px, 2.6vw, 28px); }
.pipeline { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 12px; counter-reset: stage; }
.stage {
   position: relative; counter-increment: stage;
   display: flex; flex-direction: column; align-items: center; gap: 8px;
   padding: 14px 6px 12px; border-radius: 11px; cursor: pointer; text-align: center;
   border: 1px solid var(--border); background: rgba(255, 255, 255, .02);
   transition: border-color .3s, background .3s, box-shadow .3s, transform .3s;
}
.stage::before { content: counter(stage, decimal-leading-zero); position: absolute; top: 5px; left: 7px; font-family: var(--mono); font-size: 9.5px; color: var(--dim); }
.stage:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -12px; width: 12px; height: 2px; background: rgba(148, 163, 184, .25); background-repeat: no-repeat; }
.stage.done:has(+ .stage.active)::after { background-image: linear-gradient(90deg, transparent, var(--cyan), transparent); background-size: 8px 100%; animation: flowX 0.9s linear infinite; }
.stage .ic { width: 24px; height: 24px; color: var(--dim); transition: color .3s; }
.stage-name { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.stage-desc { display: none; }
.stage.done .ic { color: var(--green); }
.stage.done { border-color: rgba(52, 211, 153, .25); }
.stage.done:not(:last-child)::after { background: rgba(52, 211, 153, .55); }
.stage.active { border-color: var(--cyan); background: rgba(34, 211, 238, .08); box-shadow: 0 0 0 4px rgba(34, 211, 238, .08), 0 0 26px rgba(34, 211, 238, .2); transform: translateY(-2px); }
.stage.active .ic { color: var(--cyan); animation: pulseIc 1s ease-in-out infinite; }
.stage.active .stage-name { color: #fff; }
.stage:hover, .stage:focus-visible { border-color: rgba(34, 211, 238, .7); }
.stage:focus-visible { outline-offset: 2px; }
@keyframes pulseIc { 50% { transform: scale(1.12); } }
.pipeline-wrap { position: relative; padding-bottom: 26px; }
.pipeline-rail { position: absolute; left: 0; right: 0; bottom: 6px; height: 4px; border-radius: 4px; background: rgba(148, 163, 184, .12); }
.pipeline-rail::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(148, 163, 184, .18) 10px 12px); }
.rail-fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--x, 0); border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px rgba(34, 211, 238, .35); transition: width .7s cubic-bezier(.5, 0, .2, 1); }
.rail-packet { position: absolute; z-index: 1; top: 50%; left: var(--x, 0); width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #ecfeff; box-shadow: 0 0 0 4px rgba(34, 211, 238, .25), 0 0 18px 5px rgba(34, 211, 238, .7); transition: left .7s cubic-bezier(.5, 0, .2, 1); }
.rail-packet::before { content: ""; position: absolute; right: 10px; top: 50%; width: 56px; height: 2px; margin-top: -1px; background: linear-gradient(to left, rgba(236, 254, 255, .9), transparent); }
.rail-packet::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(34, 211, 238, .6); animation: ripple 1.5s ease-out infinite; }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(2.2); opacity: 0; } }
.rail-reset .rail-fill, .rail-reset .rail-packet { transition: none; }
.stage { padding-bottom: 18px; }
.stage-bar { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 3px; border-radius: 3px; background: rgba(148, 163, 184, .12); overflow: hidden; opacity: 0; transition: opacity .2s; }
.stage-bar::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad); transform-origin: left; }
.stage.active .stage-bar, .stage.done .stage-bar { opacity: 1; }
.stage.done .stage-bar::after { background: var(--green); }
.stage.active.auto .stage-bar::after { animation: fillBar 1.5s linear forwards; }
@keyframes fillBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.stage.active { background-image: linear-gradient(110deg, transparent 35%, rgba(34, 211, 238, .16) 50%, transparent 65%); background-size: 250% 100%; animation: sweep 1.6s linear infinite; }
@keyframes sweep { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.stage.just-done { animation: donePulse .7s ease-out; }
@keyframes donePulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 100% { box-shadow: 0 0 0 12px rgba(52, 211, 153, 0); } }
.stage-panel { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 6px 16px; margin-top: 22px; padding: 16px 18px; border-radius: 11px; border: 1px solid var(--border); background: rgba(0, 0, 0, .25); }
.stage-panel b { font-size: 17px; color: #fff; }
.stage-panel p { grid-column: 1 / -1; color: var(--muted); font-size: 15px; }

/* Skills (tabbed) -------------------------------------------------------- */
.skills { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 0; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); overflow: hidden; }
.skill-tabs { display: flex; flex-direction: column; padding: 10px; gap: 2px; border-right: 1px solid var(--border); background: rgba(0, 0, 0, .18); }
.skill-tab { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14.5px; text-align: left; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.skill-tab .ic { color: var(--dim); transition: color .2s; }
.skill-tab:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.skill-tab[aria-selected="true"] { color: #fff; background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .35); }
.skill-tab[aria-selected="true"] .ic { color: var(--cyan); }
.skill-panel { padding: 28px 30px; animation: fadeIn .3s ease; }
.skill-panel[hidden] { display: none; }
.skill-panel h3 { font-size: 20px; margin-bottom: 18px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; padding: 7px 13px; border-radius: 8px; color: var(--text); background: rgba(255, 255, 255, .03); border: 1px solid var(--border); transition: border-color .2s, color .2s, background .2s; }
.chips li:hover { border-color: rgba(34, 211, 238, .5); color: #fff; background: rgba(34, 211, 238, .06); }
.chips li.hot { border-color: rgba(34, 211, 238, .4); color: #cffafe; background: rgba(34, 211, 238, .08); }
.skill-used { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--border); font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* Projects (compact) ----------------------------------------------------- */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pcard { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, transform .3s; }
.pcard:hover { border-color: rgba(34, 211, 238, .4); transform: translateY(-3px); }
.pcard h3 { font-size: 17px; }
.pcard p { font-size: 14px; color: var(--muted); flex: 1; }
.pcard .tags { margin-top: 4px; }
.pcard-featured { border-color: rgba(34, 211, 238, .28); background: linear-gradient(180deg, rgba(34, 211, 238, .06), transparent 60%), var(--surface); }
.pcard-more { border-style: dashed; background: transparent; }
.project-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* Experience timeline ---------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 22px; }
.timeline::before { content: ""; position: absolute; left: 212px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(to bottom, var(--cyan), rgba(167, 139, 250, .5), rgba(148, 163, 184, .1)); }
.job { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 48px; position: relative; }
.job::before { content: ""; position: absolute; left: 206px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--purple); }
.job:first-child::before { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 5px rgba(34, 211, 238, .15), 0 0 16px var(--cyan); }
.job-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 16px; text-align: right; }
.job-date { font-family: var(--mono); font-size: 14px; font-weight: 500; color: #fff; }
.job-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .3s; }
.job-card:hover { border-color: var(--border-strong); }
.job-card h3 { font-size: 21px; }
.job-co { margin: 4px 0 12px; font-weight: 600; }
.job-scope { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.job-scope b { color: var(--text); font-weight: 600; }
.contrib { display: grid; gap: 8px; margin-top: 16px; }
.contrib li { position: relative; padding-left: 22px; font-size: 15px; color: var(--text); }
.contrib li::before { content: ""; position: absolute; left: 3px; top: 9px; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg); border: 1.5px solid var(--cyan); }
details { margin-top: 12px; }
summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-family: var(--mono); font-size: 13px; color: var(--cyan); list-style: none; padding: 4px 0; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(34, 211, 238, .4); font-size: 12px; }
details[open] summary::before { content: "−"; }
details .contrib { margin-top: 8px; }

/* Contact ---------------------------------------------------------------- */
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 44px; border-radius: 20px; border: 1px solid var(--border-strong); background: radial-gradient(500px 240px at 0% 0%, rgba(34, 211, 238, .1), transparent 70%), radial-gradient(500px 240px at 100% 100%, rgba(167, 139, 250, .1), transparent 70%), var(--surface-solid); }
.contact-copy p { color: var(--muted); margin: 14px 0 22px; }
.contact-copy p b { color: var(--text); font-weight: 600; }
.closing { margin: 0; padding: 16px 18px; border-radius: 11px; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); font-family: var(--mono); font-size: 14px; line-height: 1.8; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.closing .t-prompt { color: var(--green); margin-right: 8px; user-select: none; }
.cursor { display: inline-block; width: 8px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--green); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.contact-wide { grid-column: 1 / -1; }
.contact-wide span { overflow-wrap: normal; white-space: nowrap; }
.contact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.contact-item { display: flex; align-items: center; gap: 8px; min-width: 0; border-radius: 11px; border: 1px solid var(--border); background: rgba(255, 255, 255, .02); transition: border-color .2s, transform .2s, background .2s; }
.contact-item:hover { border-color: rgba(34, 211, 238, .5); background: rgba(34, 211, 238, .05); transform: translateY(-2px); }
.contact-list a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--text); border-radius: 11px; }
.contact-list a:hover { color: #fff; }
.contact-list .ic { color: var(--cyan); width: 20px; height: 20px; }
.contact-list span { display: flex; flex-direction: column; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.copy-btn { flex-shrink: 0; margin-right: 12px; min-height: 32px; padding: 4px 10px; border-radius: 7px; border: 1px solid rgba(34, 211, 238, .4); background: transparent; color: var(--cyan); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.copy-btn:hover { background: rgba(34, 211, 238, .12); color: #fff; }
.copy-btn.copied { color: var(--green); border-color: rgba(52, 211, 153, .5); }
.contact-list small { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; }

.footer { padding: 28px 0 36px; border-top: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Architecture modal ----------------------------------------------------- */
.arch-modal { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border-radius: 18px; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--text); box-shadow: 0 40px 120px rgba(0, 0, 0, .7); overflow: auto; }
.arch-modal::backdrop { background: rgba(2, 4, 8, .72); backdrop-filter: blur(4px); }
.arch-modal[open] { animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.arch-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface-solid); z-index: 2; }
.arch-modal-head h3 { font-size: 20px; margin-top: 2px; }
.arch-modal .diagram { margin: 18px 22px 0; }
.diagram-sm { padding: 22px 18px; }
.release { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 22px 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.release > span:first-child { color: var(--dim); margin-right: 4px; }
.release b { font-weight: 500; padding: 4px 9px; border-radius: 6px; color: var(--text); border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .03); }
.release i { color: var(--cyan); font-style: normal; }
.arch-note { margin: 14px 22px 22px; font-size: 12.5px; }

/* Scroll reveal ---------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1100px) {
   .pipeline-rail { display: none; }
   .pipeline-wrap { padding-bottom: 0; }
   .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .certs li:first-child { grid-column: 1 / -1; }
   .profile-banner { grid-template-columns: 260px minmax(0, 1fr); }
   .focus-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .pipeline { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 16px; }
   .stage:nth-child(5n)::after { display: none; }
}

@media (max-width: 960px) {
   .hero-tiles { max-width: 640px; }
   .profile-banner { grid-template-columns: minmax(0, 1fr); }
   .pb-photo { min-height: 0; aspect-ratio: 16 / 10; }
   .pb-photo::after { background: linear-gradient(180deg, transparent 60%, rgba(14, 19, 29, .9)); }
   .skills { grid-template-columns: minmax(0, 1fr); }
   .skill-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
   .skill-tab { width: auto; flex-shrink: 0; white-space: nowrap; }
   .nav-toggle { display: grid; }
   .nav-menu {
      position: fixed; top: var(--nav-h); left: 0; right: 0;
      flex-direction: column; align-items: stretch; gap: 2px;
      padding: 12px 16px 20px; margin: 0;
      background: rgba(7, 9, 14, .97); border-bottom: 1px solid var(--border);
      transform: translateY(-8px); opacity: 0; visibility: hidden;
      transition: opacity .2s, transform .2s, visibility .2s;
   }
   .nav-menu.open { opacity: 1; transform: none; visibility: visible; }
   .nav-menu > a:not(.btn) { padding: 12px 10px; font-size: 16px; }
   .nav-menu > a.active::after { left: 10px; right: auto; width: 24px; }
   .nav-menu .btn { margin: 10px 0 0; }
   .hero { padding-top: 56px; }
   .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
   .infra-wrap { grid-template-columns: minmax(0, 1fr); }
   .inspector { position: static; }
   .timeline::before { left: 7px; }
   .job { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-left: 32px; }
   .job::before { left: 1px; top: 4px; }
   .job-meta { flex-direction: row; flex-wrap: wrap; align-items: center; padding-top: 0; text-align: left; gap: 8px 12px; }
   .contact-card { grid-template-columns: minmax(0, 1fr); padding: 32px; }
}

@media (max-width: 680px) {
   .hero-tiles { gap: 10px; }
   .tile { padding: 16px; }
   .tile b { font-size: 18px; }
   .pb-photo { aspect-ratio: 1 / 1; }
   .pb-body { padding: 22px 18px; gap: 20px; }
   .pb-exp { text-align: left; }
   .certs { grid-template-columns: minmax(0, 1fr); }
   .cert img { width: 60px; height: 60px; }
   .pgrid { grid-template-columns: minmax(0, 1fr); }
   .skill-panel { padding: 20px 16px; }
   .contact-wide span { white-space: normal; }
   .container { padding: 0 16px; }
   .section { padding: 68px 0; }
   .section-head { margin-bottom: 30px; }
   .actions .btn { flex: 1 1 auto; }
   .focus-list, .principles { grid-template-columns: minmax(0, 1fr); }
   .focus-list li { flex-direction: row; }
   .diagram { padding: 18px 12px; }
   .flow { --gap: 8px; }
   .node { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 10px 6px; }
   .node-text { align-items: center; }
   .node-title { font-size: 13px; }
   .node-sub { font-size: 10.5px; }
   .node::after { top: 6px; right: 6px; }
   .flow-row[data-count="1"] .node { flex-direction: row; text-align: left; padding: 11px 14px; }
   .flow-row[data-count="1"] .node-text { align-items: flex-start; }
   .flow-row[data-count="3"] .node-sub, .flow-row[data-count="4"] .node-sub { display: none; }
   .conn { height: 28px; }
   .pipeline-block { padding: 20px 14px; }
   /* vertical pipeline on phones, descriptions inline */
   .pipeline { grid-template-columns: minmax(0, 1fr); gap: 10px; }
   .stage { flex-direction: row; flex-wrap: wrap; align-items: center; text-align: left; gap: 4px 12px; padding: 12px 14px 12px 40px; }
   .stage::before { top: 50%; left: 12px; transform: translateY(-50%); }
   .stage:not(:last-child)::after, .stage:nth-child(5n)::after { display: block; top: auto; bottom: -11px; right: auto; left: 50%; width: 2px; height: 10px; }
   .stage-desc { display: block; flex-basis: 100%; font-size: 13px; color: var(--muted); }
   .stage-desc b { display: block; font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: var(--cyan); }
   .stage-panel { display: none; }
   .contact-card { padding: 24px 18px; }
   .contact-list { grid-template-columns: minmax(0, 1fr); }
   .arch-modal .diagram, .release { margin-left: 14px; margin-right: 14px; }
   .arch-note { margin: 14px; }
}

@media (prefers-reduced-motion: reduce) {
   *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
   .js .reveal, .flow .node, .flow .conn { opacity: 1; transform: none; }
}

/* About is the first section on the page */
.section-first { padding-top: 56px; }
.section-first + .hero { padding-top: 40px; }

/* Open-to-work callout on the profile photo ------------------------------ */
@property --otw-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.pb-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(52, 211, 153, .55), inset 0 0 40px rgba(52, 211, 153, .25); animation: otwFrame 3s ease-in-out infinite; }
@keyframes otwFrame { 50% { box-shadow: inset 0 0 0 2px rgba(52, 211, 153, .9), inset 0 0 70px rgba(52, 211, 153, .4); } }
.otw {
   position: absolute; left: 16px; bottom: 16px; z-index: 2; max-width: calc(100% - 32px);
   display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 12px;
   border-radius: 14px; border: 1.5px solid transparent; color: #fff;
   background:
      linear-gradient(rgba(6, 14, 12, .88), rgba(6, 14, 12, .88)) padding-box,
      conic-gradient(from var(--otw-angle), #34d399, #22d3ee, rgba(52, 211, 153, .15) 40%, rgba(52, 211, 153, .15) 60%, #34d399) border-box;
   backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
   animation: otwIn .7s cubic-bezier(.2, .8, .2, 1) .3s both, otwSpin 3.5s linear infinite, otwGlow 2.4s ease-in-out 1s infinite;
   transition: transform .25s;
}
.otw:hover { color: #fff; transform: translateY(-2px); }
.otw .ic { color: var(--green); transition: transform .25s; }
.otw:hover .ic { transform: translateX(3px); }
.otw-dot { position: relative; width: 12px; height: 12px; flex-shrink: 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.otw-dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--green); animation: ripple 1.6s ease-out infinite; }
.otw-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.otw-text b { font-size: 15px; letter-spacing: .01em; background: linear-gradient(90deg, #6ee7b7, #a7f3d0, #67e8f9, #6ee7b7); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: otwShine 3s linear infinite; }
.otw-text small { font-size: 12px; color: var(--muted); }
@keyframes otwIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes otwSpin { to { --otw-angle: 360deg; } }
@keyframes otwGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .0), 0 8px 24px rgba(0, 0, 0, .45); } 50% { box-shadow: 0 0 22px 2px rgba(52, 211, 153, .45), 0 8px 24px rgba(0, 0, 0, .45); } }
@keyframes otwShine { to { background-position: -200% 0; } }
@media (max-width: 680px) { .otw { left: 12px; bottom: 12px; padding: 8px 12px 8px 10px; } }
