:root{
  --bg: #F6F7F5;
  --surface: #FFFFFF;
  --ink: #12181B;
  --ink-soft: #4A5559;
  --ink-faint: #7A8A88;
  --line: #DDE3E1;
  --signal: #0E6E76;
  --signal-dark: #0A4F55;
  --signal-tint: #E8F2F1;
  --copper: #B5652D;
  --copper-tint: #F7EAE0;
  --dot-ai: #4A5FA0;
  --dot-net: #74793B;
  --dark: #12181B;
  --dark-surface: #1B2327;
  --dark-text: #F3F5F3;
  --dark-soft: #A6B6B4;
  --dark-line: #2C3538;
  --radius: 8px;
  --maxw: 1120px;
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img,svg{ display:block; max-width:100%; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3{ font-family: var(--font-display); margin:0; color: var(--ink); font-weight:700; letter-spacing:-0.01em; }
p{ margin:0; }
button{ font-family: inherit; }

:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

.skip-link{
  position:absolute; left:-9999px; top:0;
  background: var(--signal); color:#fff; padding:12px 18px;
  z-index: 200; border-radius: 0 0 6px 0;
}
.skip-link:focus{ left:0; }

/* ---------- Section rhythm ---------- */
section{ padding: 96px 0; }
.section-head{ max-width: 620px; margin-bottom: 48px; }
.section-head h2{ font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.35rem); }
.section-head p{ color: var(--ink-soft); margin-top:14px; font-size:1.05rem; max-width: 56ch; }
.eyebrow{
  display:inline-block;
  font-size: 0.85rem;
  color: var(--signal);
  font-weight: 600;
  margin-bottom: 10px;
}

/* ---------- Header / Nav ---------- */
.site-header{
  position: sticky; top:0; z-index:100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled{
  border-bottom-color: var(--line);
  box-shadow: 0 4px 16px rgba(18,24,27,0.04);
}
.nav-row{
  display:flex; align-items:center; justify-content:space-between;
  height: 76px;
}
.brand{
  font-family: var(--font-display); font-weight:700; font-size:1.1rem;
  display:flex; align-items:center; gap:10px;
}
.brand-mark{
  width:34px; height:34px; border-radius:50%;
  background: var(--ink); color: var(--bg);
  display:flex; align-items:center; justify-content:center;
  font-size:0.85rem; font-weight:700;
}
.nav-links{
  display:flex; align-items:center; gap:34px;
}
.nav-link{
  font-size:0.97rem; color: var(--ink-soft);
  position:relative; padding: 4px 0;
  transition: color .2s ease;
}
.nav-link:hover, .nav-link.is-active{ color: var(--ink); }
.nav-link.is-active::after{
  content:""; position:absolute; left:0; right:0; bottom:-4px; height:2px;
  background: var(--signal); border-radius:2px;
}
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 22px; border-radius: 100px;
  font-size:0.95rem; font-weight:600; cursor:pointer;
  border: 1px solid transparent; transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{ background: var(--signal); color:#fff; }
.btn-primary:hover{ background: var(--signal-dark); }
.btn-ghost{ background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover{ border-color: var(--ink); }
.btn-on-dark{ background: var(--dark-text); color: var(--dark); }
.btn-on-dark:hover{ background:#fff; }
.btn-ghost-on-dark{ background:transparent; color: var(--dark-text); border-color: var(--dark-line); }
.btn-ghost-on-dark:hover{ border-color: var(--dark-text); }

.nav-toggle{
  display:none; background:none; border:none; cursor:pointer;
  width:40px; height:40px; align-items:center; justify-content:center;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after{
  content:""; display:block; width:20px; height:2px; background: var(--ink);
  position:relative; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle::before{ position:absolute; transform: translateY(-6px); }
.nav-toggle::after{ position:absolute; transform: translateY(6px); }
.nav-toggle.is-open span{ opacity:0; }
.nav-toggle.is-open::before{ transform: rotate(45deg); }
.nav-toggle.is-open::after{ transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero{
  background: var(--dark); color: var(--dark-text);
  padding: 76px 0 90px;
  overflow:hidden;
}
.hero .wrap{
  display:grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 48px; align-items:center;
}
.hero-eyebrow{
  color: var(--dark-soft); font-size:0.95rem; margin-bottom:18px;
}
.hero h1{
  color: var(--dark-text);
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.1rem);
  line-height:1.04;
}
.hero-role{
  font-family: var(--font-display); font-weight:600; color: var(--signal);
  font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem);
  margin-top:14px;
}
.hero-desc{
  color: var(--dark-soft); font-size:1.08rem; max-width:52ch;
  margin-top:20px;
}
.hero-cta{ display:flex; gap:16px; margin-top:34px; flex-wrap:wrap; }
.hero-facts{
  display:flex; gap:28px; margin-top:44px; flex-wrap:wrap;
}
.hero-fact{ display:flex; align-items:center; gap:10px; color: var(--dark-soft); font-size:0.92rem; }
.hero-fact svg{ width:17px; height:17px; flex-shrink:0; }
.hero-art{ position:relative; }
.hero-art svg{ width:100%; height:auto; }

.node{ fill: var(--dark-surface); stroke: var(--signal); stroke-width:1.6; opacity:0; animation: nodeIn .5s ease forwards; }
.node.core{ fill: var(--signal); }
.edge{ stroke: var(--dark-line); stroke-width:1.4; fill:none; animation: draw 1s ease forwards; }
@keyframes draw{ to{ stroke-dashoffset:0; } }
@keyframes nodeIn{ to{ opacity:1; } }

/* ---------- About ---------- */
.about-grid{
  display:grid; grid-template-columns: 1.3fr 1fr; gap:64px; align-items:start;
}
.about-grid p{ color: var(--ink-soft); font-size:1.08rem; max-width:60ch; }
.about-grid p + p{ margin-top:16px; }
.about-side{ display:flex; flex-direction:column; gap:28px; }
.about-photo{ width:100%; max-width:220px; }
.profile-image{
  display:block; width:100%; aspect-ratio: 4 / 5;
  object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.fact-list{ border-top:1px solid var(--line); }
.fact-row{
  display:flex; justify-content:space-between; gap:20px;
  padding:16px 0; border-bottom:1px solid var(--line);
  font-size:0.96rem;
}
.fact-row dt{ color: var(--ink-faint); }
.fact-row dd{ margin:0; text-align:right; font-weight:500; max-width:60%; }

/* ---------- Featured project ---------- */
.featured{ background: var(--signal-tint); }
.featured-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap:56px; align-items:start;
}
.featured-meta{ color: var(--ink-soft); font-size:0.98rem; margin-top:8px; }
.featured-block{ margin-top:26px; }
.featured-block h3{ font-size:1rem; font-weight:600; color: var(--signal-dark); margin-bottom:6px; }
.featured-block p{ color: var(--ink-soft); font-size:1rem; }
.tag-row{ display:flex; flex-wrap:wrap; gap:9px; margin-top:28px; }
.tag{
  font-size:0.85rem; padding:6px 13px; border-radius:100px;
  border:1px solid var(--line); color: var(--ink-soft); background: var(--surface);
}
.featured-media{ position:sticky; top:100px; display:flex; flex-direction:column; gap:24px; }
.project-photo{
  border:1px solid var(--line); border-radius: var(--radius); overflow:hidden;
}
.project-image{
  display:block; width:100%; aspect-ratio: 16 / 9;
  object-fit: cover;
}
.diagram-card{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  padding:28px;
}
.diagram-card svg{ width:100%; height:auto; }
.diagram-caption{ font-size:0.88rem; color: var(--ink-faint); margin-top:14px; }

/* Shown in place of profile-image / project-image until the real file is added. */
.image-placeholder{
  display:flex; align-items:center; justify-content:center; text-align:center;
  background: var(--surface); border: 1.5px dashed var(--line); color: var(--ink-faint);
  font-size:0.82rem; line-height:1.5; padding:16px;
}

/* ---------- Projects ---------- */
.project-grid{
  display:grid; grid-template-columns: repeat(2, 1fr); gap:24px;
}
.project-card{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  padding:28px; display:flex; flex-direction:column; gap:14px;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.project-card:hover{ border-color:#C7D0CE; box-shadow: 0 10px 28px rgba(18,24,27,0.06); }
.project-category{ display:flex; align-items:center; gap:8px; font-size:0.85rem; color: var(--ink-soft); }
.cat-dot{ width:9px; height:9px; border-radius:50%; flex-shrink:0; }
/* Category-dot colour utilities — keeps colour choices in CSS instead of inline styles in markup/data */
.cat-dot-frontend{ background: var(--signal); }
.cat-dot-network{ background: var(--dot-net); }
.cat-dot-automation{ background: var(--copper); }
.cat-dot-ai{ background: var(--dot-ai); }
.project-card h3{ font-size:1.2rem; }
.project-card p{ color: var(--ink-soft); font-size:0.98rem; }
.project-links{ display:flex; gap:18px; margin-top:auto; padding-top:6px; }
.project-links a{ font-size:0.92rem; font-weight:600; color: var(--signal); display:flex; align-items:center; gap:6px; }
.project-links a:hover{ color: var(--signal-dark); }
.project-links svg{ width:15px; height:15px; }

/* ---------- Experience (timeline) ---------- */
.timeline{ position:relative; padding-left:32px; border-left:2px solid var(--line); }
.timeline-item{ position:relative; padding-bottom:44px; }
.timeline-item:last-child{ padding-bottom:0; }
.timeline-item::before{
  content:""; position:absolute; left:-38px; top:4px;
  width:12px; height:12px; border-radius:50%;
  background: var(--bg); border:2.5px solid var(--signal);
}
.timeline-head{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:baseline; }
.timeline-head h3{ font-size:1.15rem; }
.timeline-org{ color: var(--ink-soft); font-size:0.98rem; margin-top:2px; }
.timeline-date{ color: var(--ink-faint); font-size:0.9rem; white-space:nowrap; }
.timeline-item p{ color: var(--ink-soft); margin-top:12px; font-size:0.98rem; max-width:64ch; }

/* ---------- Skills ---------- */
.skills-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:40px 56px; }
.skill-group h3{ font-size:1rem; font-weight:600; color: var(--ink); margin-bottom:6px; }
.skill-group .skill-sub{ font-size:0.88rem; color: var(--ink-faint); margin-bottom:16px; }
.skill-tags{ display:flex; flex-wrap:wrap; gap:9px; }
.skill-tag{ font-size:0.9rem; padding:7px 14px; border:1px solid var(--line); border-radius:100px; color: var(--ink-soft); }

/* ---------- Achievements ---------- */
.achv-list{ border-top:1px solid var(--line); }
.achv-row{
  display:grid; grid-template-columns: 1fr 2fr auto; gap:18px; align-items:baseline;
  padding:22px 0; border-bottom:1px solid var(--line);
}
.achv-row .achv-org{ color: var(--ink-faint); font-size:0.92rem; }
.achv-row h3{ font-size:1.05rem; font-weight:600; }
.achv-row .achv-year{ color: var(--ink-faint); font-size:0.9rem; text-align:right; }

/* ---------- Resume ---------- */
.resume-band{
  background: var(--surface); border:1px solid var(--line); border-radius: 16px;
  padding: 56px; display:flex; justify-content:space-between; align-items:center; gap:32px; flex-wrap:wrap;
}
.resume-band h2{ font-size:1.7rem; }
.resume-band p{ color: var(--ink-soft); margin-top:10px; max-width:44ch; }

/* ---------- Footer / contact ---------- */
.site-footer{ background: var(--dark); color: var(--dark-text); padding: 84px 0 36px; }
.footer-top{ display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap; }
.footer-top h2{ color: var(--dark-text); font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem); max-width:14ch; }
.footer-top p{ color: var(--dark-soft); margin-top:14px; max-width:42ch; }
.contact-list{ display:flex; flex-direction:column; gap:14px; }
.contact-list a{
  display:flex; align-items:center; gap:12px; font-size:1.05rem; color: var(--dark-text);
  padding:10px 0; border-bottom:1px solid var(--dark-line);
}
.contact-list a svg{ width:18px; height:18px; color: var(--signal); flex-shrink:0; }
.contact-list a:hover{ color: var(--signal); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  margin-top:64px; padding-top:24px; border-top:1px solid var(--dark-line);
  font-size:0.88rem; color: var(--dark-soft);
}
.footer-bottom a{ color: var(--dark-soft); }
.footer-bottom a:hover{ color: var(--dark-text); }

/* ---------- Responsive ---------- */
@media (max-width: 880px){
  .wrap{ padding:0 24px; }
  section{ padding:72px 0; }
  .nav-links{
    position:fixed; top:76px; left:0; right:0; bottom:0;
    background: var(--bg); flex-direction:column; align-items:flex-start;
    padding: 28px 24px; gap:4px; transform: translateY(-8px);
    opacity:0; pointer-events:none; transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links.is-open{ opacity:1; pointer-events:auto; transform: translateY(0); }
  .nav-link{ width:100%; padding:14px 0; border-bottom:1px solid var(--line); font-size:1.05rem; }
  .nav-links .btn{ margin-top:14px; width:100%; }
  .nav-toggle{ display:flex; }
  .hero .wrap{ grid-template-columns:1fr; }
  .hero-art{ order:-1; max-width:280px; margin:0 auto 8px; }
  .about-grid{ grid-template-columns:1fr; gap:40px; }
  .featured-grid{ grid-template-columns:1fr; }
  .featured-media{ position:static; }
  .project-grid{ grid-template-columns:1fr; }
  .skills-grid{ grid-template-columns:1fr; gap:32px; }
  .achv-row{ grid-template-columns:1fr; gap:4px; }
  .achv-row .achv-year{ text-align:left; }
  .resume-band{ padding:36px; flex-direction:column; align-items:flex-start; }
  .footer-top{ flex-direction:column; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  .node, .edge{ animation:none !important; opacity:1 !important; stroke-dashoffset:0 !important; }
  *{ transition:none !important; }
}
