@charset "UTF-8";

:root {
  --bg: #04070b;
  --bg-deep: #020408;
  --panel: rgba(6, 17, 25, .86);
  --panel-strong: #07131b;
  --ink: #f0fff9;
  --muted: #9ab5b1;
  --dim: #5f7d7d;
  --cyan: #00f5df;
  --green: #59ff6a;
  --mint: #62f6bd;
  --blue: #2da8ff;
  --line: rgba(98, 246, 189, .34);
  --line-soft: rgba(98, 246, 189, .13);
  --shadow: 0 24px 70px rgba(0, 0, 0, .48);
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg-deep); }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(2, 4, 8, .83), rgba(2, 4, 8, .9)),
    url("assets/backgrounds/hero-background.svg") center top / cover fixed,
    var(--bg);
  font-family: var(--sans);
  line-height: 1.55;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background: url("assets/textures/noise-texture.webp") repeat;
  mix-blend-mode: screen;
  z-index: -1;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .outline-btn, .primary-btn { font: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
#matrix-bg { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .1; z-index: -2; }
.site-atmosphere { position: fixed; inset: 0; pointer-events: none; z-index: -3; overflow: hidden; }
.site-atmosphere img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.site-atmosphere img + img { opacity: .46; }

.shell { width: min(1480px, calc(100% - 64px)); margin-inline: auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 12px max(32px, calc((100vw - 1480px) / 2));
  border-bottom: 1px solid rgba(98, 246, 189, .18);
  background: rgba(3, 8, 12, .82);
  backdrop-filter: blur(20px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: max-content; }
.brand-mark { width: 38px; height: 38px; color: var(--cyan); display: grid; place-items: center; filter: drop-shadow(0 0 12px rgba(0,245,223,.35)); }
.brand-mark img { width: 100%; height: 100%; }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 .83rem/1.2 var(--mono); letter-spacing: .16em; }
.brand small { margin-top: 4px; color: var(--dim); font: 600 .57rem/1.2 var(--mono); letter-spacing: .08em; }
nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 30px); margin-left: auto; }
nav a, .footer-links a { color: var(--muted); text-decoration: none; font: 700 .67rem/1 var(--mono); letter-spacing: .12em; transition: color .2s ease, text-shadow .2s ease; }
nav a:hover, nav a.active, .footer-links a:hover { color: var(--mint); text-shadow: 0 0 14px rgba(98,246,189,.4); }
.outline-btn, .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--mint);
  background: rgba(7, 22, 30, .72);
  font: 800 .68rem/1 var(--mono);
  letter-spacing: .1em;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.outline-btn:hover, .primary-btn:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: 0 0 24px rgba(0,245,223,.16), inset 0 0 18px rgba(0,245,223,.06); color: #fff; }
.primary-btn { border-color: var(--green); color: #041008; background: linear-gradient(105deg, var(--green), var(--mint)); box-shadow: 0 0 24px rgba(89,255,106,.17); }
.primary-btn:hover { color: #041008; box-shadow: 0 0 34px rgba(89,255,106,.35); }
.nav-toggle { display: none; width: 44px; height: 44px; margin-left: auto; padding: 11px; border: 1px solid var(--line); color: var(--mint); background: rgba(7, 22, 30, .85); cursor: pointer; clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px)); }
.nav-toggle img { width: 100%; height: 100%; filter: brightness(0) saturate(100%) invert(84%) sepia(45%) saturate(400%) hue-rotate(92deg); }
main { position: relative; }
.section { position: relative; margin-top: 74px; padding: 58px clamp(22px, 4vw, 72px); }
.panel {
  background: linear-gradient(145deg, rgba(8, 25, 33, .92), rgba(4, 12, 18, .84));
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  clip-path: polygon(0 18px, 18px 0, calc(100% - 42px) 0, 100% 42px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 42px 100%, 0 calc(100% - 42px));
}
.panel::after, .hero::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(98, 246, 189, .08);
  clip-path: inherit;
}
.hero {
  min-height: min(790px, calc(100vh - 76px));
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(460px, 1.16fr);
  align-items: center;
  gap: 26px;
  padding-top: 78px;
  padding-bottom: 54px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/backgrounds/hero-background.svg") center / cover no-repeat;
  opacity: .52;
  z-index: -1;
}
.hero-copy { position: relative; z-index: 3; max-width: 680px; padding-left: clamp(0px, 3vw, 42px); }
.eyebrow, .section-kicker, .mini-heading { display: inline-block; color: var(--green); font: 800 .68rem/1 var(--mono); letter-spacing: .19em; }
.eyebrow { padding: 8px 11px; border-left: 2px solid var(--green); background: rgba(89,255,106,.06); }
.hero h1 { margin: 20px 0 8px; font: 800 clamp(3.1rem, 7.8vw, 7.3rem)/.9 var(--mono); letter-spacing: -.08em; color: #f8fffd; text-shadow: 0 0 24px rgba(240,255,249,.14); }
.hero h1 span { color: var(--green); text-shadow: 0 0 24px rgba(89,255,106,.36); }
.hero-role { margin: 0; color: var(--mint); font: 700 clamp(.92rem, 1.4vw, 1.25rem)/1.55 var(--mono); letter-spacing: .04em; }
.hero-text { max-width: 640px; margin: 25px 0 0; color: var(--muted); font-size: clamp(.96rem, 1.25vw, 1.12rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.social-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 34px; color: var(--dim); font: 700 .62rem/1 var(--mono); letter-spacing: .1em; }
.social-row a { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(98,246,189,.28); color: var(--mint); transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.social-row a:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: 0 0 18px rgba(89,255,106,.2); }
.social-row img { width: 17px; height: 17px; }
.hero-visual { position: relative; min-height: 610px; isolation: isolate; }
.hero-visual::before { content: ""; position: absolute; inset: 6% 5%; background: radial-gradient(circle, rgba(0,245,223,.12), transparent 58%); filter: blur(5px); z-index: -1; }
.hero-map, .hero-network, .hero-blueprint, .hero-circuit { position: absolute; pointer-events: none; object-fit: contain; }
.hero-map { inset: 12% 6% auto 2%; width: 94%; opacity: .2; filter: drop-shadow(0 0 10px rgba(0,245,223,.18)); animation: drift 16s ease-in-out infinite; }
.hero-network { inset: 12% 9% auto 7%; width: 87%; opacity: .23; animation: pulseLines 7s ease-in-out infinite; }
.hero-blueprint { inset: 38% 0 2% 22%; width: 74%; opacity: .16; transform: rotate(-3deg); }
.hero-circuit { inset: 0; width: 100%; height: 100%; opacity: .28; }
#globe { position: absolute; inset: 0; width: 100%; height: 100%; }
.globe-hud { position: absolute; inset: 11% 4% 8%; pointer-events: none; }
.hud-node { position: absolute; width: 8px; height: 8px; border: 1px solid var(--green); border-radius: 50%; background: var(--bg); box-shadow: 0 0 14px var(--green); animation: blink 2.4s ease-in-out infinite; }
.hud-node.n1 { top: 19%; left: 17%; } .hud-node.n2 { top: 33%; right: 12%; animation-delay: .8s; } .hud-node.n3 { bottom: 22%; left: 29%; animation-delay: 1.3s; } .hud-node.n4 { bottom: 14%; right: 28%; animation-delay: 1.8s; }
.hud-line { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); transform-origin: left center; opacity: .6; }
.hud-line.l1 { width: 150px; top: 25%; left: 20%; transform: rotate(23deg); } .hud-line.l2 { width: 160px; top: 51%; right: 14%; transform: rotate(148deg); }
.glass { background: rgba(3, 13, 20, .8); border: 1px solid rgba(98,246,189,.3); box-shadow: 0 0 28px rgba(0,245,223,.1), inset 0 0 24px rgba(0,245,223,.035); backdrop-filter: blur(12px); }
.terminal-card { position: absolute; top: 13%; right: 1%; width: min(330px, 44%); padding: 16px; clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px)); }
.terminal-title { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); color: var(--mint); font: 700 .62rem/1 var(--mono); letter-spacing: .08em; }
.terminal-title span { color: var(--green); } .terminal-title i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
#terminal-output { min-height: 142px; margin: 13px 0 0; color: #a8fff1; white-space: pre-wrap; font: .65rem/1.7 var(--mono); }
.cursor { color: var(--green); animation: blink 1s step-end infinite; }
.metric-strip { position: absolute; right: 3%; bottom: 4%; left: 3%; display: grid; grid-template-columns: repeat(4, 1fr); padding: 14px 8px; }
.metric-strip div { min-width: 0; padding: 4px 12px; border-right: 1px solid var(--line-soft); }
.metric-strip div:last-child { border: 0; }
.metric-strip span, .metric-strip strong { display: block; font-family: var(--mono); }
.metric-strip span { color: var(--dim); font-size: .55rem; letter-spacing: .1em; }
.metric-strip strong { margin-top: 4px; color: var(--green); font-size: .75rem; letter-spacing: .04em; }

.section-heading { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.section-heading h2 { margin: 8px 0 0; color: #f5fffc; font: 800 clamp(1.45rem, 3vw, 2.55rem)/1 var(--mono); letter-spacing: -.06em; text-shadow: 0 0 17px rgba(240,255,249,.12); }
.section-divider { width: min(340px, 32%); height: 48px; object-fit: cover; opacity: .45; }
.capability-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.capability { position: relative; min-height: 205px; padding: 25px 21px 22px; background: linear-gradient(145deg, rgba(9,30,37,.8), rgba(4,14,21,.72)); border: 1px solid rgba(98,246,189,.17); clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.capability::after { content: ""; position: absolute; top: 0; right: 0; width: 28px; height: 28px; border-left: 1px solid rgba(98,246,189,.3); border-bottom: 1px solid rgba(98,246,189,.3); }
.capability:hover { transform: translateY(-6px); border-color: var(--green); background: linear-gradient(145deg, rgba(10,45,46,.9), rgba(4,18,24,.9)); box-shadow: 0 0 30px rgba(0,245,223,.13); }
.icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 22px; color: var(--mint); }
.icon img { width: 100%; height: 100%; }
.capability h3 { margin: 0; color: #dffff7; font: 800 .78rem/1.25 var(--mono); letter-spacing: .08em; }
.capability p { margin: 12px 0 0; color: var(--muted); font-size: .88rem; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.project-card { display: flex; flex-direction: column; min-width: 0; padding: 14px; background: rgba(6,19,27,.84); border: 1px solid rgba(98,246,189,.2); clip-path: polygon(0 0, calc(100% - 19px) 0, 100% 19px, 100% 100%, 19px 100%, 0 calc(100% - 19px)); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.project-card:hover { transform: translateY(-7px); border-color: var(--cyan); box-shadow: 0 16px 38px rgba(0,0,0,.45), 0 0 28px rgba(0,245,223,.13); }
.project-visual { position: relative; min-height: 185px; display: grid; place-items: center; overflow: hidden; color: var(--mint); border: 1px solid rgba(98,246,189,.18); background: radial-gradient(circle at 50% 50%, rgba(0,245,223,.11), transparent 64%), #06121a; }
.project-visual::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(98,246,189,.1); pointer-events: none; }
.project-visual img { width: 88%; height: 83%; object-fit: contain; opacity: .82; transition: transform .45s ease, opacity .3s ease, filter .3s ease; }
.project-card:hover .project-visual img { transform: scale(1.04); opacity: 1; filter: drop-shadow(0 0 12px rgba(0,245,223,.28)); }
.project-visual span { position: absolute; right: 12px; bottom: 10px; color: var(--green); font: 700 .55rem/1 var(--mono); letter-spacing: .12em; }
.project-card h3 { margin: 21px 3px 7px; color: #eafff8; font: 800 1rem/1.25 var(--mono); }
.project-card p { margin: 0 3px; color: var(--muted); font-size: .87rem; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 3px; }
.tags span { padding: 5px 7px; border: 1px solid rgba(98,246,189,.18); color: var(--mint); font: 600 .6rem/1 var(--mono); }
.project-card > a { margin: auto 3px 4px; color: var(--green); font: 700 .68rem/1 var(--mono); text-decoration: none; }
.project-card > a:hover { color: #fff; }
.center { display: flex; justify-content: center; margin-top: 34px; }

.architecture-section { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); align-items: center; gap: clamp(30px, 6vw, 88px); overflow: hidden; }
.architecture-diagram { position: relative; min-height: 410px; display: grid; place-items: center; gap: 25px; padding: 40px 20px; }
.architecture-blueprint { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; }
.diagram-node { position: relative; z-index: 1; min-width: 150px; padding: 13px 16px; text-align: center; border: 1px solid rgba(98,246,189,.38); color: var(--mint); background: rgba(4,15,22,.88); font: 700 .65rem/1.4 var(--mono); letter-spacing: .06em; box-shadow: 0 0 18px rgba(0,245,223,.08); }
.diagram-node.top { margin-bottom: 3px; } .diagram-node.primary-node { border-color: var(--green); color: var(--green); box-shadow: 0 0 25px rgba(89,255,106,.15); }
.diagram-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.diagram-row > span { color: var(--green); font: 800 1.3rem/1 var(--mono); }
.diagram-row.bottom { margin-top: 4px; }
.architecture-copy { position: relative; z-index: 2; }
.profile-orbit { float: right; position: relative; width: 112px; height: 112px; margin: -14px 0 14px 20px; }
.profile-orbit img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.profile-photo { inset: 19% !important; width: 62% !important; height: 62% !important; left: 19% !important; top: 19% !important; object-fit: cover !important; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); filter: saturate(.8) contrast(1.08); }
.profile-glow { opacity: .28; filter: blur(6px); animation: pulseLines 5s ease-in-out infinite; } .profile-frame { opacity: .9; color: var(--mint); }
.mini-heading { color: var(--green); }
.architecture-copy h2 { margin: 11px 0 16px; font: 800 clamp(1.8rem, 3vw, 3rem)/1 var(--mono); letter-spacing: -.07em; }
.architecture-copy p { color: var(--muted); }
.architecture-copy ul { display: grid; gap: 10px; padding: 0; margin: 24px 0 28px; list-style: none; color: var(--muted); font-size: .92rem; }
.architecture-copy li::before { content: ">" ; margin-right: 10px; color: var(--green); }

.recent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.recent-grid article { position: relative; min-height: 190px; padding: 21px 19px; border-top: 1px solid var(--line); border-left: 1px solid var(--line-soft); background: rgba(5,20,27,.56); }
.recent-grid article::after { content: ""; position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.recent-grid strong { color: var(--green); font: 700 .6rem/1.2 var(--mono); letter-spacing: .11em; }
.recent-grid h3 { margin: 18px 0 8px; font: 800 1rem/1.2 var(--mono); }
.recent-grid p { margin: 0; color: var(--muted); font-size: .84rem; }

.timeline { position: relative; }
.timeline-detailed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 60px; padding: 12px 0 12px 48px; }
.timeline-detailed::before { content: ""; position: absolute; top: 0; bottom: 0; left: 14px; width: 1px; background: linear-gradient(var(--green), rgba(98,246,189,.08)); box-shadow: 0 0 16px rgba(89,255,106,.3); }
.timeline-detailed article { position: relative; min-height: 175px; padding: 0 0 38px 22px; border-bottom: 1px solid rgba(98,246,189,.09); }
.timeline-detailed article::before { content: ""; position: absolute; top: 1px; left: -39px; width: 12px; height: 12px; border: 2px solid var(--green); background: var(--bg); box-shadow: 0 0 14px rgba(89,255,106,.65); transform: rotate(45deg); }
.timeline-detailed article strong { color: var(--green); font: 700 .62rem/1 var(--mono); letter-spacing: .13em; }
.timeline-detailed article h3 { margin: 14px 0 7px; font: 800 1.02rem/1.25 var(--mono); }
.timeline-detailed article p { margin: 0; color: var(--muted); font-size: .86rem; }
.timeline-detailed article i { display: none; }

.split-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; padding: 0; }
.compact-panel { min-height: 100%; padding: 45px clamp(22px, 4vw, 52px); }
.learning-note { margin: -7px 0 24px; padding: 15px 17px; border-left: 2px solid var(--green); background: rgba(89,255,106,.05); }
.learning-note strong { color: var(--green); font: 700 .64rem/1 var(--mono); letter-spacing: .12em; }
.learning-note p { margin: 9px 0 0; color: var(--muted); font-size: .84rem; }
.achievement-list { display: grid; gap: 11px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-size: .88rem; }
.achievement-list li::before { content: "+"; margin-right: 10px; color: var(--green); font-family: var(--mono); }
.tech-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.tech-cloud span { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 9px; border: 1px solid rgba(98,246,189,.2); color: var(--muted); background: rgba(8,27,34,.68); font: 700 .65rem/1 var(--mono); transition: color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.tech-cloud span:hover { color: var(--green); border-color: var(--green); transform: translateY(-2px); box-shadow: 0 0 16px rgba(89,255,106,.14); }
.tech-cloud img { width: 17px; height: 17px; }

.contact-panel { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(150px, .55fr)); gap: 18px; align-items: center; overflow: hidden; }
.contact-circuit { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .12; pointer-events: none; }
.contact-copy, .contact-item { position: relative; z-index: 1; }
.contact-title { display: flex; gap: 14px; align-items: flex-start; }
.contact-title h2 { margin: 5px 0 7px; font: 800 clamp(1.4rem, 2.5vw, 2.2rem)/1 var(--mono); letter-spacing: -.06em; }
.contact-title p { margin: 0; color: var(--muted); }
.contact-item { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--mint); text-decoration: none; font: 700 .73rem/1.3 var(--mono); overflow-wrap: anywhere; }
.contact-item b { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--mint); }
.contact-item b img { width: 19px; height: 19px; }
.contact-item small { display: block; margin-bottom: 4px; color: var(--dim); font-size: .55rem; letter-spacing: .12em; }
.contact-item:hover { color: #fff; }

.footer { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; padding-top: 38px; padding-bottom: 40px; margin-top: 74px; border-top: 1px solid rgba(98,246,189,.18); }
.footer-circuit { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .1; pointer-events: none; }
.footer-brand, .footer-links, .footer-copy { position: relative; z-index: 1; }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-brand small { color: var(--dim); }
.footer-links { display: flex; gap: 19px; }
.footer-copy { justify-self: end; color: var(--dim); font: .62rem/1.3 var(--mono); }

@keyframes drift { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(10px,-8px,0); } }
@keyframes pulseLines { 0%,100% { opacity: .22; } 50% { opacity: .62; } }
@keyframes blink { 50% { opacity: .35; } }

@media (max-width: 1150px) {
  .topbar { padding-inline: 22px; }
  nav { gap: 14px; }
  .desktop-only { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  nav { position: absolute; top: calc(100% + 1px); right: 16px; display: none; width: min(280px, calc(100vw - 32px)); padding: 14px; flex-direction: column; align-items: stretch; gap: 0; border: 1px solid var(--line); background: rgba(3,11,16,.96); box-shadow: var(--shadow); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
  nav.open { display: flex; }
  nav a { padding: 15px 12px; border-bottom: 1px solid var(--line-soft); }
  nav a:last-child { border-bottom: 0; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 56px; }
  .hero-copy { max-width: 850px; }
  .hero-visual { min-height: 540px; }
  .capability-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .recent-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-panel { grid-template-columns: 1fr 1fr; }
  .contact-copy { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  body { background-attachment: scroll; }
  .shell { width: min(100% - 28px, 620px); }
  .topbar { min-height: 66px; padding: 10px 14px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand strong { font-size: .72rem; }
  .brand small { font-size: .48rem; letter-spacing: .04em; }
  .hero { gap: 10px; padding-top: 44px; padding-bottom: 20px; }
  .hero h1 { font-size: clamp(2.7rem, 15vw, 4.8rem); }
  .hero-text { font-size: .92rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-actions a { padding-inline: 8px; font-size: .59rem; }
  .social-row { margin-top: 26px; }
  .hero-visual { min-height: 480px; margin-inline: -9px; }
  .hero-map { inset: 9% -12% auto -12%; width: 124%; }
  .hero-network { inset: 15% -7% auto -7%; width: 114%; }
  .hero-blueprint { inset: 46% -6% 0 18%; width: 92%; }
  .terminal-card { top: 10%; right: 2%; width: min(290px, 72%); }
  .metric-strip { right: 2%; bottom: 1%; left: 2%; grid-template-columns: repeat(2, 1fr); padding: 8px 3px; }
  .metric-strip div { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); }
  .metric-strip div:nth-child(2) { border-right: 0; }
  .metric-strip div:nth-child(3), .metric-strip div:nth-child(4) { border-bottom: 0; }
  .section { margin-top: 34px; padding: 34px 18px; }
  .section-heading { align-items: flex-start; margin-bottom: 24px; }
  .section-divider { display: none; }
  .capability-grid, .project-grid, .recent-grid, .split-grid { grid-template-columns: 1fr; }
  .capability { min-height: 170px; }
  .project-visual { min-height: 175px; }
  .architecture-section { grid-template-columns: 1fr; gap: 15px; }
  .architecture-diagram { min-height: 350px; padding-inline: 0; transform: scale(.94); transform-origin: center; }
  .diagram-row { gap: 5px; }
  .diagram-node { min-width: 0; padding: 10px 7px; font-size: .53rem; }
  .diagram-row > span { font-size: .95rem; }
  .profile-orbit { width: 88px; height: 88px; }
  .timeline-detailed { grid-template-columns: 1fr; gap: 0; padding-left: 38px; }
  .timeline-detailed::before { left: 10px; }
  .timeline-detailed article { min-height: auto; padding-bottom: 28px; margin-bottom: 24px; }
  .timeline-detailed article::before { left: -34px; }
  .compact-panel { padding: 34px 20px; }
  .contact-panel { grid-template-columns: 1fr; }
  .contact-copy { grid-column: auto; }
  .contact-item { padding: 8px 0; }
  .footer { grid-template-columns: 1fr; gap: 20px; margin-top: 34px; padding-bottom: 28px; }
  .footer-copy { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  :root { --ink: #111; --muted: #333; --dim: #555; --line: #8a8a8a; }
  body { background: #fff; color: #111; font-size: 10pt; }
  body::before, #matrix-bg, .site-atmosphere, .topbar, .hero-visual, .hero-actions, .social-row, .footer-circuit, .contact-circuit, .section-divider, .profile-glow { display: none !important; }
  .shell { width: 100%; }
  .hero { min-height: auto; display: block; padding: 0 0 16pt; }
  .hero::before, .panel::after, .hero::after { display: none; }
  .hero h1 { color: #111; font-size: 34pt; text-shadow: none; }
  .hero h1 span, .eyebrow, .section-kicker, .mini-heading, .project-card > a { color: #075c43; text-shadow: none; }
  .section, .panel, .compact-panel { margin-top: 16pt; padding: 14pt; background: #fff; border: 1px solid #aab4b0; clip-path: none; box-shadow: none; }
  .section-heading h2, .architecture-copy h2, .contact-title h2 { color: #111; text-shadow: none; }
  .capability-grid, .project-grid, .recent-grid, .split-grid { grid-template-columns: repeat(2, 1fr); }
  .capability, .project-card, .recent-grid article { break-inside: avoid; background: #fff; border: 1px solid #b5c4bf; clip-path: none; }
  .project-visual { min-height: 90px; }
  .architecture-section { display: grid; }
  .profile-orbit { display: none; }
  .timeline-detailed article { break-inside: avoid; }
  .footer { margin-top: 14pt; padding: 10pt 0; border-top: 1px solid #aab4b0; }
}

/* Refinement system: shared grid, contained visual zones and predictable rhythm */
:root {
  --page-max-width: 1480px;
  --page-gutter: clamp(16px, 3.5vw, 64px);
  --section-gap: clamp(48px, 5vw, 74px);
  --panel-padding: clamp(30px, 4vw, 58px);
  --card-gap: clamp(12px, 1.35vw, 20px);
  --content-gap: clamp(18px, 3vw, 42px);
  --header-height: 76px;
}

.shell {
  width: min(var(--page-max-width), calc(100% - (var(--page-gutter) * 2)));
}

.topbar {
  padding-inline: max(var(--page-gutter), calc((100vw - var(--page-max-width)) / 2));
}

.hero {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: var(--content-gap);
  min-height: min(790px, calc(100vh - var(--header-height)));
}

.hero-copy {
  padding-left: clamp(0px, 2vw, 28px);
}

.hero-visual {
  min-height: clamp(480px, 44vw, 610px);
  overflow: hidden;
}

.hero-network-art {
  position: absolute;
  inset: 1% 0 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .72;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite;
}

#globe {
  inset: 4% 0 19%;
  z-index: 1;
}

.globe-hud {
  inset: 7% 3% 21%;
  z-index: 2;
}

.terminal-card {
  top: 5%;
  right: auto;
  left: 3%;
  width: min(300px, 42%);
  z-index: 3;
}

.metric-strip {
  right: 5%;
  bottom: 0;
  left: 5%;
  z-index: 4;
}

.section {
  margin-top: var(--section-gap);
  padding: var(--panel-padding) clamp(20px, 4vw, 72px);
}

.section-heading {
  margin-bottom: clamp(24px, 3vw, 34px);
}

.section-heading h2 {
  line-height: 1.08;
}

.capability-grid,
.project-grid,
.recent-grid {
  gap: var(--card-gap);
}

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

.capability {
  min-height: 190px;
  padding: 22px 20px 20px;
}

.icon {
  margin-bottom: 18px;
}

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.project-card {
  min-height: 480px;
  padding: 14px;
}

.project-visual {
  min-height: 180px;
}

.project-visual > img:first-child {
  width: 88%;
  height: 82%;
}

.project-visual > span:not(.project-brand) {
  right: 12px;
  bottom: 10px;
  z-index: 2;
}

.project-brand {
  position: absolute;
  top: 12px;
  right: auto !important;
  bottom: auto !important;
  left: 12px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 4px;
  border: 1px solid rgba(98,246,189,.28);
  background: rgba(3, 13, 20, .72);
  box-shadow: 0 0 16px rgba(0,245,223,.1);
}

.project-brand img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  opacity: 1 !important;
  filter: none !important;
}

.legend-brand {
  width: 34px;
  height: 46px;
  padding: 3px 6px;
}

.architecture-section {
  grid-template-columns: minmax(0, 1.24fr) minmax(300px, .76fr);
  gap: clamp(28px, 5vw, 72px);
}

.architecture-diagram {
  min-height: 460px;
  padding: 30px 22px;
  overflow: hidden;
}

.architecture-blueprint {
  object-fit: cover;
  opacity: .3;
}

.system-flow {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}

.flow-stage {
  position: relative;
  min-height: 236px;
  padding: 17px 14px 15px;
  border: 1px solid rgba(98,246,189,.27);
  background: rgba(4, 15, 22, .9);
  box-shadow: 0 0 18px rgba(0,245,223,.06);
}

.flow-stage:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -17px;
  z-index: 2;
  color: var(--green);
  font: 800 1.1rem/1 var(--mono);
  transform: translateY(-50%);
}

.flow-stage.active {
  border-color: var(--green);
  box-shadow: 0 0 22px rgba(89,255,106,.12);
}

.flow-index {
  display: block;
  margin-bottom: 24px;
  color: var(--green);
  font: 700 .6rem/1 var(--mono);
  letter-spacing: .12em;
}

.flow-stage h3 {
  min-height: 44px;
  margin: 0 0 18px;
  color: var(--mint);
  font: 800 .68rem/1.3 var(--mono);
  letter-spacing: .06em;
}

.flow-stage ul {
  display: grid;
  gap: 11px;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--muted);
  font-size: .78rem;
}

.flow-stage li {
  position: relative;
  padding-left: 12px;
}

.flow-stage li::before {
  content: "";
  position: absolute;
  top: .58em;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--green);
  transform: rotate(45deg);
}

.architecture-copy {
  min-width: 0;
}

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

.footer {
  margin-top: var(--section-gap);
}

@media (max-width: 1150px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-copy {
    max-width: 850px;
  }

  .hero-visual {
    min-height: 540px;
  }

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

  .architecture-section {
    grid-template-columns: 1fr;
  }

  .architecture-diagram {
    min-height: 430px;
  }
}

@media (max-width: 820px) {
  .system-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .flow-stage {
    min-height: 208px;
  }

  .flow-stage:not(:last-child)::after {
    top: 50%;
    right: -13px;
    content: "→";
  }

  .flow-stage:nth-child(2)::after {
    top: auto;
    right: 50%;
    bottom: -19px;
    content: "↓";
    transform: translateX(50%);
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 32px, 620px);
  }

  .hero {
    gap: 8px;
    padding-top: 34px;
    padding-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(2.58rem, 14vw, 4.7rem);
    letter-spacing: -.1em;
  }

  .hero-visual {
    min-height: 520px;
    margin-inline: 0;
  }

  .hero-network-art {
    inset: 0 0 auto;
    height: 62%;
  }

  #globe {
    inset: 0 0 42%;
  }

  .globe-hud {
    inset: 0 0 42%;
  }

  .terminal-card {
    top: auto;
    right: 5%;
    bottom: 74px;
    left: 5%;
    width: auto;
    padding: 12px 14px;
  }

  #terminal-output {
    min-height: 80px;
    max-height: 80px;
    margin-top: 10px;
    overflow: hidden;
    font-size: .58rem;
    line-height: 1.55;
  }

  .metric-strip {
    right: 5%;
    bottom: 0;
    left: 5%;
    padding: 7px 3px;
  }

  .metric-strip div {
    padding: 6px 8px;
  }

  .section {
    margin-top: 32px;
    padding: 32px 18px;
  }

  .capability-grid,
  .project-grid,
  .recent-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .capability {
    min-height: 0;
  }

  .project-card {
    min-height: 0;
  }

  .project-visual {
    min-height: 180px;
  }

  .architecture-section {
    gap: 24px;
  }

  .architecture-diagram {
    min-height: 0;
    padding: 24px 0 20px;
  }

  .system-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .flow-stage {
    min-height: 0;
    padding: 15px 14px;
  }

  .flow-stage h3 {
    min-height: 0;
    margin-bottom: 12px;
  }

  .flow-stage:not(:last-child)::after,
  .flow-stage:nth-child(2)::after {
    top: auto;
    right: 50%;
    bottom: -19px;
    content: "↓";
    transform: translateX(50%);
  }

  .profile-orbit {
    float: none;
    margin: 0 0 20px;
  }

  .contact-panel {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-network-art {
    animation: none;
  }
}

/* Intentional orphan handling for the seven-card project set */
@media (min-width: 1151px) {
  .project-card:last-child {
    grid-column: 2;
  }
}

@media (min-width: 761px) and (max-width: 1150px) {
  .project-card:last-child {
    grid-column: 1 / -1;
    width: min(100%, calc(50% - (var(--card-gap) / 2)));
    justify-self: center;
  }
}

@media (max-width: 760px) {
  .project-card:last-child {
    grid-column: auto;
    width: auto;
  }
}

@media print {
  .section,
  .panel,
  .compact-panel {
    margin-top: 16pt;
    padding: 14pt;
    background: #fff;
    border: 1px solid #aab4b0;
    clip-path: none;
    box-shadow: none;
  }

  .capability-grid,
  .project-grid,
  .recent-grid,
  .split-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card:last-child {
    grid-column: auto;
    width: auto;
  }

  .hero-visual,
  .hero-network-art {
    display: none !important;
  }
}


/* Portfolio1 reference alignment */
:root {
  --reference-max: 1440px;
  --reference-gutter: clamp(14px, 2vw, 30px);
  --reference-panel: rgba(4, 16, 23, .82);
  --reference-card: rgba(5, 19, 27, .88);
}

html { scroll-padding-top: 78px; }
body { overflow-x: clip; background: #02080d; }
.shell { width: min(var(--reference-max), calc(100% - (var(--reference-gutter) * 2))); }
.topbar { min-height: 66px; width: min(var(--reference-max), calc(100% - (var(--reference-gutter) * 2))); margin: 0 auto; padding: 10px 0; border-bottom: 1px solid rgba(98,246,189,.14); }
.brand-mark { width: 35px; height: 35px; }
.brand strong { font-size: .76rem; }
.brand small { font-size: .48rem; }
nav { gap: clamp(15px, 2.1vw, 29px); }
nav a { font-size: .58rem; letter-spacing: .03em; }
.topbar > .outline-btn { font-size: .58rem; padding: 10px 17px; }

.hero { grid-template-columns: minmax(390px, .9fr) minmax(0, 1.1fr); gap: 18px; min-height: 366px; padding: 28px 38px 24px; align-items: center; }
.hero-copy { max-width: 510px; padding-left: 0; }
.eyebrow { display: inline-flex; padding: 5px 11px; font-size: .55rem; }
.hero h1 { margin: 15px 0 12px; font-size: clamp(3.25rem, 5.3vw, 4.7rem); line-height: .96; letter-spacing: -.09em; white-space: nowrap; }
.hero-role { font-size: 1rem; line-height: 1.45; }
.hero-text { max-width: 465px; margin-top: 16px; font-size: .75rem; line-height: 1.65; }
.hero-actions { margin-top: 20px; }
.hero-actions a { padding: 10px 16px; font-size: .59rem; }
.social-row { margin-top: 22px; }
.social-row > span { font-size: .56rem; }
.social-row a { width: 30px; height: 30px; }
.hero-visual { min-height: 350px; }
.hero-network-art { opacity: .78; }
#globe { inset: 1% 0 16%; }
.globe-hud { inset: 4% 3% 18%; }
.terminal-card { top: 9%; left: 2%; width: min(315px, 46%); padding: 13px; }
#terminal-output { min-height: 124px; margin-top: 11px; font-size: .58rem; line-height: 1.65; }
.metric-strip { right: 4%; bottom: 0; left: 4%; padding: 10px 4px; }
.metric-strip div { padding: 3px 9px; }
.metric-strip span { font-size: .48rem; }
.metric-strip strong { font-size: 1rem; }

.section { margin-top: 12px; padding: 24px 26px; background: var(--reference-panel); }
.section-heading { align-items: center; justify-content: center; margin-bottom: 19px; text-align: center; }
.section-heading > div { width: 100%; }
.section-kicker { display: none; }
.section-heading h2 { margin: 0; font-size: clamp(1rem, 1.5vw, 1.35rem); letter-spacing: .02em; }
.section-divider { width: 70px; height: 14px; margin-left: -35px; margin-top: 8px; opacity: .8; }

.capabilities-section { padding: 20px 26px 22px; }
.capabilities-section .section-heading { margin-bottom: 13px; }
.capability-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.capability { min-height: 111px; padding: 7px 13px 8px; border: 0; border-right: 1px solid rgba(98,246,189,.13); border-radius: 0; background: transparent; clip-path: none; text-align: center; }
.capability:last-child { border-right: 0; }
.capability::after { display: none; }
.capability:hover { transform: none; background: rgba(0,245,223,.035); box-shadow: none; }
.capability .icon { width: 33px; height: 33px; margin: 0 auto 10px; }
.capability h3 { font-size: .56rem; letter-spacing: .035em; }
.capability p { margin-top: 7px; font-size: .61rem; line-height: 1.45; }

.projects-section { padding: 23px 16px 28px; }
.projects-section .section-heading { margin-bottom: 16px; }
.project-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.project-card { min-height: 320px; padding: 8px; border-radius: 9px; background: var(--reference-card); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.project-card:hover { transform: translateY(-3px); }
.project-visual { min-height: 125px; border-radius: 7px; }
.project-visual > img:first-child { width: 100%; height: 100%; object-fit: contain; opacity: .9; }
.project-card:hover .project-visual > img:first-child { transform: scale(1.035); }
.project-brand { top: 7px; left: 7px; width: 25px; height: 25px; padding: 3px; }
.legend-brand { width: 24px; height: 31px; }
.project-kicker { right: 7px !important; bottom: 7px !important; font-size: .43rem !important; }
.project-card h3 { min-height: 35px; margin: 11px 2px 5px; font-size: .68rem; line-height: 1.25; letter-spacing: -.01em; }
.project-card p { min-height: 49px; margin: 0 2px; font-size: .59rem; line-height: 1.45; }
.tags { gap: 4px; margin: 10px 2px; }
.tags span { padding: 4px 5px; font-size: .44rem; }
.project-card > a { margin: auto 2px 2px; font-size: .53rem; }
.center { margin-top: 18px; }
.center .outline-btn { padding: 9px 15px; font-size: .56rem; }
.grid-icon { display: inline-grid; place-items: center; width: 12px; height: 12px; margin-left: 7px; }
.grid-icon img { width: 100%; height: 100%; }
.project-card:last-child { grid-column: auto; width: auto; }

.project-architecture { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); align-items: center; gap: clamp(24px, 4vw, 54px); margin-top: 28px; padding: 28px 10px 4px; border-top: 1px solid rgba(98,246,189,.13); }
.anchor-target { position: absolute; top: -86px; left: 0; width: 1px; height: 1px; }
.architecture-diagram { min-height: 280px; padding: 20px 13px; border: 1px solid rgba(98,246,189,.15); background: rgba(2, 12, 18, .72); }
.architecture-blueprint { opacity: .18; }
.decision-diagram { position: relative; z-index: 1; display: grid; grid-template-rows: auto 13px auto 24px auto; align-items: center; width: 100%; }
.diagram-top { display: grid; justify-items: center; gap: 4px; }
.diagram-main { display: grid; grid-template-columns: minmax(0, 1fr) 19px minmax(0, 1fr) 19px minmax(0, 1fr) 19px minmax(0, 1fr); align-items: center; gap: 4px; }
.diagram-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; width: 66%; margin: 0 auto; }
.diagram-node { min-height: 69px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 8px 5px; border: 1px solid rgba(98,246,189,.36); background: rgba(4,15,22,.9); color: var(--mint); text-align: center; font: 700 .49rem/1.25 var(--mono); letter-spacing: .025em; }
.diagram-node img { width: 25px; height: 25px; object-fit: contain; }
.node-ai { min-width: 115px; border-color: rgba(89,255,106,.48); color: var(--green); }
.node-processing { border-color: rgba(89,255,106,.52); }
.diagram-arrow { color: var(--green); font: 800 .88rem/1 var(--mono); text-align: center; }
.architecture-copy { min-width: 0; }
.profile-orbit { width: 77px; height: 77px; margin: -4px 0 6px 15px; }
.architecture-copy h2 { margin: 8px 0 11px; font-size: clamp(1.3rem, 2.35vw, 2rem); letter-spacing: -.035em; }
.architecture-copy p { margin-bottom: 13px; font-size: .73rem; line-height: 1.55; }
.architecture-copy ul { gap: 6px; margin: 14px 0 17px; font-size: .68rem; }
.architecture-copy li::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border: 1px solid var(--green); border-radius: 50%; box-shadow: inset 0 0 0 2px var(--bg); }
.architecture-copy .outline-btn { padding: 9px 13px; font-size: .54rem; }

.experience-section { padding: 21px 26px 20px; }
.timeline-detailed { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; padding: 22px 0 5px; }
.timeline-detailed::before { top: 38px; right: 4%; bottom: auto; left: 4%; width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--green) 8%, var(--green) 92%, transparent); }
.timeline-detailed article { min-height: 105px; padding: 0 9px; border: 0; text-align: center; }
.timeline-detailed article::before { top: 10px; left: 50%; width: 9px; height: 9px; border: 2px solid var(--green); background: var(--bg); transform: translateX(-50%); }
.timeline-detailed article i { display: block; height: 24px; }
.timeline-year { display: block; color: #f2fff9; font: 700 .64rem/1 var(--mono); }
.timeline-detailed article h3 { min-height: 27px; margin: 17px 0 5px; font-size: .63rem; line-height: 1.3; }
.timeline-detailed article p { font-size: .59rem; line-height: 1.35; }

.achievements-section { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; padding: 0; background: transparent; }
.achievements-section > .panel { padding: 22px 24px; }
.achievements-section .section-heading { margin-bottom: 18px; }
.achievement-list { gap: 9px; }
.achievement-list li { display: flex; align-items: center; gap: 10px; min-height: 28px; padding: 5px 7px; background: rgba(3, 19, 25, .46); font-size: .63rem; line-height: 1.35; }
.achievement-list li::before { display: none; }
.achievement-icon { flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; background: rgba(0,245,223,.12); }
.achievement-icon img { width: 14px; height: 14px; }
.tech-cloud { gap: 6px; }
.tech-cloud span { min-height: 25px; padding: 5px 9px; border-radius: 8px; font-size: .52rem; }
.tech-cloud img { display: none; }
.skills-button { display: flex; width: max-content; margin: 17px auto 0; padding: 8px 13px; font-size: .53rem; }

.contact-panel { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(125px, .55fr)); gap: 10px; margin-top: 13px; padding: 19px 22px; }
.contact-title { gap: 9px; }
.contact-title .brand-mark { width: 29px; height: 29px; }
.contact-title h2 { margin: 3px 0 5px; font-size: .85rem; letter-spacing: .01em; }
.contact-title p { font-size: .61rem; }
.contact-item { min-height: 52px; gap: 8px; padding: 8px 10px; border: 1px solid rgba(98,246,189,.12); background: rgba(3,18,24,.4); font-size: .56rem; }
.contact-item b { flex-basis: 25px; width: 25px; height: 25px; border: 0; }
.contact-item b img { width: 16px; height: 16px; }
.contact-item small { margin-bottom: 3px; font-size: .49rem; }

.footer { grid-template-columns: 1.18fr .9fr .65fr 1fr; gap: 20px; margin-top: 13px; padding: 20px 4px 24px; border-top: 1px solid rgba(98,246,189,.13); }
.footer-brand .brand-mark { width: 30px; height: 30px; }
.footer-brand small { font-size: .47rem; line-height: 1.45; }
.footer-links, .footer-connect { display: block; }
.footer-links > span, .footer-connect > span { display: block; margin-bottom: 9px; color: var(--muted); font: 700 .52rem/1 var(--mono); }
.footer-links > div { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 16px; }
.footer-links a { color: var(--muted); font: .55rem/1 var(--mono); text-decoration: none; }
.footer-links a:hover { color: var(--green); }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(98,246,189,.25); border-radius: 50%; }
.footer-social img { width: 13px; height: 13px; }
.footer-copy { display: grid; gap: 5px; justify-self: end; text-align: right; font-size: .53rem; }
.footer-copy small { color: var(--dim); font: .5rem/1.35 var(--mono); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { max-width: 680px; }
  .hero-visual { min-height: 390px; }
  .capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capability:nth-child(3) { border-right: 0; }
  .capability:nth-child(n + 4) { border-top: 1px solid rgba(98,246,189,.13); padding-top: 14px; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-architecture { grid-template-columns: 1fr; }
  .architecture-diagram { min-height: 300px; }
  .contact-panel { grid-template-columns: 1fr 1fr; }
  .contact-copy { grid-column: 1 / -1; }
  .footer { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-copy { grid-column: 1 / -1; justify-self: start; text-align: left; }
}

@media (max-width: 820px) {
  .desktop-only { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  nav { position: absolute; top: calc(100% + 1px); right: 0; z-index: 20; display: none; width: min(280px, calc(100vw - 28px)); padding: 12px; flex-direction: column; align-items: stretch; gap: 0; border: 1px solid var(--line); background: rgba(3,11,16,.97); box-shadow: var(--shadow); }
  nav.open { display: flex; }
  nav a { padding: 13px 11px; border-bottom: 1px solid var(--line-soft); }
  nav a:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 620px); }
  .topbar { min-height: 61px; width: min(100% - 24px, 620px); }
  .brand-mark { width: 31px; height: 31px; }
  .brand strong { font-size: .67rem; }
  .brand small { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .43rem; }
  .hero { padding: 28px 18px 18px; }
  .hero h1 { font-size: clamp(2.55rem, 13vw, 4rem); white-space: normal; }
  .hero-role { font-size: .86rem; }
  .hero-text { font-size: .72rem; }
  .hero-actions { grid-template-columns: 1fr 1fr; }
  .hero-visual { min-height: 430px; }
  .terminal-card { top: auto; right: 4%; bottom: 68px; left: 4%; width: auto; }
  .metric-strip { right: 4%; bottom: 0; left: 4%; }
  .metric-strip strong { font-size: .82rem; }
  .section { padding: 23px 16px; }
  .capabilities-section { padding: 19px 12px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability { min-height: 108px; border-right: 1px solid rgba(98,246,189,.13); }
  .capability:nth-child(3) { border-right: 1px solid rgba(98,246,189,.13); }
  .capability:nth-child(even) { border-right: 0; }
  .capability:nth-child(n + 3) { border-top: 1px solid rgba(98,246,189,.13); }
  .projects-section { padding-inline: 11px; }
  .project-grid { grid-template-columns: 1fr; gap: 10px; }
  .project-card { min-height: 0; padding: 9px; }
  .project-visual { min-height: 170px; }
  .project-card h3 { min-height: 0; font-size: .78rem; }
  .project-card p { min-height: 0; font-size: .66rem; }
  .project-architecture { grid-template-columns: 1fr; gap: 21px; margin-top: 23px; padding: 22px 0 1px; }
  .architecture-diagram { min-height: 230px; padding: 14px 4px; }
  .diagram-node { min-height: 57px; font-size: .41rem; }
  .diagram-node img { width: 19px; height: 19px; }
  .diagram-main { grid-template-columns: minmax(0, 1fr) 11px minmax(0, 1fr) 11px minmax(0, 1fr) 11px minmax(0, 1fr); gap: 2px; }
  .diagram-bottom { width: 76%; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); }
  .experience-section { padding-inline: 16px; }
  .timeline-detailed { grid-template-columns: 1fr; gap: 0; padding: 10px 0 0 27px; }
  .timeline-detailed::before { top: 19px; right: auto; bottom: 18px; left: 9px; width: 1px; height: auto; background: linear-gradient(var(--green), rgba(98,246,189,.1)); }
  .timeline-detailed article { min-height: 83px; padding: 0 0 18px 16px; text-align: left; }
  .timeline-detailed article::before { top: 1px; left: -22px; width: 8px; height: 8px; transform: none; }
  .timeline-detailed article i { display: none; }
  .timeline-detailed article h3 { min-height: 0; margin: 8px 0 4px; font-size: .69rem; }
  .timeline-year { font-size: .6rem; }
  .achievements-section { grid-template-columns: 1fr; gap: 11px; }
  .achievements-section > .panel { padding: 22px 17px; }
  .contact-panel { grid-template-columns: 1fr; }
  .contact-copy { grid-column: auto; }
  .footer { grid-template-columns: 1fr 1fr; gap: 19px 13px; }
  .footer-brand, .footer-copy { grid-column: 1 / -1; }
  .footer-copy { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-network-art { animation: none; }
}


/* Reference image is an 864px-wide desktop composition; collapse below tablet width. */
.hero h1 span { background: linear-gradient(105deg, var(--cyan), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (min-width: 821px) {
  .desktop-only { display: inline-flex; }
  .nav-toggle { display: none; }
  nav { position: static; display: flex; flex-direction: row; align-items: center; gap: clamp(12px, 1.8vw, 24px); width: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
  nav a { padding: 0; border: 0; }
}
@media (max-width: 820px) {
  .capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Compact desktop treatment for the supplied 864px reference capture. */
@media (min-width: 821px) and (max-width: 1000px) {
  .topbar { min-height: 58px; padding-block: 7px; }
  .hero { min-height: 312px; padding: 20px 24px 17px; gap: 10px; }
  .hero h1 { margin: 10px 0 8px; font-size: 3.15rem; }
  .hero-role { font-size: .78rem; }
  .hero-text { max-width: 380px; margin-top: 11px; font-size: .61rem; line-height: 1.5; }
  .hero-actions { margin-top: 13px; }
  .hero-actions a { padding: 8px 11px; font-size: .49rem; }
  .social-row { margin-top: 13px; }
  .social-row a { width: 24px; height: 24px; }
  .hero-visual { min-height: 300px; }
  .terminal-card { top: 6%; width: min(248px, 46%); padding: 10px; }
  #terminal-output { min-height: 102px; font-size: .48rem; }
  .metric-strip { padding: 8px 3px; }
  .metric-strip div { padding-inline: 6px; }
  .metric-strip span { font-size: .4rem; }
  .metric-strip strong { font-size: .78rem; }
  .section { margin-top: 8px; padding: 17px 16px; }
  .capabilities-section { padding: 14px 16px 16px; }
  .capability { min-height: 82px; padding: 4px 8px 5px; }
  .capability .icon { width: 25px; height: 25px; margin-bottom: 6px; }
  .capability h3 { font-size: .46rem; }
  .capability p { margin-top: 4px; font-size: .48rem; }
  .projects-section { padding: 17px 10px 19px; }
  .project-grid { gap: 6px; }
  .project-card { min-height: 255px; padding: 5px; }
  .project-visual { min-height: 94px; }
  .project-brand { top: 5px; left: 5px; width: 20px; height: 20px; }
  .legend-brand { width: 20px; height: 25px; }
  .project-card h3 { min-height: 28px; margin: 7px 1px 4px; font-size: .54rem; }
  .project-card p { min-height: 40px; margin-inline: 1px; font-size: .48rem; line-height: 1.35; }
  .tags { gap: 3px; margin: 7px 1px; }
  .tags span { padding: 3px 4px; font-size: .37rem; }
  .project-card > a { margin-inline: 1px; font-size: .43rem; }
  .center { margin-top: 11px; }
  .center .outline-btn { padding: 7px 10px; font-size: .45rem; }
  .project-architecture { gap: 20px; margin-top: 17px; padding: 17px 5px 1px; }
  .architecture-diagram { min-height: 220px; padding: 12px 7px; }
  .diagram-node { min-height: 53px; font-size: .4rem; }
  .diagram-node img { width: 19px; height: 19px; }
  .architecture-copy h2 { margin-block: 5px 8px; font-size: 1.45rem; }
  .architecture-copy p { margin-bottom: 8px; font-size: .58rem; }
  .architecture-copy ul { gap: 4px; margin: 8px 0 11px; font-size: .54rem; }
  .architecture-copy .outline-btn { padding: 7px 10px; font-size: .45rem; }
  .experience-section { padding: 15px 16px 14px; }
  .timeline-detailed { padding-top: 17px; }
  .timeline-detailed article { min-height: 83px; padding-inline: 4px; }
  .timeline-year { font-size: .5rem; }
  .timeline-detailed article h3 { min-height: 22px; margin-top: 13px; font-size: .51rem; }
  .timeline-detailed article p { font-size: .46rem; }
  .achievements-section { gap: 8px; }
  .achievements-section > .panel { padding: 15px 14px; }
  .achievements-section .section-heading { margin-bottom: 11px; }
  .achievement-list { gap: 5px; }
  .achievement-list li { min-height: 22px; gap: 6px; padding: 3px 4px; font-size: .48rem; }
  .achievement-icon { flex-basis: 18px; width: 18px; height: 18px; }
  .achievement-icon img { width: 11px; height: 11px; }
  .tech-cloud { gap: 4px; }
  .tech-cloud span { min-height: 19px; padding: 3px 6px; font-size: .4rem; }
  .skills-button { margin-top: 10px; padding: 6px 9px; font-size: .43rem; }
  .contact-panel { gap: 6px; margin-top: 8px; padding: 13px 14px; }
  .contact-title h2 { font-size: .66rem; }
  .contact-title p { font-size: .48rem; }
  .contact-item { min-height: 38px; padding: 5px 6px; font-size: .43rem; }
  .contact-item b { flex-basis: 18px; width: 18px; height: 18px; }
  .contact-item b img { width: 12px; height: 12px; }
  .contact-item small { font-size: .38rem; }
  .footer { gap: 12px; margin-top: 8px; padding-block: 13px 15px; }
  .footer-links > span, .footer-connect > span { margin-bottom: 5px; font-size: .42rem; }
  .footer-links > div { gap: 4px 9px; }
  .footer-links a { font-size: .43rem; }
  .footer-social { gap: 4px; }
  .footer-social a { width: 19px; height: 19px; }
  .footer-social img { width: 10px; height: 10px; }
  .footer-copy { font-size: .41rem; }
  .footer-copy small { font-size: .39rem; }
}


.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }


@media (min-width: 821px) and (max-width: 1000px) {
  .capability { min-height: 74px; }
  .project-card { min-height: 244px; }
  .project-architecture { margin-top: 12px; padding-block: 12px 0; }
  .experience-section { padding-block: 11px 10px; }
  .timeline-detailed article { min-height: 76px; }
  .achievements-section > .panel { padding-block: 11px; }
  .contact-panel { padding-block: 9px; }
  .footer { padding-block: 8px; }
}

/* Focused visual-fidelity and readability pass. */
:root {
  --muted: #b0c8c3;
  --dim: #789694;
  --line: rgba(98, 246, 189, .42);
  --line-soft: rgba(98, 246, 189, .18);
}

body { font-size: 16px; line-height: 1.65; }
nav a, .footer-links a { font-size: .72rem; letter-spacing: .075em; }
.panel {
  background: linear-gradient(145deg, rgba(10, 30, 38, .96), rgba(4, 13, 20, .92));
  border-color: rgba(98, 246, 189, .2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .52), inset 0 1px 0 rgba(173, 255, 235, .05), inset 0 0 32px rgba(0, 245, 223, .025);
}
.section { margin-top: 18px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2 { font-size: clamp(1.12rem, 1.7vw, 1.48rem); }
.capability p { font-size: .75rem; line-height: 1.55; color: var(--muted); }
.capability h3 { font-size: .64rem; letter-spacing: .025em; }

.hero h1 { font-size: clamp(3.45rem, 5.8vw, 5rem); }
.hero-text { font-size: .9rem; line-height: 1.72; color: var(--muted); }
.hero-role { font-size: 1.05rem; }
.social-row a { width: 34px; height: 34px; }
.social-row img { width: 19px; height: 19px; }
.hero-visual { min-height: 430px; }
.hero-network-art { z-index: 1; opacity: .9; }
.hero-world-map { position: absolute; inset: -2% -3% 0 5%; z-index: 1; width: 98%; height: 100%; object-fit: contain; opacity: .78; filter: drop-shadow(0 0 16px rgba(0, 245, 223, .22)); pointer-events: none; animation: drift 22s ease-in-out infinite; }
#globe { z-index: 2; }
.globe-hud { z-index: 3; }
.terminal-card { z-index: 4; box-shadow: 0 18px 34px rgba(0, 0, 0, .48), 0 0 30px rgba(0, 245, 223, .13), inset 0 0 28px rgba(0, 245, 223, .045); }
.metric-strip { z-index: 5; background: rgba(4, 20, 27, .9); box-shadow: 0 16px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(170, 255, 234, .06); }

.project-card {
  min-height: 360px;
  padding: 13px;
  background: linear-gradient(155deg, rgba(9, 31, 39, .94), rgba(4, 15, 22, .94));
  border-color: rgba(98, 246, 189, .25);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(177, 255, 234, .04);
}
.project-visual { min-height: 155px; background: #041017; box-shadow: inset 0 0 26px rgba(0, 245, 223, .06); }
.project-visual > img:first-child { width: 100%; height: 100%; object-fit: contain; opacity: 1; }
.project-card h3 { min-height: 42px; margin: 15px 3px 8px; font-size: .84rem; line-height: 1.3; }
.project-card p { min-height: 62px; margin: 0 3px; font-size: .74rem; line-height: 1.55; color: var(--muted); }
.tags { gap: 6px; margin: 14px 3px; }
.tags span { padding: 5px 7px; font-size: .56rem; }
.project-card > a { margin: auto 3px 4px; font-size: .62rem; }
.project-brand { box-shadow: 0 0 18px rgba(0, 245, 223, .15); }

.architecture-diagram { border-color: rgba(98, 246, 189, .22); background: linear-gradient(145deg, rgba(5, 22, 29, .9), rgba(2, 10, 16, .84)); box-shadow: inset 0 0 30px rgba(0, 245, 223, .035); }
.decision-diagram { grid-template-rows: auto 18px auto 28px auto; }
.diagram-main { gap: 7px; grid-template-columns: minmax(0, 1fr) 25px minmax(0, 1fr) 25px minmax(0, 1fr) 25px minmax(0, 1fr); }
.diagram-bottom { width: 70%; }
.diagram-node { min-width: 0; min-height: 84px; padding: 10px 7px; gap: 8px; border-color: rgba(98, 246, 189, .48); background: rgba(3, 17, 24, .94); box-shadow: 0 8px 18px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(177, 255, 234, .05); font-size: .56rem; line-height: 1.35; letter-spacing: .018em; }
.diagram-node img { width: 29px; height: 29px; }
.node-ai, .node-processing { border-color: rgba(89, 255, 106, .65); box-shadow: 0 0 24px rgba(89, 255, 106, .1), inset 0 1px 0 rgba(177, 255, 234, .06); }
.diagram-arrow { font-size: 1.05rem; text-shadow: 0 0 12px rgba(89, 255, 106, .5); }
.architecture-copy p { font-size: .86rem; line-height: 1.65; }
.architecture-copy ul { gap: 8px; font-size: .78rem; }

.timeline-detailed { padding-top: 27px; }
.timeline-detailed::before { top: 43px; background: linear-gradient(90deg, transparent, var(--green) 8%, var(--green) 92%, transparent); box-shadow: 0 0 18px rgba(89, 255, 106, .42); }
.timeline-detailed article::before { top: 12px; width: 11px; height: 11px; border-width: 2px; box-shadow: 0 0 18px rgba(89, 255, 106, .8); }
.timeline-year { font-size: .76rem; }
.timeline-detailed article h3 { margin-top: 19px; font-size: .76rem; }
.timeline-detailed article p { font-size: .68rem; line-height: 1.48; color: var(--muted); }

.achievement-list { gap: 11px; font-size: .75rem; }
.achievement-list li { min-height: 34px; padding: 7px 9px; color: var(--muted); }
.achievement-icon { flex-basis: 28px; width: 28px; height: 28px; }
.achievement-icon img { width: 16px; height: 16px; }
.tech-cloud { gap: 8px; }
.tech-cloud span { min-height: 29px; padding: 6px 10px; font-size: .59rem; color: #b8d0ca; background: rgba(10, 32, 40, .82); border-color: rgba(98, 246, 189, .27); }
.skills-button { margin-top: 20px; }

.contact-panel { padding-block: 24px; box-shadow: 0 16px 44px rgba(0, 0, 0, .46), inset 0 1px 0 rgba(177, 255, 234, .05); }
.contact-title h2 { font-size: 1.06rem; }
.contact-title p { font-size: .78rem; }
.contact-item { min-height: 62px; padding: 10px 13px; font-size: .68rem; }
.contact-item b { flex-basis: 31px; width: 31px; height: 31px; }
.contact-item b img { width: 19px; height: 19px; }
.contact-item small { font-size: .55rem; }
.footer { padding-block: 27px 30px; }
.footer-brand small { font-size: .56rem; }
.footer-links > span, .footer-connect > span { font-size: .59rem; }
.footer-links a { font-size: .62rem; }
.footer-social a { width: 29px; height: 29px; }
.footer-social img { width: 15px; height: 15px; }
.footer-copy { font-size: .6rem; }
.footer-copy small { font-size: .56rem; }

@media (min-width: 821px) and (max-width: 1000px) {
  body { line-height: 1.6; }
  .topbar { min-height: 62px; }
  .topbar > .outline-btn { gap: 6px; padding-inline: 10px; font-size: .48rem; white-space: nowrap; }
  nav a { font-size: .67rem; }
  .hero { min-height: 336px; padding: 22px 24px 19px; }
  .hero h1 { margin: 11px 0 9px; font-size: 3.35rem; }
  .hero-role { font-size: .86rem; }
  .hero-text { max-width: 390px; margin-top: 12px; font-size: .77rem; line-height: 1.58; }
  .hero-actions { margin-top: 15px; }
  .hero-actions a { padding: 9px 12px; font-size: .55rem; }
  .social-row { margin-top: 16px; font-size: .54rem; }
  .social-row a { width: 28px; height: 28px; }
  .social-row img { width: 16px; height: 16px; }
  .hero-visual { min-height: 340px; }
  .hero-world-map { inset: -4% -8% -2% 4%; width: 105%; }
  .terminal-card { top: 7%; width: min(290px, 60%); padding: 12px; }
  #terminal-output { min-height: 112px; font-size: .54rem; line-height: 1.6; }
  .metric-strip { padding: 9px 4px; }
  .metric-strip span { font-size: .46rem; }
  .metric-strip strong { font-size: .86rem; }
  .section { margin-top: 11px; padding: 20px 17px; }
  .capabilities-section { padding: 16px 17px 18px; }
  .capability { min-height: 92px; padding: 6px 8px 7px; }
  .capability .icon { width: 29px; height: 29px; margin-bottom: 7px; }
  .capability h3 { font-size: .55rem; }
  .capability p { font-size: .62rem; line-height: 1.45; }
  .projects-section { padding: 20px 10px 23px; }
  .project-card { min-height: 286px; padding: 8px; }
  .project-visual { min-height: 112px; }
  .project-card h3 { min-height: 34px; margin: 10px 2px 6px; font-size: .65rem; }
  .project-card p { min-height: 49px; margin-inline: 2px; font-size: .59rem; line-height: 1.45; }
  .tags { gap: 4px; margin: 10px 2px; }
  .tags span { padding: 4px 5px; font-size: .47rem; }
  .project-card > a { margin-inline: 2px; font-size: .52rem; }
  .architecture-diagram { min-height: 240px; padding: 15px 8px; }
  .diagram-node { min-height: 61px; padding: 7px 4px; font-size: .45rem; }
  .diagram-node img { width: 22px; height: 22px; }
  .diagram-main { gap: 3px; grid-template-columns: minmax(0, 1fr) 15px minmax(0, 1fr) 15px minmax(0, 1fr) 15px minmax(0, 1fr); }
  .architecture-copy h2 { font-size: 1.56rem; }
  .architecture-copy p { font-size: .65rem; }
  .architecture-copy ul { font-size: .59rem; }
  .timeline-year { font-size: .62rem; }
  .timeline-detailed article h3 { font-size: .6rem; }
  .timeline-detailed article p { font-size: .55rem; }
  .achievement-list { font-size: .59rem; }
  .achievement-list li { min-height: 27px; padding: 5px 6px; }
  .achievement-icon { flex-basis: 23px; width: 23px; height: 23px; }
  .achievement-icon img { width: 13px; height: 13px; }
  .tech-cloud { gap: 5px; }
  .tech-cloud span { min-height: 23px; padding: 4px 7px; font-size: .48rem; }
  .contact-panel { padding-block: 16px; }
  .contact-title h2 { font-size: .78rem; }
  .contact-title p { font-size: .6rem; }
  .contact-item { min-height: 45px; padding: 7px 8px; font-size: .52rem; }
  .contact-item b { flex-basis: 23px; width: 23px; height: 23px; }
  .contact-item b img { width: 15px; height: 15px; }
  .footer { padding-block: 17px 20px; }
  .footer-brand small { font-size: .5rem; }
  .footer-links a { font-size: .52rem; }
  .footer-copy { font-size: .5rem; }
  .footer-copy small { font-size: .46rem; }
}

@media (max-width: 820px) {
  .hero-world-map { inset: 0 -10% 0 -5%; width: 115%; opacity: .7; }
  .hero-visual { min-height: 410px; }
  .project-card p { font-size: .72rem; line-height: 1.55; }
  .project-card h3 { font-size: .82rem; }
  .tags span { font-size: .54rem; }
  .diagram-node { font-size: .46rem; }
  .timeline-year { font-size: .68rem; }
  .timeline-detailed article h3 { font-size: .73rem; }
  .timeline-detailed article p { font-size: .65rem; }
  .achievement-list { font-size: .7rem; }
  .tech-cloud span { font-size: .56rem; }
  .contact-item { font-size: .64rem; }
  .footer-links a { font-size: .58rem; }
  .footer-copy { font-size: .56rem; }
}

@media (max-width: 760px) {
  .hero-world-map { inset: 0 -18% 0 -18%; width: 136%; }
  .hero-visual { min-height: 430px; }
  .project-visual { min-height: 190px; }
  .contact-title h2 { font-size: .96rem; }
  .contact-title p { font-size: .7rem; }
}

/* Keep the six-card desktop reference frame compact at 864px without reverting its contrast. */
@media (min-width: 821px) and (max-width: 1000px) {
  .hero { min-height: 350px; }
  .hero-visual { min-height: 350px; }
  .capability { min-height: 82px; }
  .capability p { font-size: .56rem; }
  .project-card { min-height: 250px; padding: 6px; }
  .project-visual { min-height: 96px; }
  .project-card h3 { min-height: 28px; margin: 7px 1px 4px; font-size: .58rem; }
  .project-card p { min-height: 0; margin-inline: 1px; font-size: .52rem; line-height: 1.35; }
  .tags { gap: 3px; margin: 7px 1px; }
  .tags span { padding: 3px 4px; font-size: .42rem; }
  .project-card > a { margin-inline: 1px; font-size: .47rem; }
  .project-architecture { margin-top: 14px; padding-block: 14px 0; }
  .architecture-diagram { min-height: 218px; padding: 11px 6px; }
  .decision-diagram { grid-template-rows: auto 11px auto 17px auto; }
  .diagram-main { gap: 3px; grid-template-columns: minmax(0, 1fr) 13px minmax(0, 1fr) 13px minmax(0, 1fr) 13px minmax(0, 1fr); }
  .diagram-node { min-height: 51px; padding: 6px 4px; gap: 5px; font-size: .4rem; }
  .diagram-node img { width: 19px; height: 19px; }
  .diagram-bottom { width: 68%; }
  .diagram-arrow { font-size: .8rem; }
  .architecture-copy h2 { margin-block: 5px 7px; font-size: 1.35rem; }
  .architecture-copy p { margin-bottom: 8px; font-size: .57rem; line-height: 1.45; }
  .architecture-copy ul { gap: 4px; margin: 8px 0 10px; font-size: .52rem; }
  .architecture-copy .outline-btn { padding: 7px 10px; font-size: .43rem; }
  .profile-orbit { width: 62px; height: 62px; }
  .experience-section { padding-block: 13px 11px; }
  .timeline-detailed { padding-top: 16px; }
  .timeline-detailed::before { top: 34px; }
  .timeline-detailed article::before { top: 8px; width: 8px; height: 8px; }
  .timeline-detailed article i { height: 15px; }
  .timeline-year { font-size: .56rem; }
  .timeline-detailed article h3 { min-height: 20px; margin: 11px 0 3px; font-size: .54rem; }
  .timeline-detailed article p { font-size: .5rem; line-height: 1.3; }
  .achievements-section > .panel { padding-block: 13px; }
  .achievements-section .section-heading { margin-bottom: 11px; }
  .achievement-list { gap: 5px; font-size: .52rem; }
  .achievement-list li { min-height: 23px; padding: 3px 4px; }
  .achievement-icon { flex-basis: 19px; width: 19px; height: 19px; }
  .achievement-icon img { width: 11px; height: 11px; }
  .tech-cloud { gap: 4px; }
  .tech-cloud span { min-height: 19px; padding: 3px 6px; font-size: .42rem; }
  .skills-button { margin-top: 9px; padding: 6px 9px; font-size: .42rem; }
  .contact-panel { padding-block: 11px; }
  .contact-title h2 { font-size: .68rem; }
  .contact-title p { font-size: .52rem; }
  .contact-item { min-height: 38px; padding: 5px 6px; font-size: .45rem; }
  .contact-item b { flex-basis: 19px; width: 19px; height: 19px; }
  .contact-item b img { width: 12px; height: 12px; }
  .contact-item small { font-size: .4rem; }
  .footer { padding-block: 10px 12px; }
  .footer-brand small { font-size: .45rem; }
  .footer-links > span, .footer-connect > span { font-size: .43rem; }
  .footer-links a { font-size: .44rem; }
  .footer-social a { width: 21px; height: 21px; }
  .footer-social img { width: 11px; height: 11px; }
  .footer-copy { font-size: .43rem; }
  .footer-copy small { font-size: .4rem; }

  /* Keep the 864px reference composition inside its captured frame. */
  .section { margin-top: 6px; }
  .capabilities-section { padding-block: 10px 12px; }
  .projects-section { padding-block: 14px 16px; }
  .experience-section { padding-block: 6px 5px; }
  .timeline-detailed { padding-top: 10px; }
  .timeline-detailed::before { top: 28px; }
  .timeline-detailed article::before { top: 5px; }
  .timeline-detailed article i { height: 8px; }
  .timeline-detailed article h3 { margin-top: 7px; }
  .achievements-section { padding-block: 8px; }
  .achievements-section > .panel { padding-block: 8px; }
  .achievements-section .section-heading { margin-bottom: 8px; }
  .achievement-list { gap: 3px; }
  .achievement-list li { padding-block: 2px; }
  .contact-panel { padding-block: 5px; }
  .footer { margin-top: 5px; padding-block: 7px 9px; }
}

/* Final precision alignment: preserve the compact reference frame while tightening the visual anchors. */
@media (min-width: 821px) {
  .project-card {
    display: grid;
    grid-template-rows: var(--project-artwork-height, 125px) var(--project-title-height, 35px) minmax(var(--project-description-height, 49px), auto) auto 1fr;
    align-content: stretch;
  }

  .project-visual {
    height: var(--project-artwork-height, 125px);
    min-height: 0;
  }

  .project-card h3,
  .project-card p,
  .tags,
  .project-card > a { min-width: 0; }
  .project-card h3 { margin-block: 8px 4px; }
  .project-card p { margin-block: 0; }
  .tags { align-self: start; }
  .project-card > a { align-self: end; }

  .capability .icon,
  .capability .icon img { width: 27px; height: 27px; }
  .capability .icon { display: grid; place-items: center; margin-bottom: 7px; }
  .capability h3 { min-height: 1.25em; }
  .capability p { min-height: 2.7em; color: #bfd3ce; line-height: 1.35; }

  .architecture-diagram { background: rgba(2, 12, 18, .94); }
  .decision-diagram,
  .diagram-top,
  .diagram-main,
  .diagram-bottom { position: relative; }
  .diagram-top,
  .diagram-main,
  .diagram-bottom { z-index: 2; }
  .diagram-node { position: relative; z-index: 3; border-color: rgba(98, 246, 189, .58); background: rgba(4, 15, 22, .97); }
  .diagram-arrow { position: relative; z-index: 1; color: #75ffbd; text-shadow: 0 0 8px rgba(89, 255, 106, .6); }
}

@media (min-width: 821px) and (max-width: 1000px) {
  #globe { inset: -2% 0 16%; }
  .globe-hud { inset: 1% 3% 18%; }
  .hero-world-map { transform: translateY(-3%); }
  .terminal-card { top: 6%; left: 8%; }
  .metric-strip { bottom: 3%; }
  .social-row { margin-top: 11px; }

  .project-card {
    --project-artwork-height: 96px;
    --project-title-height: 28px;
    --project-description-height: 40px;
  }
  .project-card h3 { margin-block: 7px 4px; }
  .project-card p { font-size: .53rem; line-height: 1.35; color: #bfd3ce; }
  .tags { margin-block: 7px; }

  .achievement-list { font-size: .54rem; }
  .achievement-list li { min-height: 24px; }
  .tech-cloud { gap: 5px; }
  .tech-cloud span { min-height: 20px; padding-block: 3px; font-size: .44rem; }
  .skills-button { margin-top: 7px; }
  .contact-title h2 { font-size: .7rem; }
  .contact-title p { font-size: .54rem; }
  .contact-item { font-size: .47rem; }
  .contact-item small { font-size: .41rem; }
  .footer-brand small { font-size: .47rem; }
  .footer-links > span, .footer-connect > span { font-size: .45rem; }
  .footer-links a { font-size: .46rem; }
  .footer-copy { font-size: .45rem; }
  .footer-copy small { font-size: .42rem; }
}


/* Final precision pass: keep desktop anchors aligned without changing the mobile composition. */
@media (min-width: 821px) {
  .hero-visual { min-height: 420px; }
  #globe { inset: -2% 0 18%; }
  .globe-hud { inset: 1% 3% 20%; }
  .hero-world-map { inset: -4% -3% 1% 5%; }
  .terminal-card { top: 8%; left: 8%; }
  .metric-strip { bottom: 3%; }
  .social-row { margin-top: 16px; }

  .capability {
    min-height: 90px;
    padding: 8px 12px 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .capability .icon,
  .capability .icon img {
    width: 29px;
    height: 29px;
  }
  .capability .icon { flex: 0 0 29px; margin-bottom: 7px; }
  .capability h3 {
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .capability p { min-height: 2.7em; margin-top: 5px; line-height: 1.35; }

  .project-card {
    min-height: 360px;
    grid-template-rows: var(--project-artwork-height, 125px) var(--project-title-height, 48px) var(--project-description-height, 62px) 34px 1fr;
  }
  .project-visual { height: var(--project-artwork-height, 125px); }
  .project-card h3 { min-height: 0; margin-block: 8px 4px; }
  .project-card p { min-height: 0; }
  .tags { height: 34px; min-height: 34px; margin: 0 3px; align-content: start; overflow: hidden; }

  .decision-diagram {
    grid-template-rows: auto auto auto;
    row-gap: 18px;
  }
  .diagram-top,
  .diagram-main,
  .diagram-bottom { position: relative; }
  .diagram-top::after,
  .diagram-main::after {
    content: "";
    position: absolute;
    left: 50%;
    z-index: 0;
    width: 1px;
    background: rgba(117, 255, 189, .62);
    box-shadow: 0 0 8px rgba(89, 255, 106, .3);
    transform: translateX(-50%);
  }
  .diagram-top::after { top: 100%; height: 18px; }
  .diagram-main::after { top: 100%; height: 18px; }
  .diagram-main::before,
  .diagram-bottom::before {
    content: "";
    position: absolute;
    left: 5%;
    right: 5%;
    top: 50%;
    z-index: 0;
    height: 1px;
    background: rgba(117, 255, 189, .62);
    box-shadow: 0 0 8px rgba(89, 255, 106, .3);
  }
  .diagram-node { z-index: 3; }
  .diagram-arrow { z-index: 4; }

  .achievements-section > .panel { min-height: 100%; display: flex; flex-direction: column; }
  .achievement-list { font-size: .78rem; line-height: 1.45; }
  .tech-cloud { row-gap: 9px; }
  .skills-button { margin-top: 14px; }
  .contact-item { font-size: .71rem; }
  .contact-item small { font-size: .58rem; }
  .footer-brand small { font-size: .58rem; }
  .footer-links a { font-size: .64rem; }
  .footer-copy { font-size: .62rem; }
  .footer-copy small { font-size: .58rem; }
}

@media (min-width: 821px) and (max-width: 1000px) {
  .hero-visual { min-height: 350px; }
  #globe { inset: -3% 0 18%; }
  .globe-hud { inset: 0 3% 20%; }
  .hero-world-map { inset: -6% -8% 0 4%; width: 105%; }
  .terminal-card { top: 6%; left: 8%; }
  .metric-strip { bottom: 3%; }
  .project-card {
    min-height: 260px;
    --project-artwork-height: 96px;
    --project-title-height: 34px;
    --project-description-height: 42px;
    grid-template-rows: var(--project-artwork-height) var(--project-title-height) var(--project-description-height) 26px 1fr;
  }
  .project-visual { height: var(--project-artwork-height); }
  .project-card h3 { margin-block: 6px 3px; }
  .project-card p { line-height: 1.35; }
  .tags { height: 26px; min-height: 26px; margin: 0 1px; }
  .diagram-top::after,
  .diagram-main::after { height: 11px; }
  .decision-diagram { row-gap: 11px; }
}

@media (max-width: 760px) {
  .decision-diagram { row-gap: 12px; }
  .diagram-top,
  .diagram-main,
  .diagram-bottom { position: relative; }
  .diagram-main::before,
  .diagram-bottom::before {
    content: "";
    position: absolute;
    left: 5%;
    right: 5%;
    top: 50%;
    z-index: 0;
    height: 1px;
    background: rgba(117, 255, 189, .52);
  }
  .diagram-node { z-index: 3; }
  .diagram-arrow { z-index: 4; }
}

/* Final craft pass: equal narrow-screen tracks and stable HiDPI geometry. */
@media (max-width: 820px) {
  .capability-grid,
  .project-grid {
    grid-auto-rows: 1fr;
  }

  .capability,
  .project-card {
    height: 100%;
  }
}

@media (max-width: 760px) {
  .diagram-node {
    min-height: 79px;
    height: 79px;
  }
}

@media (min-width: 821px) and (max-width: 1000px) {
  .diagram-node {
    min-height: 56px;
    height: 56px;
  }
}

@media (min-width: 1001px) and (max-width: 1150px) {
  .diagram-node {
    min-height: 96px;
    height: 96px;
  }
}

@media (min-width: 821px) and (max-width: 850px) {
  .topbar > .desktop-only {
    display: none;
  }
}


/* Controlled local artwork and responsive project-card polish. */
.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  grid-auto-rows: 1fr;
}
.project-card {
  min-height: 0;
  height: 100%;
}
.project-visual {
  aspect-ratio: 4 / 3;
  min-height: 0;
  height: auto;
  overflow: hidden;
}
.project-visual > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.project-card h3 { min-height: 2.6em; }
.project-card p { min-height: 4.65em; }
.project-card > a { margin-top: auto; }

@media (min-width: 821px) {
  .project-card {
    display: flex;
    flex-direction: column;
  }
  .project-visual { height: auto; }
  .tags { height: auto; min-height: 34px; margin-bottom: 12px; }
}

@media (min-width: 821px) and (max-width: 1150px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-card:last-child { grid-column: auto; width: auto; }
  .diagram-node { min-height: 72px; height: 72px; }
}

@media (max-width: 820px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .project-card:last-child { grid-column: auto; width: auto; }
  .project-card h3 { min-height: 2.6em; }
  .project-card p { min-height: 4.65em; }
  .tags { min-height: 30px; margin-bottom: 12px; }
}

@media (max-width: 760px) {
  .project-grid { grid-template-columns: 1fr; }
  .project-card h3, .project-card p { min-height: 0; }
  .project-visual { aspect-ratio: 4 / 3; }
}

@media (min-width: 761px) and (max-width: 1150px) {
  .capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .capability { min-height: 92px; height: 100%; border: 1px solid rgba(98,246,189,.13); }
}

@media (max-width: 760px) {
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .capability { min-height: 104px; height: 100%; padding-inline: 8px; border: 1px solid rgba(98,246,189,.13); }
}

.hero-world-map {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: none;
}


/* Keep the final tablet project card aligned with its grid track. */
@media (min-width: 761px) and (max-width: 1150px) {
  .project-card:last-child {
    grid-column: auto;
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }
}


/* Precision alignment and responsive readability pass. */
:root {
  --layout-max: 1440px;
  --layout-gutter: clamp(16px, 2.4vw, 32px);
}

html { overflow-x: clip; }
body { overflow-x: clip; }

.shell,
.topbar {
  width: min(var(--layout-max), calc(100% - (var(--layout-gutter) * 2)));
  min-width: 0;
}

.topbar { padding-inline: 0; }
.hero,
.section,
.footer,
.project-card,
.capability,
.project-architecture,
.architecture-diagram,
.architecture-copy,
.contact-panel { min-width: 0; }
.hero-visual { min-width: 0; overflow: clip; }

/* Keep the rotated HUD accent inside the hero instead of masking document overflow. */
.hud-line.l2 { right: 18%; width: 110px; }

.project-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
.project-visual {
  aspect-ratio: 4 / 3;
  min-height: 0;
  height: auto;
  overflow: hidden;
}
.project-visual > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: clamp(0px, .35vw, 5px);
  background: #041017;
}
.project-card h3 { min-height: 2.6em; }
.project-card p { min-height: 4.5em; }
.project-card > a { margin-top: auto; }

@media (min-width: 1001px) {
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capability-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 761px) and (max-width: 1000px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .capability { min-height: 112px; }
  .capability h3 { font-size: .62rem; }
  .capability p { font-size: .72rem; line-height: 1.4; }
  .project-card { padding: 10px; }
  .project-card h3 { font-size: .76rem; }
  .project-card p { font-size: .68rem; line-height: 1.45; }
  .tags span { font-size: .52rem; }
  .project-card > a { font-size: .58rem; }
  .timeline-year { font-size: .68rem; }
  .timeline-detailed article h3 { font-size: .68rem; }
  .timeline-detailed article p { font-size: .62rem; }
  .achievement-list { font-size: .66rem; }
  .tech-cloud span { font-size: .52rem; }
  .contact-item { font-size: .58rem; }
  .footer-links a { font-size: .56rem; }
  .footer-copy { font-size: .54rem; }
}

/* Collapse before the navigation becomes cramped, while retaining the desktop hero. */
@media (max-width: 1000px) {
  .desktop-only { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  nav {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    z-index: 20;
    display: none;
    width: min(280px, calc(100vw - 32px));
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    background: rgba(3, 11, 16, .97);
    box-shadow: var(--shadow);
  }
  nav.open { display: flex; }
  nav a { padding: 13px 11px; border-bottom: 1px solid var(--line-soft); }
  nav a:last-child { border-bottom: 0; }
}

@media (max-width: 760px) {
  .shell,
  .topbar { width: min(100% - 24px, 620px); }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-strip div { padding: 8px 10px; border-right: 1px solid rgba(98,246,189,.15); border-bottom: 1px solid rgba(98,246,189,.15); }
  .metric-strip div:nth-child(even) { border-right: 0; }
  .metric-strip div:nth-child(n + 3) { border-bottom: 0; }
  .hero-text { font-size: .82rem; line-height: 1.65; }
  .capability h3 { font-size: .60rem; }
  .capability p { font-size: .68rem; line-height: 1.4; }
  .project-card h3 { font-size: .84rem; }
  .project-card p { font-size: .72rem; line-height: 1.5; }
  .tags span { font-size: .52rem; }
  .project-card > a { font-size: .56rem; }
  .timeline-year { font-size: .66rem; }
  .timeline-detailed article h3 { font-size: .76rem; }
  .timeline-detailed article p { font-size: .62rem; }
  .achievement-list { font-size: .68rem; }
  .tech-cloud span { font-size: .55rem; }
  .contact-item { font-size: .68rem; }
  .footer-links a { font-size: .58rem; }
  .footer-copy { font-size: .52rem; }
  .footer-copy small { font-size: .48rem; }
  .hud-line.l2 { top: 48%; right: 18%; width: 96px; transform: rotate(148deg); }
}

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

/* Unified slightly-rounded frame system. */
:root {
  --frame-radius: 12px;
  --inner-frame-radius: 10px;
  --frame-border: rgba(98, 246, 189, .22);
  --inner-frame-border: rgba(98, 246, 189, .17);
  --frame-background: linear-gradient(145deg, rgba(8, 25, 33, .94), rgba(4, 13, 20, .92));
}

.hero.shell,
.section.shell.panel:not(.achievements-section),
.achievements-section > .compact-panel,
.project-architecture,
.footer.shell {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--frame-border);
  border-radius: var(--frame-radius);
  clip-path: none;
  background: var(--frame-background);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(177, 255, 234, .035);
}

.hero.shell::after,
.section.shell.panel:not(.achievements-section)::after,
.achievements-section > .compact-panel::after {
  display: none;
}

.achievements-section {
  border: 0;
  clip-path: none;
  box-shadow: none;
  background: transparent;
}

.project-architecture {
  border-top: 1px solid var(--frame-border);
  padding: 28px 28px 24px;
}

.capability,
.project-card,
.architecture-diagram,
.desktop-diagram,
.mobile-diagram,
.contact-item {
  border-radius: var(--inner-frame-radius);
  clip-path: none;
}

.capability {
  overflow: hidden;
  border-color: var(--inner-frame-border) !important;
}

.project-card {
  border-color: var(--inner-frame-border) !important;
}

.architecture-diagram,
.desktop-diagram,
.mobile-diagram {
  overflow: hidden;
  border-color: var(--inner-frame-border);
}

.contact-item {
  overflow: hidden;
  border-color: var(--inner-frame-border);
  background: rgba(3, 18, 24, .5);
}

.project-card .project-visual > img:first-child {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  justify-self: center;
  align-self: center;
  object-fit: contain;
  object-position: center;
  background: transparent;
  filter: none !important;
}

.project-card:hover .project-visual > img:first-child {
  transform: none !important;
  filter: none !important;
}

@media (max-width: 760px) {
  .hero.shell,
  .section.shell.panel:not(.achievements-section),
  .achievements-section > .compact-panel,
  .project-architecture,
  .footer.shell {
    border-radius: 10px;
  }
}

/* Rounded controls aligned with the current frame system. */
:root {
  --button-radius: 8px;
  --button-border: rgba(98, 246, 189, .42);
  --button-background: rgba(7, 22, 30, .78);
}

.outline-btn,
.primary-btn {
  border: 1px solid var(--button-border);
  border-radius: var(--button-radius);
  clip-path: none;
  background: var(--button-background);
  box-shadow: inset 0 1px 0 rgba(177, 255, 234, .045), 0 8px 20px rgba(0, 0, 0, .22);
}

.outline-btn:hover,
.primary-btn:hover {
  border-color: var(--green);
  box-shadow: inset 0 1px 0 rgba(177, 255, 234, .06), 0 10px 24px rgba(0, 0, 0, .3);
}

.primary-btn {
  border-color: var(--green);
  background: linear-gradient(105deg, var(--green), var(--mint));
  box-shadow: 0 8px 20px rgba(89, 255, 106, .14);
}

.primary-btn:hover {
  background: linear-gradient(105deg, var(--green), var(--mint));
  box-shadow: 0 10px 24px rgba(89, 255, 106, .2);
}

.nav-toggle {
  border-radius: var(--button-radius);
  clip-path: none;
  box-shadow: inset 0 1px 0 rgba(177, 255, 234, .045), 0 8px 18px rgba(0, 0, 0, .24);
}

nav {
  border-radius: 10px;
  clip-path: none;
}

.social-row a {
  border-radius: var(--button-radius);
  background: rgba(7, 22, 30, .52);
}

.contact-item b {
  border-radius: 6px;
}

/* Expanded experience history: readable cards on desktop, one-column timeline on mobile. */
.experience-section .timeline-detailed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 8px 0 0;
}

.experience-section .timeline-detailed::before {
  display: none;
}

.experience-section .timeline-detailed article {
  min-height: 0;
  padding: 15px 16px 16px;
  border: 1px solid var(--inner-frame-border);
  border-radius: var(--inner-frame-radius);
  background: rgba(3, 18, 24, .54);
  text-align: left;
}

.experience-section .timeline-detailed article::before {
  top: 16px;
  right: 16px;
  left: auto;
  width: 8px;
  height: 8px;
  border-width: 1px;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(89, 255, 106, .4);
  transform: none;
}

.experience-section .timeline-detailed article i {
  display: none;
}

.experience-section .timeline-year {
  display: block;
  padding-right: 18px;
  color: #f2fff9;
  font: 700 .68rem/1.2 var(--mono);
  letter-spacing: .08em;
}

.experience-section .timeline-detailed article h3 {
  min-height: 0;
  margin: 10px 0 6px;
  padding-right: 18px;
  font-size: .78rem;
  line-height: 1.35;
}

.experience-section .timeline-detailed article p {
  margin: 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .experience-section .timeline-detailed {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 8px;
  }

  .experience-section .timeline-detailed article {
    padding: 13px 14px 14px;
  }

  .experience-section .timeline-detailed article::before {
    top: 14px;
    right: 14px;
  }

  .experience-section .timeline-detailed article h3 {
    margin-top: 8px;
    font-size: .72rem;
  }

  .experience-section .timeline-detailed article p {
    font-size: .64rem;
  }
}

/* Achievement artwork cards: use the supplied PNGs as centered visual anchors. */
.achievements-section .achievement-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.achievements-section .achievement-list li {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 10px;
  border: 1px solid var(--inner-frame-border);
  border-radius: var(--inner-frame-radius);
  background: rgba(3, 18, 24, .54);
  text-align: center;
}

.achievements-section .achievement-icon {
  flex: 0 0 auto;
  width: 100%;
  height: 108px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(98, 246, 189, .12);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(4, 18, 26, .92), rgba(2, 12, 18, .72));
}

.achievements-section .achievement-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  filter: none;
}

.achievements-section .achievement-list li > span:last-child {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  padding: 10px 4px 2px;
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .achievements-section .achievement-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .achievements-section .achievement-list li {
    padding: 7px;
  }

  .achievements-section .achievement-icon {
    height: 82px;
  }

  .achievements-section .achievement-list li > span:last-child {
    padding: 8px 2px 1px;
    font-size: .54rem;
  }
}

@media (max-width: 480px) {
  .achievements-section .achievement-list {
    grid-template-columns: 1fr;
  }

  .achievements-section .achievement-icon {
    height: 122px;
  }
}

/* Flagship consolidation: factual metrics, rich local artwork and stable card tracks. */
.achievements-section {
  align-items: start;
}

.achievements-section > .panel {
  align-self: start;
  min-height: 0;
}

.metric-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.metric-strip div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.metric-strip strong {
  order: 0;
  margin-top: 0;
  color: var(--green);
  font-size: clamp(.78rem, 1.15vw, 1.04rem);
  line-height: 1.1;
  white-space: nowrap;
}

.metric-strip span {
  color: var(--muted);
  font-size: clamp(.46rem, .62vw, .6rem);
  line-height: 1.28;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.capability-grid {
  grid-auto-rows: 1fr;
}

.capability {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.capability h3 {
  min-height: 2.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.capability p {
  min-height: 2.7em;
}

.project-grid {
  grid-auto-rows: 1fr;
}

.project-card .project-visual {
  aspect-ratio: 16 / 10;
}

.project-card__picture {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.project-card .project-card__artwork {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  padding: 0;
}

@media screen and (min-width: 761px) {
  .project-card__picture {
    padding: 8px 12px;
  }

  .project-card .project-card__artwork {
    opacity: 1;
  }
}

.project-card h3,
.project-card p {
  min-width: 0;
}

.experience-section .timeline-detailed {
  grid-auto-rows: 1fr;
}

.achievements-section .achievement-icon {
  position: relative;
  display: flex;
  height: auto;
  min-height: 0;
  aspect-ratio: 1408 / 768;
  align-items: center;
  justify-content: center;
}

.achievements-section .achievement-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.achievement-picture {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.achievement-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.achievements-section .achievement-list li > span:last-child {
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.achievements-section .achievement-list li > span:last-child strong {
  color: #f2fff9;
  font: 700 .68rem/1.25 var(--mono);
}

.contact-panel {
  grid-template-columns: minmax(280px, 1.5fr) repeat(5, minmax(120px, .6fr));
}

@media screen and (min-width: 821px) {
  .experience-section .timeline-detailed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 761px) and (max-width: 1199px) {
  .capability-grid,
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .contact-copy {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 760px) {
  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-strip div {
    min-height: 54px;
    padding: 7px 8px;
  }

  .metric-strip div:nth-child(even) {
    border-right: 0;
  }

  .metric-strip div:nth-child(n + 3) {
    border-bottom: 0;
  }

  .project-card .project-visual {
    aspect-ratio: 16 / 10;
  }

  .achievements-section .achievement-icon {
    height: 104px;
  }

  .achievements-section .achievement-list li > span:last-child strong {
    font-size: .62rem;
  }

  .contact-panel {
    grid-template-columns: 1fr;
  }

  .contact-copy {
    grid-column: auto;
  }
}

/* Desktop readability pass; mobile typography remains governed by existing rules. */
@media screen and (min-width: 1024px) {
  nav a { font-size: 13px; }
  .hero-role { font-size: 18px; }
  .hero-text { font-size: 16px; }
  .capability h3 { font-size: 13px; }
  .capability p { font-size: 15px; }
  .project-card .project-content h3 { font-size: 17px; }
  .project-card .project-content p { font-size: 16px; }
  .project-card .tags span { font-size: 12px; }
  .architecture-copy p { font-size: 15px; }
  .architecture-copy ul { font-size: 14px; }
  .experience-section .timeline-year { font-size: 11px; }
  .experience-section .timeline-detailed article h3 { font-size: 16px; }
  .experience-section .timeline-detailed article p { font-size: 15px; }
  .achievements-section .achievement-list li > span:last-child {
    padding: 12px 8px 4px;
    gap: 7px;
    font-size: 15px;
    line-height: 1.45;
  }
  .achievements-section .achievement-list li > span:last-child strong { font-size: 15px; }
  .tech-cloud span { font-size: 12px; }
  .contact-title p { font-size: 14px; }
  .contact-item { font-size: 14px; }
  .footer-copy { font-size: 13px; }
  .footer-copy small { font-size: 13px; }
}

@media screen and (max-width: 480px) {
  .achievements-section .achievement-icon {
    height: 118px;
  }
}

/* Final approved polish: align desktop utility rows while preserving mobile flow. */
.achievements-section .achievement-copy {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px 2px;
  color: var(--muted);
  font-size: .62rem;
  line-height: 1.45;
}

.achievements-section .achievement-copy strong {
  color: #f2fff9;
  font: 700 .68rem/1.25 var(--mono);
  text-align: center;
}

.achievements-section .achievement-copy > span {
  display: block;
}

@media screen and (min-width: 1024px) {
  .achievements-section .achievement-copy {
    min-height: 7.2rem;
    padding: 12px 8px 4px;
    font-size: 15px;
  }

  .achievements-section .achievement-copy strong {
    min-height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
  }

  .achievements-section .achievement-copy > span {
    max-width: 30ch;
  }
}

@media screen and (min-width: 1200px) {
  .contact-panel {
    align-items: stretch;
  }

  .contact-copy,
  .contact-panel > .contact-item {
    min-height: 84px;
  }

  .contact-panel > .contact-item {
    height: 100%;
    align-items: center;
  }

  .contact-panel > .contact-item > span {
    min-width: 0;
    line-height: 1.45;
  }

  .footer {
    grid-template-columns: minmax(240px, 1.35fr) minmax(180px, .9fr) minmax(160px, .7fr) minmax(300px, 1.2fr);
    align-items: start;
    gap: clamp(24px, 3vw, 48px);
    padding-top: 30px;
    padding-bottom: 32px;
  }

  .footer-brand,
  .footer-links,
  .footer-connect,
  .footer-copy {
    align-self: start;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-links > div {
    gap: 8px 22px;
  }

  .footer-copy,
  .footer-copy small {
    line-height: 1.45;
  }
}

/* Interactive CV bridge */
.interactive-cv-section {
  overflow: hidden;
}

.interactive-cv-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 10px 24px;
}

.interactive-cv-intro > div {
  max-width: 720px;
}

.interactive-cv-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font: 700 .62rem/1 var(--mono);
  letter-spacing: .18em;
}

.interactive-cv-intro h3 {
  margin: 0 0 9px;
  color: #f2fff9;
  font: 800 clamp(1.1rem, 2vw, 1.7rem)/1.2 var(--mono);
}

.interactive-cv-intro p:not(.interactive-cv-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.6;
}

.interactive-cv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.cv-preview-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(91, 235, 205, .25);
  border-radius: 10px;
  background: rgba(4, 16, 22, .82);
  color: inherit;
  text-decoration: none;
  transition:
    transform .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.cv-preview-card:hover {
  border-color: rgba(91, 235, 205, .75);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, .3),
    0 0 22px rgba(32, 230, 173, .09);
  transform: translateY(-2px);
}

.cv-preview-card img {
  display: block;
  width: 100%;
  height: 340px;
  object-fit: contain;
  background: #071018;
}

.cv-preview-card > span {
  display: grid;
  gap: 5px;
  padding: 13px 14px 15px;
}

.cv-preview-card strong {
  color: #f2fff9;
  font: 700 .72rem/1.2 var(--mono);
  letter-spacing: .08em;
}

.cv-preview-card small {
  color: var(--muted);
  font-size: .7rem;
}

@media screen and (max-width: 760px) {
  .interactive-cv-intro {
    align-items: flex-start;
    flex-direction: column;
    padding-inline: 4px;
  }

  .interactive-cv-grid {
    grid-template-columns: 1fr;
  }

  .cv-preview-card img {
    height: auto;
    aspect-ratio: 2479 / 3508;
  }
}

/* PORTFOLIO-10: exact owner-approved technology order and local icon grid. */
.tech-stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.tech-stack-grid .tech-item {
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(98, 246, 189, .24);
  border-radius: 6px;
  color: #c8e2db;
  background: rgba(8, 27, 34, .76);
  font: 700 .59rem/1.2 var(--mono);
  overflow-wrap: anywhere;
  transition: color .2s ease, border-color .2s ease, transform .2s ease, background .2s ease;
}

.tech-stack-grid .tech-item:hover {
  border-color: var(--green);
  color: #f2fff9;
  background: rgba(11, 43, 48, .88);
  transform: translateY(-2px);
}

.tech-stack-grid .tech-item img {
  display: block !important;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

@media screen and (max-width: 760px) {
  .tech-stack-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .tech-stack-grid .tech-item { min-height: 44px; padding: 6px 7px; font-size: .55rem; }
  .tech-stack-grid .tech-item img { flex-basis: 18px; width: 18px; height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .tech-stack-grid .tech-item { transition: none; }
}
