:root {
  --ink: #101923;
  --muted: #5e6875;
  --soft: #eef3f7;
  --paper: #f5f1e8;
  --card: #ffffff;
  --line: #c8c0b0;
  --ruled: rgba(90, 130, 195, 0.22);
  --margin: rgba(210, 55, 55, 0.42);
  --rule-gap: 34px;
  --blue: #1f6feb;
  --teal: #00897b;
  --green: #2f9b68;
  --copper: #b46a35;
  --plum: #5a46b8;
  --shadow: 0 20px 60px rgba(20, 39, 61, 0.12);
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (min-width: 1024px) {
  html {
    zoom: 0.8;
  }
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    /* 1. margin line — on top, runs full page */
    linear-gradient(90deg, transparent 74px, var(--margin) 74px, var(--margin) 76px, transparent 76px),
    /* 2. solid paper mask — hides ruled lines inside the title gap (0–306px) */
    linear-gradient(to bottom, var(--paper) calc(var(--rule-gap) * 7), transparent calc(var(--rule-gap) * 7)),
    /* 3. ruled lines — tiling from y=0, visible only below the mask */
    linear-gradient(var(--ruled) 1px, transparent 1px);
  background-size: 100% var(--rule-gap), 100% 100%, 100% var(--rule-gap);
  line-height: 1.5;
}

body.nav-open {
  overflow: hidden;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.site-header {
  display: none;
}

.nav-shell {
  width: min(var(--max), calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0;
  white-space: nowrap;
}

.brand-symbol {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: var(--ink);
  color: white;
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  border-radius: 6px;
  padding: 9px 12px;
  color: #293545;
  font-size: 0.94rem;
  font-weight: 650;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(31, 111, 235, 0.08);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--ink);
}

.nav-toggle-line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero-section {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--rule-gap) * 3) 16px 0;
  text-align: center;
}

.hero-intro {
  max-width: 720px;
  width: 100%;
  /* nudge top padding to a rule-line boundary so the name sits on a line */
  padding-top: calc(var(--rule-gap) * 1);
}

.hero-name {
  margin: 0 0 6px;
  font-family: 'Caveat', cursive;
  font-size: clamp(3.8rem, 10vw, 6.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #1a1510;
}

.hero-subtitle {
  margin: 0 0 var(--rule-gap);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.hero-bio--bold {
  font-weight: 700;
  color: #3a3028;
}

.hero-bio {
  max-width: 860px;
  margin: 0 auto var(--rule-gap);
  font-family: 'Patrick Hand', cursive;
  font-weight: 400;
  color: #5a5048;
  font-size: clamp(1.15rem, 1.7vw, 1.32rem);
  line-height: var(--rule-gap); /* lock each text line to one rule slot */
  text-align: left;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--rule-gap);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(16, 25, 35, 0.14);
  background: rgba(255, 255, 255, 0.5);
  color: var(--ink);
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.social-link:hover,
.social-link:focus-visible {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(16, 25, 35, 0.28);
  transform: translateY(-2px);
  outline: none;
}

.social-link.is-copied {
  background: rgba(47, 155, 104, 0.12);
  border-color: rgba(47, 155, 104, 0.5);
  color: var(--green);
  transform: none;
}

/* toggle email/check icons */
[data-copy-email] .icon-check { display: none; }
[data-copy-email].is-copied .icon-email { display: none; }
[data-copy-email].is-copied .icon-check { display: block; }

.copy-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #f5f1e8;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: 'Patrick Hand', cursive;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
  white-space: nowrap;
  z-index: 100;
}

.copy-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.skills-section {
  padding: 0 0 0;
  margin-top: -22px;
}

.skills-heading {
  max-width: none;
  margin: 0 0 36px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.scroll-hint {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
}

.work-section {
  padding: 0 0 32px;
}

.current-section {
  padding: calc(var(--rule-gap) * 1) 0 120px;
}

.cv-section {
  padding: calc(var(--rule-gap) * 0.5) 0;
  text-align: center;
}

.cv-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  margin: 0 auto;
  transition: background 180ms ease, color 180ms ease, transform 160ms ease;
}

.cv-button::before {
  content: "↓";
  font-size: 1.1rem;
}

.cv-button:hover {
  background: transparent;
  color: var(--ink);
  transform: translateY(-2px);
}

.education-section {
  padding: calc(var(--rule-gap) * 2) 0 calc(var(--rule-gap) * 1);
}

.education-section .work-heading {
  margin-bottom: 16px;
  padding-top: 8px;
}

.education-section .section-inner {
  max-width: 860px;
}

.edu-card {
  display: flex;
  align-items: center;
  gap: calc(var(--rule-gap) * 1);
  padding: calc(var(--rule-gap) * 0.5 + 8px) 0;
  padding-left: 68px;
}

.edu-crest {
  width: 110px;
  height: auto;
  flex-shrink: 0;
}

.edu-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.edu-university {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: var(--rule-gap);
  color: var(--ink);
  margin: 0;
}

.edu-degree {
  font-size: 1.1rem;
  line-height: var(--rule-gap);
  color: #334052;
  margin: 0;
}

.big-button {
  display: block;
  width: 100%;
  padding: calc(var(--rule-gap) * 1.5) 32px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Caveat', cursive;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 160ms ease,
    box-shadow 180ms ease;
}

.big-button:hover,
.big-button:focus-visible {
  background: transparent;
  color: var(--ink);
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(16, 25, 35, 0.14);
  outline: none;
}


.work-section .section-inner {
  max-width: 860px;
}

/* ── Contact modal ── */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-modal[hidden] {
  display: none;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 25, 35, 0.55);
  backdrop-filter: blur(3px);
}

.contact-panel {
  position: relative;
  width: 75%;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 16px;
  padding: 48px 52px;
  box-shadow: 0 32px 80px rgba(16, 25, 35, 0.28);
  animation: modal-in 220ms ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.contact-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 6px;
  transition: color 150ms ease, background 150ms ease;
}

.contact-close:hover {
  color: var(--ink);
  background: var(--soft);
}

.contact-title {
  font-family: 'Caveat', cursive;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-row {
  display: flex;
  gap: 20px;
}

.contact-row--half .contact-field {
  flex: 1;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.contact-field--full {
  flex: 1;
}

.contact-field label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-family: 'Patrick Hand', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  resize: vertical;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  outline: none;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: var(--line);
}

.contact-field select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-family: 'Patrick Hand', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235e6875' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  outline: none;
}

.contact-field select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(16, 25, 35, 0.08);
}


.contact-field input:focus,
.contact-field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(16, 25, 35, 0.08);
}

.contact-submit {
  align-self: flex-end;
  padding: 14px 40px;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-family: 'Caveat', cursive;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 160ms ease;
}

.contact-submit:hover,
.contact-submit:focus-visible {
  background: transparent;
  color: var(--ink);
  transform: translateY(-2px);
  outline: none;
}

.work-heading {
  max-width: none;
  text-align: center;
  margin-bottom: 52px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.timeline-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid #b8b0a2;
  background: var(--paper);
}

.graph-stage {
  position: relative;
  width: min(var(--max), calc(100% - 32px));
  height: 624px;
  min-height: 624px;
  margin: 0 auto;
  isolation: isolate;
}

.graph-lines,
.graph-field {
  position: absolute;
  inset: 0;
}

.graph-lines {
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.graph-field {
  z-index: 2;
}

.graph-edge {
  stroke: rgba(52, 65, 83, 0.24);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.graph-edge.is-highlighted {
  stroke: rgba(31, 111, 235, 0.54);
  stroke-width: 1.7;
}

.graph-node--child {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--node-size);
  height: var(--node-size);
  border: 1px solid rgba(16, 25, 35, 0.1);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255,255,255,0.9), rgba(255,255,255,0.7) 42%, rgba(238,244,248,0.75)),
    var(--node-color, var(--soft));
  color: var(--ink);
  transform: translate(-50%, -50%);
  cursor: default;
  user-select: none;
  padding: 10px 14px;
  box-sizing: border-box;
}

.graph-node--child .graph-node-title {
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
}

.graph-edge--child {
  stroke: rgba(16, 25, 35, 0.15);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.graph-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: var(--node-size);
  height: var(--node-size);
  border: 1px solid rgba(16, 25, 35, 0.12);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.78) 42%, rgba(238, 244, 248, 0.82)),
    var(--node-color, var(--soft));
  color: var(--ink);
  cursor: pointer;
  box-shadow:
    0 14px 42px rgba(20, 39, 61, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transform: translate3d(-50%, -50%, 0);
  transition:
    width 220ms ease,
    height 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
  user-select: none;
}

.graph-node:hover,
.graph-node:focus-visible,
.graph-node.is-active {
  width: var(--active-size);
  height: var(--active-size);
  border-color: rgba(31, 111, 235, 0.3);
  outline: none;
  box-shadow:
    0 22px 68px rgba(20, 39, 61, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  z-index: 4;
}

.graph-node.is-center {
  border-color: rgba(16, 25, 35, 0.22);
  background:
    radial-gradient(circle at 32% 24%, #536174, #101923 64%);
  color: white;
  cursor: pointer;
  box-shadow:
    0 14px 34px rgba(16, 25, 35, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.graph-node.is-center:hover,
.graph-node.is-center:focus-visible,
.graph-node.is-center.is-active {
  border-color: rgba(0, 137, 123, 0.38);
  box-shadow:
    0 18px 48px rgba(16, 25, 35, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.graph-node-inner {
  display: grid;
  place-items: center;
  gap: 5px;
  width: 100%;
  height: 100%;
  padding: 14px;
  text-align: center;
}

.graph-node-title {
  color: inherit;
  font-size: var(--node-font, 0.92rem);
  font-weight: 850;
  line-height: 1.06;
}

.graph-node-detail {
  display: none;
  max-width: 190px;
  color: #48576a;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.25;
}

.graph-node:hover .graph-node-detail,
.graph-node:focus-visible .graph-node-detail,
.graph-node.is-active .graph-node-detail {
  display: block;
}

.graph-node.is-center .graph-node-title {
  font-size: 1.24rem;
}

.graph-node.is-center .graph-node-detail {
  display: block;
  color: #d7e0e8;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
dl,
dd {
  margin-top: 0;
}

dd {
  margin-left: 0;
}

h1 {
  max-width: 710px;
  margin-bottom: 22px;
  font-size: clamp(3.3rem, 8vw, 6.7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 7px;
  padding: 12px 18px;
  font-weight: 750;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.button.primary {
  background: var(--ink);
  color: white;
  box-shadow: 0 16px 38px rgba(16, 25, 35, 0.2);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(16, 25, 35, 0.12);
  color: var(--ink);
}

.section {
  padding: 96px 0;
}

.section-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.page-main {
  padding-top: 68px;
}

.page-intro {
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 20%, rgba(0, 137, 123, 0.12), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #eef4f8 100%);
  padding: 76px 0;
}

.page-intro-layout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}

.page-intro h1 {
  max-width: 800px;
  margin-bottom: 18px;
  font-size: clamp(2.7rem, 6vw, 5rem);
  line-height: 0.98;
}

.page-intro p:not(.eyebrow) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.logo-band {
  border-block: 1px solid var(--line);
  background: white;
}

.company-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0;
}

.strip-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.company-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 14px;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  object-fit: cover;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(16, 25, 35, 0.08);
}

.brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.section-heading {
  max-width: 820px;
  margin-bottom: 36px;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading.compact {
  max-width: 760px;
}

.work-types {
  background: var(--paper);
}

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

.capability-card,
.portfolio-card,
.stack-groups article,
.timeline-content {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(20, 39, 61, 0.05);
}

.capability-card {
  display: flex;
  min-height: 360px;
  flex-direction: column;
  padding: 22px;
}

.capability-card p,
.portfolio-card p,
.timeline-content p,
.stack-groups p,
.contact-layout p {
  color: var(--muted);
}

.capability-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  border-radius: 8px;
  background: var(--soft);
}

.capability-icon span {
  width: 23px;
  height: 23px;
  border-radius: 6px;
  background: currentColor;
}

.capability-icon.quantum {
  color: var(--plum);
}

.capability-icon.quantum span {
  border-radius: 50%;
  box-shadow:
    12px 0 0 -5px currentColor,
    -12px 0 0 -5px currentColor,
    0 12px 0 -5px currentColor,
    0 -12px 0 -5px currentColor;
}

.capability-icon.ml {
  color: var(--blue);
}

.capability-icon.ml span {
  clip-path: polygon(0 100%, 0 42%, 30% 42%, 30% 20%, 64% 20%, 64% 0, 100% 0, 100% 100%);
}

.capability-icon.cloud {
  color: var(--teal);
}

.capability-icon.cloud span {
  width: 30px;
  height: 18px;
  border-radius: 10px;
}

.capability-icon.product {
  color: var(--copper);
}

.capability-icon.product span {
  clip-path: polygon(50% 0, 100% 28%, 100% 72%, 50% 100%, 0 72%, 0 28%);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: auto 0 0;
  list-style: none;
}

.tag-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fbfd;
  color: #344153;
  padding: 6px 9px;
  font-size: 0.82rem;
  font-weight: 700;
}

.portfolio-section {
  background: #fbfcfe;
  border-block: 1px solid var(--line);
}

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

.portfolio-card {
  min-height: 275px;
  padding: 24px;
}

.portfolio-card.featured {
  grid-column: span 2;
}

.card-topline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #3d4856;
  font-size: 0.9rem;
  font-weight: 800;
}

.impact-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
}

.impact-list div {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.impact-list dt {
  font-weight: 850;
}

.impact-list dd {
  margin-bottom: 0;
  color: var(--muted);
}

.experience-section {
  background: var(--paper);
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 930px;
  /* reserve enough height so card expansion never grows the section */
  min-height: 620px;
  overflow-anchor: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 24px;
  width: 2px;
  background: var(--line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  position: relative;
}

.timeline-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}

.timeline-content {
  position: relative;
  padding: 20px 24px;
  cursor: default;
  transition: padding 220ms ease, box-shadow 220ms ease;
}

/* collapsed: show role title but hide date span and description */
.timeline-content .role-line span,
.timeline-content p:not(.company-name),
.timeline-content ul {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  margin: 0;
  transition: max-height 300ms ease, opacity 220ms ease, margin 220ms ease;
}

.timeline-content .company-name {
  margin-bottom: 0;
  transition: margin-bottom 220ms ease;
}

/* expanded on hover */
.timeline-content:hover {
  padding: 20px 24px;
  box-shadow: 0 18px 48px rgba(20, 39, 61, 0.1);
}

.timeline-content:hover .company-logo {
  opacity: 0;
  pointer-events: none;
}

.timeline-content:hover .role-line span {
  max-height: 40px;
  opacity: 1;
}

.timeline-content:hover p:not(.company-name),
.timeline-content:hover ul {
  max-height: 800px;
  opacity: 1;
  margin-bottom: 0;
}

.timeline-content ul {
  padding-left: 18px;
  margin-top: 0;
}

.timeline-content ul li {
  margin-bottom: 6px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #334052;
}

.timeline-content:hover .company-name {
  margin-bottom: 6px;
}

.card-header {
  display: block;
}

.company-logo {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  transition: opacity 200ms ease;
}

.company-logo[src*="sky"] {
  width: 46px;
  height: 46px;
}

.role-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
}

.role-line h3 {
  margin-bottom: 0;
}

.role-line span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.company-name {
  margin-bottom: 10px;
  color: #334052;
  font-weight: 800;
}

.stack-section {
  background: #18222e;
  color: white;
}

.stack-section .eyebrow {
  color: #6fe4d7;
}

.stack-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 56px;
  align-items: start;
}

.stack-layout h2 {
  color: white;
}

.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.stack-groups article {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  padding: 20px;
}

.stack-groups p {
  color: #c8d2dc;
}

.contact-section {
  padding: 96px 0;
  background: white;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr minmax(340px, 0.72fr);
  gap: 56px;
  align-items: start;
}

.contact-layout h2 {
  max-width: 760px;
}

.contact-panel {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfd;
  padding: 14px;
  box-shadow: var(--shadow);
}

.contact-panel a,
.copy-button {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 7px;
  background: white;
  padding: 14px;
  color: var(--ink);
  text-align: left;
}

.contact-panel a:hover,
.contact-panel a:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  border-color: rgba(31, 111, 235, 0.24);
  outline: none;
}

.contact-panel span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-panel strong {
  overflow-wrap: anywhere;
}

.copy-button {
  display: inline-flex;
  justify-content: center;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #f9fbfd;
}

.footer-layout {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-layout p {
  margin-bottom: 0;
}

.footer-layout a {
  font-weight: 800;
  color: var(--ink);
}

@media (max-width: 1020px) {
  .capability-grid,
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .capability-card {
    min-height: 310px;
  }

  .stack-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    min-height: 62px;
  }

  .brand {
    font-size: 0.95rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 62px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    padding: 10px;
    box-shadow: var(--shadow);
  }

  body.nav-open .nav-links {
    display: flex;
  }

  .nav-links a {
    padding: 13px 12px;
  }

  .hero-section {
    min-height: 60vh;
    padding: calc(62px + 48px) 16px 40px;
  }

  .hero-bio {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .graph-stage {
    height: 560px;
    min-height: 560px;
  }

  .graph-field,
  .graph-lines {
    height: 560px;
    bottom: auto;
  }

  .graph-node {
    --node-size: min(var(--base-size), 112px) !important;
    --active-size: min(var(--expanded-size), 190px) !important;
  }

  .graph-node.is-center {
    --node-size: 28px !important;
    --active-size: 64px !important;
  }

  .graph-node.is-center .graph-node-title {
    font-size: 1rem;
  }

  .graph-node-title {
    font-size: 0.78rem;
  }

  .graph-node-detail {
    max-width: 150px;
    font-size: 0.68rem;
  }

  .page-main {
    padding-top: 62px;
  }

  .page-intro {
    padding: 54px 0;
  }

  .page-intro-layout {
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
  }

  .page-intro-layout .button {
    width: fit-content;
  }

  h1 {
    font-size: clamp(3rem, 14vw, 4.6rem);
  }

  h2 {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
  }

  .capability-grid,
  .portfolio-grid,
  .stack-groups {
    grid-template-columns: 1fr;
  }

  .portfolio-card.featured {
    grid-column: auto;
  }

  .company-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .company-logos {
    justify-content: flex-start;
  }

  .section,
  .contact-section {
    padding: 70px 0;
  }

  .timeline-item {
    grid-template-columns: 42px 1fr;
    gap: 12px;
  }

  .timeline::before {
    left: 20px;
  }

  .role-line {
    display: grid;
    gap: 4px;
  }

  .role-line span {
    white-space: normal;
  }

  .contact-panel {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .page-intro-layout .button {
    width: 100%;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
  }

  .capability-card,
  .portfolio-card,
  .timeline-content {
    padding: 18px;
  }
}

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