:root {
  --bg: #0a0f1c;
  --surface: #101a2e;
  --surface-2: #142140;
  --line: #24345a;
  --line-soft: #1a2745;
  --text: #e8ecf4;
  --text-muted: #8996ad;
  --text-dim: #56637e;
  --amber: #e8a33d;
  --teal: #4bb8ae;
  --red: #d9736a;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

a {
  color: inherit;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 20px;
  }
}

/* ---------- Top nav ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(10, 15, 28, 0.75);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.topbar .id {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.topbar .id b {
  color: var(--amber);
  font-weight: 600;
}
.topbar nav {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.topbar nav a {
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.topbar nav a:hover {
  color: var(--amber);
}
@media (max-width: 640px) {
  .topbar nav {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 88px 0 64px;
  position: relative;
}
.hero-top {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: flex-start;
}
@media (max-width: 780px) {
  .hero-top {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    order: -1;
    width: 220px;
    margin-bottom: 8px;
  }
}
.hero-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.hero-photo .corner-tl,
.hero-photo .corner-br {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--amber);
  border-style: solid;
  z-index: 2;
}
.hero-photo .corner-tl {
  top: -11px;
  right: -11px;
  border-width: 2px 2px 0 0;
}
.hero-photo .corner-br {
  bottom: -11px;
  left: -11px;
  border-width: 0 0 2px 2px;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  filter: grayscale(15%) contrast(1.05);
  display: block;
  border: 1px solid var(--line-soft);
}
.hero-photo .live-badge {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.hero-photo .live-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  animation: ping 2.4s infinite;
}
.geotag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--teal);
  letter-spacing: 0.12em;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.geotag .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(75, 184, 174, 0.6);
  animation: ping 2.4s infinite;
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(75, 184, 174, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(75, 184, 174, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(75, 184, 174, 0);
  }
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(42px, 7.5vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero h1 span {
  color: var(--amber);
}

.hero .role {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 2.4vw, 22px);
  color: var(--text);
}
.hero .tags {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 0;
}
.hero .tags span:not(:last-child)::after {
  content: "·";
  margin: 0 10px;
  color: var(--line);
}

.hero .lede {
  margin-top: 30px;
  max-width: 620px;
  color: var(--text-muted);
  font-size: 16px;
}

.hero .cta-row {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 12px 20px;
  border-radius: 3px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: 1px solid var(--line);
}
.btn-primary {
  background: var(--amber);
  color: #14100a;
  border-color: var(--amber);
  font-weight: 600;
}
.btn-primary:hover {
  background: #f2b455;
}
.btn-ghost {
  color: var(--text);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber);
}

/* ---------- Console widget (signature element) ---------- */
.console {
  margin-top: 64px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, var(--surface), var(--bg));
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.console-head .status {
  color: var(--teal);
  display: flex;
  align-items: center;
  gap: 7px;
}
.console-head .status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.console-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
}
@media (max-width: 780px) {
  .console-body {
    grid-template-columns: 1fr;
  }
}
.console-graph {
  padding: 22px;
  border-right: 1px solid var(--line-soft);
  min-height: 260px;
}
@media (max-width: 780px) {
  .console-graph {
    border-right: none;
    border-bottom: 1px solid var(--line-soft);
  }
}
.console-graph svg {
  width: 100%;
  height: auto;
  display: block;
}

.node-pulse {
  animation: nodepulse 2.6s ease-in-out infinite;
  transform-origin: center;
}
.node-pulse.d1 {
  animation-delay: 0.2s;
}
.node-pulse.d2 {
  animation-delay: 0.6s;
}
.node-pulse.d3 {
  animation-delay: 1s;
}
.node-pulse.d4 {
  animation-delay: 1.4s;
}
.node-pulse.d5 {
  animation-delay: 1.8s;
}
@keyframes nodepulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}
.link-line {
  stroke-dasharray: 4 5;
  animation: dashflow 3.5s linear infinite;
}
@keyframes dashflow {
  to {
    stroke-dashoffset: -90;
  }
}

.console-log {
  padding: 18px 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
}
.console-log .line {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.console-log .line:last-child {
  border-bottom: none;
}
.console-log .tstamp {
  color: var(--text-dim);
  flex-shrink: 0;
}
.console-log .ok {
  color: var(--teal);
}
.console-log .warn {
  color: var(--amber);
}

/* ---------- Section shell ---------- */
section {
  padding: 92px 0;
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--amber);
}
.sec-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px);
  margin-bottom: 30px;
  max-width: 640px;
}

/* ---------- Summary ---------- */
.summary p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 760px;
}
.summary p + p {
  margin-top: 18px;
}
.summary strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Experience timeline ---------- */
.timeline {
  position: relative;
  padding-left: 34px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: repeating-linear-gradient(
    180deg,
    var(--line) 0 6px,
    transparent 6px 11px
  );
}
.role-block {
  position: relative;
  margin-bottom: 46px;
}
.role-block:last-child {
  margin-bottom: 0;
}
.role-block::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--amber);
}
.role-block.sub::before {
  border-color: var(--teal);
  width: 9px;
  height: 9px;
  left: -32.5px;
  top: 5px;
}

.role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
}
.role-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
}
.role-org {
  color: var(--amber);
  font-weight: 500;
}
.role-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}
.role-bullets {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 640px;
}
.role-bullets li {
  margin-left: 18px;
  margin-bottom: 6px;
}

.company-group {
  border-left: 1px solid var(--line-soft);
  margin-left: 4px;
  padding-left: 26px;
  margin-top: 18px;
}
.company-group .role-block {
  margin-bottom: 22px;
}
.company-group .role-title {
  font-size: 15.5px;
}

/* ---------- Skills ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 780px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
.skill-card {
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 5px;
  padding: 18px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.skill-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}
.skill-card .tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}
.skill-card h4 {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  margin-top: 8px;
}
.skill-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ---------- Languages / certs row ---------- */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
}
.split-row.single {
  grid-template-columns: 1fr;
}
@media (max-width: 780px) {
  .split-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}
.split-row h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.lang-row {
  margin-bottom: 16px;
}
.lang-row .lname {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.lang-row .lname span:last-child {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.meter {
  height: 5px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: 3px;
}

.cert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line-soft);
  font-size: 14px;
}
.cert-item:last-child {
  border-bottom: none;
}
.cert-item .badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--bg);
  background: var(--amber);
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}

/* ---------- Certifications grid ---------- */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (max-width: 700px) {
  .cert-grid {
    grid-template-columns: 1fr;
  }
}
.cert-card {
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 5px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s ease;
}
.cert-card:hover {
  border-color: var(--amber);
}
.cert-card .cname {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.cert-card .cmeta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.cert-card .cmeta .issuer {
  color: var(--teal);
}
.cert-card .cid {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  word-break: break-all;
}
.cert-card .cview {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--amber);
  text-decoration: none;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.cert-card .cview:hover {
  color: #f2b455;
}

/* ---------- Recommendations ---------- */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 780px) {
  .rec-grid {
    grid-template-columns: 1fr;
  }
}
.rec-card {
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 6px;
  padding: 26px 24px 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.rec-card:hover {
  border-color: var(--amber);
  transform: translateY(-2px);
}
.rec-quote-mark {
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 1;
  color: var(--amber);
  opacity: 0.5;
}
.rec-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: -14px;
}
.rec-attrib {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px dashed var(--line-soft);
  padding-top: 16px;
}
.rec-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  color: var(--teal);
  flex-shrink: 0;
}
.rec-who .rname {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
}
.rec-who .rname a {
  color: inherit;
  text-decoration: none;
}
.rec-who .rname a:hover {
  color: var(--amber);
}
.rec-who .rtitle {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.rec-who .rmeta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-dim);
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* ---------- Education ---------- */
.edu-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.edu-item:first-child {
  padding-top: 0;
}
.edu-item:last-child {
  border-bottom: none;
}
@media (max-width: 600px) {
  .edu-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.edu-item .yr {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
}
.edu-item h4 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}
.edu-item p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

/* ---------- Contact / footer ---------- */
.contact {
  text-align: center;
}
.contact .sec-title {
  margin: 0 auto 16px;
}
.contact p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 34px;
}
.contact-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}
.contact-card {
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 5px;
  padding: 16px 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  transition: border-color 0.2s ease;
}
.contact-card:hover {
  border-color: var(--amber);
}
.contact-card .k {
  color: var(--text-dim);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.contact-card .v {
  color: var(--amber);
}

footer {
  padding: 40px 0 60px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

/* reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

::selection {
  background: var(--amber);
  color: #14100a;
}
