/* ==========================================================================
   Suchitha Mothkuri - DevOps Portfolio
   Core stylesheet: tokens, layout, navigation, hero, sections, footer
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg:            #0a0d12;
  --bg-deep:       #05070a;
  --panel:         #10151c;
  --panel-2:       #141b24;
  --border:        #212a34;
  --border-soft:   #1a222c;

  --text:          #cdd6e0;
  --text-bright:   #e8eef5;
  --text-dim:      #7c8794;
  --text-faint:    #4d5865;

  --cyan:          #5eead4;
  --cyan-dim:      rgba(94, 234, 212, 0.12);
  --cyan-line:     rgba(94, 234, 212, 0.32);
  --amber:         #ffb454;
  --amber-dim:     rgba(255, 180, 84, 0.12);
  --amber-line:    rgba(255, 180, 84, 0.32);
  --violet:        #a78bfa;
  --violet-dim:    rgba(167, 139, 250, 0.12);
  --rose:          #fb7185;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, "Courier New", monospace;

  --radius:    14px;
  --radius-sm: 8px;
  --maxw:      1180px;
  --nav-h:     64px;

  --shadow:    0 18px 50px rgba(0, 0, 0, 0.45);
  --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--cyan); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--amber); }
button { font-family: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; color: var(--text-bright); font-weight: 700; }
p { margin: 0 0 1rem; }

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

::selection { background: var(--cyan); color: var(--bg-deep); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #202a36; border-radius: 6px; border: 2px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: #2c3a4a; }

/* ---------- Canvas background ---------- */
#network-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

.page-wrap { position: relative; z-index: 1; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--cyan);
  color: var(--bg-deep);
  padding: .6rem 1rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.page-wrap > section { padding: 96px 0; position: relative; }
.page-wrap > section:nth-of-type(even) { background: rgba(5, 7, 10, 0.5); }

.section-head { margin-bottom: 48px; }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-line);
  padding: .3rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
  margin-bottom: .6rem;
}

.section-sub {
  color: var(--text-dim);
  max-width: 68ch;
  font-size: 1.02rem;
  margin: 0;
}

.accent-cyan  { color: var(--cyan); }
.accent-amber { color: var(--amber); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(10, 13, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 13, 18, 0.92);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-mono);
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--text-bright); }
.nav-brand .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.6);
  animation: pulse-dot 2.4s infinite;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(94, 234, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}
.nav-brand .brand-prompt { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: .3rem;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--text-dim);
  padding: .45rem .75rem;
  border-radius: var(--radius-sm);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--text-bright); background: rgba(255,255,255,0.04); }
.nav-links a.is-active { color: var(--cyan); background: var(--cyan-dim); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--bg-deep);
  background: var(--cyan);
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-cta:hover {
  color: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(94, 234, 212, 0.28);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px; height: 36px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  position: relative;
  transition: background .2s;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: var(--text);
  transition: transform .25s var(--ease);
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 56px) 0 72px;
  background: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-line);
  padding: .35rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}
.hero-status .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-dot 2s infinite;
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 4rem);
  letter-spacing: -0.035em;
  margin-bottom: .5rem;
}

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  color: var(--amber);
  margin-bottom: 1.3rem;
  min-height: 1.6em;
}
.hero-role .caret {
  display: inline-block;
  width: 9px;
  background: var(--amber);
  margin-left: 2px;
  animation: blink 1s steps(2, start) infinite;
  color: transparent;
}
@keyframes blink { to { visibility: hidden; } }

.hero-lede {
  font-size: 1.06rem;
  color: var(--text-dim);
  max-width: 60ch;
  margin-bottom: 1.8rem;
}
.hero-lede strong { color: var(--text); font-weight: 600; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.4rem;
  font-family: var(--font-mono);
  font-size: .84rem;
  color: var(--text-faint);
  margin-bottom: 2rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta svg { width: 15px; height: 15px; stroke: var(--text-dim); fill: none; stroke-width: 1.7; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 2.4rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .88rem;
  font-weight: 500;
  padding: .72rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--cyan);
  color: var(--bg-deep);
}
.btn-primary:hover {
  color: var(--bg-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(94, 234, 212, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  color: var(--text-bright);
  border-color: var(--cyan-line);
  background: var(--cyan-dim);
  transform: translateY(-2px);
}
.btn-amber {
  background: var(--amber-dim);
  color: var(--amber);
  border-color: var(--amber-line);
}
.btn-amber:hover {
  background: var(--amber);
  color: var(--bg-deep);
  transform: translateY(-2px);
}

/* Hero stat strip */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.hero-stat {
  background: var(--bg);
  padding: 1rem 1.1rem;
}
.hero-stat .num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cyan);
  line-height: 1.1;
}
.hero-stat .lbl {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-top: .2rem;
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-cue::after {
  content: "";
  width: 3px; height: 7px;
  border-radius: 2px;
  background: var(--cyan);
  animation: scroll-bob 1.8s infinite;
}
@keyframes scroll-bob {
  0%   { opacity: 0; transform: translateY(0); }
  35%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Terminal window ---------- */
.terminal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .86rem;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .9rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
}
.terminal-bar .tdot { width: 11px; height: 11px; border-radius: 50%; }
.tdot.red   { background: #ff5f57; }
.tdot.amber { background: #febc2e; }
.tdot.green { background: #28c840; }
.terminal-bar .tname {
  margin-left: .5rem;
  font-size: .76rem;
  color: var(--text-faint);
}

.terminal-body {
  padding: 1rem 1.1rem 1.2rem;
  min-height: 330px;
  max-height: 420px;
  overflow-y: auto;
  line-height: 1.75;
}
.terminal-body .line { white-space: pre-wrap; word-break: break-word; }
.term-prompt  { color: var(--cyan); }
.term-user    { color: var(--violet); }
.term-path    { color: var(--amber); }
.term-cmd     { color: var(--text-bright); }
.term-out     { color: var(--text-dim); }
.term-ok      { color: var(--cyan); }
.term-warn    { color: var(--amber); }
.term-err     { color: var(--rose); }
.term-key     { color: var(--violet); }

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  border-top: 1px solid var(--border);
  padding: .6rem .9rem;
  background: var(--panel-2);
}
.terminal-input-row .term-prompt { flex: none; }
#term-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: .86rem;
  padding: 0;
  min-width: 0;
}
#term-input::placeholder { color: var(--text-faint); }
.term-hint {
  font-size: .7rem;
  color: var(--text-faint);
  flex: none;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.about-body p { color: var(--text-dim); font-size: 1.02rem; }
.about-body p strong { color: var(--text); }

.about-highlights {
  display: grid;
  gap: .9rem;
  margin-top: 1.6rem;
}
.about-highlight {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .95rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 2px solid var(--cyan);
  border-radius: var(--radius-sm);
}
.about-highlight .hl-icon {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  color: var(--cyan);
  font-size: 1rem;
}
.about-highlight h4 { font-size: .96rem; margin-bottom: .15rem; }
.about-highlight p { margin: 0; font-size: .9rem; color: var(--text-dim); }

/* Profile card */
.profile-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: .85rem;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.profile-card-head {
  padding: .7rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-faint);
  font-size: .76rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-card-head .yaml-badge {
  color: var(--amber);
  background: var(--amber-dim);
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .68rem;
}
.profile-card-body { padding: 1rem 1.1rem; line-height: 1.85; }
.yk { color: var(--violet); }
.yv { color: var(--text); }
.ys { color: var(--cyan); }
.yc { color: var(--text-faint); }
.yi { padding-left: 1.2rem; }

/* ---------- Skills ---------- */
.skills-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.skill-tab {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--text-dim);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: .5rem .95rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.skill-tab:hover { color: var(--text-bright); border-color: var(--cyan-line); }
.skill-tab.is-active {
  color: var(--bg-deep);
  background: var(--cyan);
  border-color: var(--cyan);
  font-weight: 500;
}

.skill-panel { display: none; }
.skill-panel.is-active { display: block; animation: fade-up .4s var(--ease); }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.skill-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.skill-item:hover { border-color: var(--cyan-line); transform: translateY(-2px); }
.skill-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .55rem;
}
.skill-item-name {
  font-family: var(--font-mono);
  font-size: .88rem;
  color: var(--text-bright);
}
.skill-item-level {
  font-family: var(--font-mono);
  font-size: .7rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  flex: none;
}
.skill-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-soft);
  overflow: hidden;
}
.skill-bar > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transition: width 1.1s var(--ease);
}
.skill-item-note {
  font-size: .8rem;
  color: var(--text-faint);
  margin: .55rem 0 0;
  font-family: var(--font-mono);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 1.4rem;
}
.tag {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--text-dim);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: .28rem .65rem;
  border-radius: 999px;
}

/* ---------- Pipeline visual ---------- */
.pipeline {
  margin-top: 3rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  overflow: hidden;
}
.pipeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1.4rem;
}
.pipeline-head h3 {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--text-bright);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.pipeline-run {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-line);
  border-radius: 999px;
  padding: .25rem .7rem;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.pipeline-run:hover { background: var(--cyan); color: var(--bg-deep); }

.pipeline-track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: .5rem;
}
.pipeline-stage {
  flex: 1 0 140px;
  position: relative;
  text-align: center;
  padding: 0 .4rem;
}
.pipeline-stage::after {
  content: "";
  position: absolute;
  top: 21px;
  left: calc(50% + 24px);
  right: calc(-50% + 24px);
  height: 2px;
  background: var(--border);
  transition: background .4s var(--ease);
}
.pipeline-stage:last-child::after { display: none; }
.pipeline-stage.is-done::after { background: var(--cyan); }

.pipeline-node {
  width: 44px; height: 44px;
  margin: 0 auto .6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  border: 2px solid var(--border);
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: .95rem;
  position: relative;
  z-index: 1;
  transition: border-color .4s var(--ease), color .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
.pipeline-stage.is-running .pipeline-node {
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 0 6px var(--amber-dim);
}
.pipeline-stage.is-running .pipeline-node::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--amber);
  animation: node-spin .9s linear infinite;
}
@keyframes node-spin { to { transform: rotate(360deg); } }
.pipeline-stage.is-done .pipeline-node {
  border-color: var(--cyan);
  color: var(--cyan);
  background: var(--cyan-dim);
}
.pipeline-label {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.35;
}
.pipeline-stage.is-done .pipeline-label { color: var(--text-bright); }
.pipeline-time {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--text-faint);
  margin-top: .2rem;
  min-height: 1em;
}
.pipeline-log {
  margin-top: 1.3rem;
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--text-dim);
  height: 110px;
  overflow-y: auto;
  line-height: 1.7;
}
.pipeline-log .ok  { color: var(--cyan); }
.pipeline-log .wrn { color: var(--amber); }

/* ---------- Projects ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.4rem;
}

.project {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.project:hover {
  transform: translateY(-5px);
  border-color: var(--cyan-line);
  box-shadow: 0 20px 44px rgba(0,0,0,.45);
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: .74rem;
}
.project-id { color: var(--text-faint); }
.project-type {
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--amber-line);
  border-radius: 999px;
  padding: .12rem .55rem;
  font-size: .68rem;
  letter-spacing: .04em;
}

.project-body { padding: 1.3rem 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.project h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  margin-bottom: .7rem;
}
.project-points { margin-bottom: 1.1rem; display: grid; gap: .5rem; }
.project-points li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.6;
}
.project-points li::before {
  content: "\25B9";
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-size: .85rem;
}
.project-impact {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border-left: 2px solid var(--cyan);
  padding: .5rem .75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1.1rem;
}
.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: auto;
}
.project-stack .tag { font-size: .72rem; }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 30px;
  display: grid;
  gap: 1.6rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--amber), transparent);
  opacity: .45;
}
.tl-item { position: relative; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
}
.tl-item.is-current::before {
  border-color: var(--amber);
  box-shadow: 0 0 0 5px var(--amber-dim);
}
.tl-when {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--amber);
  margin-bottom: .25rem;
}
.tl-item h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.tl-item p { color: var(--text-dim); font-size: .94rem; margin: 0; }

/* ---------- Education / certs ---------- */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.4rem;
  align-items: start;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.panel > h3 {
  font-family: var(--font-mono);
  font-size: .9rem;
  color: var(--cyan);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--border);
}

.edu-item { padding: .85rem 0; border-bottom: 1px dashed var(--border-soft); }
.edu-item:last-child { border-bottom: none; padding-bottom: 0; }
.edu-item h4 { font-size: 1rem; margin-bottom: .2rem; }
.edu-item .edu-meta {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
}
.edu-item .edu-score { color: var(--amber); }

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .8rem 0;
  border-bottom: 1px dashed var(--border-soft);
}
.cert-item:last-child { border-bottom: none; padding-bottom: 0; }
.cert-icon {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--violet-dim);
  color: var(--violet);
  font-size: .95rem;
}
.cert-item h4 { font-size: .95rem; margin-bottom: .25rem; }
.cert-status {
  font-family: var(--font-mono);
  font-size: .72rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  display: inline-block;
}
.cert-status.in-progress {
  color: var(--amber);
  background: var(--amber-dim);
  border: 1px solid var(--amber-line);
}
.cert-status.done {
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-line);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  /* 250px keeps all four cards on one row inside the 1180px container;
     270px fell ~1px short and orphaned the last card onto its own line. */
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
  margin-bottom: 2.5rem;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
a.contact-card:hover { transform: translateY(-3px); border-color: var(--cyan-line); }
.contact-card .ci {
  flex: none;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  color: var(--cyan);
}
.contact-card .ci svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.contact-card .cl {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .07em;
}
.contact-card .cv {
  font-size: .95rem;
  color: var(--text-bright);
  word-break: break-word;
}
a.contact-card:hover .cv { color: var(--cyan); }

.contact-cta {
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 1.5rem;
}
.contact-cta h3 { font-size: 1.4rem; margin-bottom: .6rem; }
.contact-cta p { color: var(--text-dim); max-width: 54ch; margin: 0 auto 1.6rem; }
.contact-cta .hero-actions { justify-content: center; margin-bottom: 0; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--bg-deep);
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-faint);
}
.footer-links { display: flex; gap: 1.1rem; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--cyan); }
.footer-build {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.footer-build .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-dot 2s infinite;
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.to-top.is-shown { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { color: var(--cyan); border-color: var(--cyan-line); }
.to-top svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .profile-card { position: static; }
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(10, 13, 18, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: .5rem 24px 1rem;
    transform: translateY(-120%);
    transition: transform .3s var(--ease);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav-links.is-open { transform: none; }
  .nav-links a { padding: .8rem .5rem; font-size: .92rem; border-radius: 0; }
  .nav-cta { display: none; }

  .page-wrap > section { padding: 72px 0; }
  .hero { padding-top: calc(var(--nav-h) + 36px); }
  .scroll-cue { display: none; }
  .terminal-body { min-height: 260px; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer .container { flex-direction: column; text-align: center; }
}

/* ---------- Print ---------- */
@media print {
  #network-bg, .nav, .to-top, .scroll-cue, .terminal, .pipeline, .palette-chip { display: none !important; }
  body { background: #fff; color: #000; }
  .page-wrap > section { padding: 16px 0; background: none !important; }
  .card, .panel, .project, .contact-card { border-color: #ccc; background: #fff; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  #network-bg { display: none; }
}

/* ---------- Utilities ---------- */
.mt-xl { margin-top: 2.5rem; }

.strengths-line {
  margin: .3rem 0 0;
  font-size: .88rem;
  color: var(--text-dim);
}
