:root {
  color-scheme: dark;
  --bg: #0b0917;
  --panel: #171229;
  --ink: #f7f3ff;
  --muted: #c6bfd9;
  --accent: #68edff;
  --electric: #00b8ff;
  --violet: #bd00ff;
  --magenta: #d600ff;
  --pink: #ff70ca;
  --laser: #faff62;
  --line: #3d3157;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: clamp(1.125rem, 1.6vw, 1.25rem)/1.6 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.skip { position: absolute; left: 15px; top: 10px; transform: translateY(-180%); padding: 10px; background: var(--bg); z-index: 1; }
.skip:focus { transform: none; }
.header { display: flex; justify-content: space-between; align-items: center; padding-block: 24px; border-bottom: 1px solid var(--line); gap: 18px; }
.brand, nav { display: flex; align-items: center; gap: 12px; }
.brand { font-size: 1.125rem; font-weight: 650; }
nav { flex-wrap: wrap; gap: 8px clamp(12px, 2.1vw, 30px); color: var(--muted); font-size: 1rem; }
nav span, .accent { color: var(--accent); }
.hero { display: grid; grid-template-columns: 1.25fr .8fr; gap: clamp(30px, 7vw, 98px); align-items: center; padding-block: clamp(60px, 9vw, 112px); }
.label { color: var(--accent); font: 600 .875rem/1.5 var(--mono); letter-spacing: .13em; margin: 0 0 20px; }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; vertical-align: 1px; border-radius: 50%; background: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.25rem, 8vw, 7rem); letter-spacing: -.074em; line-height: .94; margin-bottom: 26px; }
.role { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 610; margin-bottom: 10px; }
.lede, .about p:not(.label), .rows p { color: var(--muted); }
.lede { max-width: 42ch; margin-bottom: 27px; }
.actions { display: flex; flex-wrap: wrap; gap: 11px; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 13px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 6px; font-size: 1rem; font-weight: 650; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.primary { background: linear-gradient(110deg, var(--electric), var(--accent)); }
.primary:hover { background: #a4f5ff; color: var(--bg); }
.secondary:hover { border-color: var(--accent); }
.portrait { margin: 0; }
.portrait-frame {
  width: min(100%, 370px);
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 3px solid transparent;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 35% 29%, #263358, #221437 68%, var(--bg)) padding-box,
    linear-gradient(145deg, var(--accent), var(--electric) 36%, var(--violet) 68%, var(--pink)) border-box;
  box-shadow: -8px -4px 24px #00b8ff35, 8px 10px 28px #d600ff38;
}
.portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: inherit;
}
.section { border-top: 1px solid var(--line); padding-block: clamp(44px, 7vw, 82px); }
h2 { font-size: clamp(2.25rem, 5.25vw, 4rem); letter-spacing: -.055em; line-height: 1; margin-bottom: 28px; }
.rows article { display: grid; grid-template-columns: 42px minmax(180px, .8fr) 1.2fr; align-items: baseline; gap: 18px; padding-block: 21px; border-bottom: 1px solid var(--line); }
.rows article:first-child { border-top: 1px solid var(--line); }
.rows h3, .rows p { margin-bottom: 0; }
.rows h3 { font-size: 1.25rem; }
.number { color: var(--accent); font: .9rem var(--mono); }
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 36px; }
.about p:not(.label) { max-width: 58ch; }
.skills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.skill-card {
  --skill-accent: var(--accent);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(14px, 2vw, 23px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(150deg, #24183d, var(--panel) 72%);
}
.skill-card--security { --skill-accent: var(--laser); border-color: #85753e; }
.skill-card--qa, .skill-card--ops { --skill-accent: var(--pink); }
.skill-card--db, .skill-card--lib { --skill-accent: #d6a5ff; }
.skill-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.skill-heading h3 { margin: 0; color: var(--ink); font-size: clamp(1.25rem, 2vw, 1.375rem); line-height: 1.25; }
.skill-icon {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  color: var(--skill-accent);
  background: color-mix(in srgb, var(--skill-accent) 13%, var(--panel));
}
.skill-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.skill-tags li {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.4;
}
@media (hover: hover) and (pointer: fine) {
  .skill-card:hover { border-color: var(--skill-accent); }
  .skill-tags li:hover { color: var(--skill-accent); border-color: var(--skill-accent); }
}
@media (prefers-reduced-motion: no-preference) {
  .skill-card.is-revealed { animation: skill-reveal 460ms ease-out var(--reveal-delay, 0ms) backwards; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .skill-card { transition: transform 190ms ease-out, border-color 190ms ease-out; }
  .skill-card:hover { transform: translateY(-5px); }
  .skill-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 32%, #d600ff29 50%, transparent 68%);
    transform: translateX(-100%);
  }
  .skill-card:hover::before { transform: translateX(100%); transition: transform 540ms ease-out; }
  .skill-tags li { transition: transform 170ms ease-out, color 170ms, border-color 170ms; }
  .skill-tags li:hover { transform: scale(1.05); }
}
@keyframes skill-reveal {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}
@media (max-width: 1000px) {
  .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 530px) {
  .skills { grid-template-columns: 1fr; }
}
.contact { background: var(--panel); border-block: 1px solid var(--line); }
.contact-inner { display: flex; align-items: end; justify-content: space-between; gap: 22px; flex-wrap: wrap; padding-block: 48px; }
.contact h2 { margin: 0; }
footer { display: flex; justify-content: space-between; gap: 16px; padding-block: 24px; font: .875rem/1.4 var(--mono); color: var(--muted); }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 36px); }
  .hero { grid-template-columns: 1fr; }
  .portrait { width: min(100%, 420px); }
  .about { grid-template-columns: 1fr; gap: 0; }
  .rows article { grid-template-columns: 28px 1fr; gap: 5px 10px; }
  .rows p { grid-column: 2; }
}
@media (max-width: 430px) {
  .header { align-items: flex-start; flex-direction: column; }
  .header nav { gap: 8px 14px; }
  h1 { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Keep the network artwork behind the portfolio content. */
body {
  isolation: isolate;
  background:
    radial-gradient(ellipse 64% 40rem at 82% 18rem, color-mix(in srgb, var(--violet) 25%, var(--bg)), transparent 78%),
    radial-gradient(ellipse 70% 36rem at 0% 65%, #101c3f 0%, transparent 80%),
    var(--bg);
}
body::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  inset: 0;
  background:
    url(network.svg) no-repeat right -80px top 28px / min(1040px, 92vw) auto,
    linear-gradient(90deg, #00b8ff20 1px, transparent 1px),
    linear-gradient(#00b8ff20 1px, transparent 1px);
  background-size: min(1040px, 92vw) auto, 42px 42px, 42px 42px;
  mask-image: linear-gradient(#000 0%, #000 35%, #0005 72%, transparent 100%);
}
body::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  top: 88px;
  left: 38%;
  right: 0;
  height: 680px;
  background: linear-gradient(transparent 43%, #00b8ff2e 49%, #68edff88 50%, transparent 51%) no-repeat;
  background-size: 100% 120px;
  background-position: 0 -120px;
  mask-image: linear-gradient(90deg, transparent, #000 42%, transparent);
  animation: network-scan 4s linear infinite;
}
@keyframes network-scan {
  from { background-position: 0 -120px; }
  to { background-position: 0 680px; }
}
@media (max-width: 740px) {
  body::before {
    background-position: right -100px top 108px, 0 0, 0 0;
    background-size: 720px auto, 32px 32px, 32px 32px;
    opacity: .65;
  }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
}

.history { border-left: 1px solid var(--line); padding-left: 20px; }
.history .label { margin-bottom: 9px; }
.history h3 { margin-bottom: 4px; }
.history p:last-child { margin-bottom: 0; }

.career-timeline { list-style: none; margin: 14px 0 0; padding: 0; }
.career-timeline > li { position: relative; padding-left: 22px; }
.career-timeline > li + li { margin-top: 0; }
.career-timeline > li:not(:last-child) { padding-bottom: 24px; }
.career-timeline > li:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: -12px;
  left: 4px;
  border-left: 1px solid var(--line);
}
.career-timeline > li::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}
.career-timeline h3 + p { margin-bottom: 4px; }
.career-timeline .career-dates { color: var(--accent); font: .9375rem/1.6 var(--mono); }
.career-timeline h4 { margin: 0 0 4px; }

.career-award {
  padding: 12px 16px;
  border-left: 2px solid var(--accent);
  border-radius: 0 6px 6px 0;
  background: color-mix(in srgb, var(--electric) 10%, var(--panel));
}
.career-award strong { color: var(--laser); }
