:root {
  --bg: #080d1a;
  --bg-elev: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.84);
  --bg-card-hover: rgba(23, 33, 56, 0.94);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --accent: #f59e0b;
  --accent-sky: #38bdf8;
  --accent-emerald: #10b981;
  --accent-violet: #a78bfa;
  --grid-line: rgba(56, 189, 248, 0.055);
  --shadow: 0 20px 50px rgba(2, 6, 23, 0.5);
  --radius: 16px;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elev: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(2, 132, 199, 0.35);
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #334155;
  --accent: #d97706;
  --accent-sky: #0284c7;
  --accent-emerald: #059669;
  --accent-violet: #7c3aed;
  --grid-line: rgba(15, 23, 42, 0.045);
  --shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle engineering blueprint background */
.blueprint-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.11), transparent 40%),
    radial-gradient(circle at 82% 8%, rgba(245, 158, 11, 0.09), transparent 36%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 44px 44px, 44px 44px;
}

.container {
  width: min(1160px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.section {
  padding: 4.75rem 0;
}

h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  line-height: 1.18;
  margin: 0;
}

p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9em;
  color: var(--accent-sky);
  background: rgba(56, 189, 248, 0.1);
  padding: 0.12rem 0.42rem;
  border-radius: 6px;
}

.mono-label {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-sky);
  margin-bottom: 0.45rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 13, 26, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .site-header {
  background: rgba(248, 250, 252, 0.86);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #0ea5e9, #f59e0b);
  color: #080d1a;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.96rem;
}

.brand-text small {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links .nav-cta {
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent-sky);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

[data-theme="light"] .icon-sun {
  display: none;
}

.mobile-only {
  display: none;
}

.mobile-drawer {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  gap: 0.65rem;
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-drawer a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.35rem;
  border-radius: 11px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.52rem 0.95rem;
  font-size: 0.84rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #080d1a;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-sky);
}

/* Hero */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.92fr;
  gap: 2.25rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-soft);
  font-size: 0.82rem;
  margin-bottom: 1.2rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.hero h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}

.accent-text {
  background: linear-gradient(120deg, var(--accent-sky), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.1rem, 2vw, 1.38rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: 1.03rem;
  max-width: 58ch;
  margin-bottom: 1.65rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.85rem;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 560px;
}

.meta-chip {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.meta-chip .mono-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.68rem;
}

.meta-chip strong {
  font-size: 0.88rem;
}

/* Hero Right Panel */
.hero-panel {
  padding: 1.45rem;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-header h2 {
  font-size: 1.18rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-sky {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent-sky);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-violet {
  background: rgba(167, 139, 250, 0.14);
  color: var(--accent-violet);
  border: 1px solid rgba(167, 139, 250, 0.3);
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.kpi-box {
  padding: 0.72rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
}

.kpi-val {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.kpi-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.scurve-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  background: rgba(2, 6, 23, 0.25);
  margin-bottom: 1rem;
}

[data-theme="light"] .scurve-card {
  background: rgba(15, 23, 42, 0.03);
}

.scurve-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.scurve-tabs {
  display: flex;
  gap: 0.35rem;
}

.scurve-tab {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.scurve-tab.active {
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent-sky);
  border-color: rgba(56, 189, 248, 0.4);
}

.scurve-svg {
  width: 100%;
  height: auto;
  display: block;
}

.grid-line {
  stroke: var(--border);
  stroke-width: 1;
}

.axis-line {
  stroke: var(--text-muted);
  stroke-opacity: 0.5;
  stroke-width: 1.2;
}

.svg-label {
  fill: var(--text-muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
}

.scurve-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  align-items: center;
}

.legend-note {
  margin-left: auto;
  font-style: italic;
  font-size: 0.7rem;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.3rem;
}

.dot-sky { background: var(--accent-sky); }
.dot-amber { background: var(--accent); }

.tia-steps {
  display: grid;
  gap: 0.65rem;
  padding: 0.4rem 0;
}

.tia-step {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-radius: 9px;
  border: 1px solid var(--border);
}

.tia-step span {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent);
}

.tia-step strong {
  display: block;
  font-size: 0.86rem;
}

.tia-step small {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.panel-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.42rem;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.panel-checklist li::before {
  content: "✓ ";
  color: var(--accent-emerald);
  font-weight: 700;
}

/* Section Headers */
.section-head {
  margin-bottom: 2rem;
}

.section-head h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.4rem;
}

.about-card {
  padding: 1.65rem;
}

.about-card h3 {
  margin-bottom: 0.85rem;
  font-size: 1.22rem;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.pillar {
  padding: 1.25rem;
}

.pillar-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
}

.pillar h3 {
  font-size: 1.05rem;
  margin: 0.35rem 0 0.45rem;
}

.pillar p {
  font-size: 0.9rem;
  margin: 0;
}

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-btn,
.skill-tab {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s ease;
}

.filter-btn.active,
.skill-tab.active,
.filter-btn:hover,
.skill-tab:hover {
  border-color: var(--accent-sky);
  color: var(--text);
  background: rgba(56, 189, 248, 0.14);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.project-card {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.project-card[hidden] {
  display: none;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.mono-year {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.project-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

.project-meta {
  font-size: 0.82rem;
  color: var(--accent-sky);
  margin-bottom: 0.65rem;
  font-weight: 500;
}

.project-card p:last-of-type {
  font-size: 0.9rem;
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.tag-row span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  padding: 0.24rem 0.55rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-soft);
}

/* Experience Timeline */
.timeline {
  display: grid;
  gap: 1.1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 1.5rem;
  padding: 1.45rem;
}

.timeline-date {
  border-right: 1px solid var(--border);
  padding-right: 1rem;
}

.period {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
}

.loc {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.timeline-body h3 {
  font-size: 1.14rem;
}

.company {
  font-weight: 600;
  color: var(--accent-sky);
  margin: 0.2rem 0 0.55rem;
}

.projects-line {
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

.timeline-body ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.timeline-body li + li {
  margin-top: 0.35rem;
}

/* Skills & Tools */
.skills-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.3rem;
  align-items: start;
}

.competencies-card {
  padding: 1.45rem;
}

.competencies-card h3 {
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.competency-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-soft);
}

.competency-list li[hidden] {
  display: none;
}

.tools-stack {
  display: grid;
  gap: 1rem;
}

.tool-group {
  padding: 1.25rem;
}

.tool-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.chip {
  font-size: 0.83rem;
  padding: 0.38rem 0.72rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-soft);
}

.chip-primary {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.12);
  color: var(--text);
  font-weight: 600;
}

/* Credentials */
.credentials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.edu-card,
.cert-card,
.cpd-card {
  padding: 1.45rem;
}

.edu-card h3 {
  margin: 0.85rem 0 0.35rem;
  font-size: 1.18rem;
}

.edu-school {
  font-size: 0.92rem;
}

.edu-details {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.75rem;
}

.edu-details .mono-label {
  display: block;
  margin-bottom: 0.1rem;
}

.cert-list,
.cpd-list {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.cert-list li {
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.cert-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cert-list strong {
  display: block;
  font-size: 0.92rem;
}

.cert-list span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.cpd-list {
  padding-left: 1.1rem;
  list-style: disc;
  font-size: 0.9rem;
  color: var(--text-soft);
  gap: 0.55rem;
}

/* Contact */
.contact-shell {
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.5rem, 2.5vw, 1.95rem);
  margin-bottom: 0.75rem;
}

.email-box {
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(56, 189, 248, 0.07);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.email-link {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}

.email-link:hover {
  color: var(--accent-sky);
}

.copy-feedback {
  min-height: 1.2rem;
  margin-top: 0.45rem;
  font-size: 0.84rem;
  color: var(--accent-emerald);
}

.contact-form {
  display: grid;
  gap: 0.85rem;
}

.contact-form h3 {
  font-size: 1.15rem;
}

.form-note {
  font-size: 0.84rem;
  margin-bottom: 0.25rem;
}

.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
}

[data-theme="light"] .contact-form input,
[data-theme="light"] .contact-form textarea {
  background: #ffffff;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-sky);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
  color: var(--text-muted);
}

.footer-inner a {
  color: var(--accent-sky);
  text-decoration: none;
  font-family: "JetBrains Mono", monospace;
}

/* Responsive */
@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .skills-layout,
  .contact-shell {
    grid-template-columns: 1fr;
  }

  .projects-grid,
  .credentials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .mobile-only {
    display: grid;
  }

  .hero-meta,
  .kpi-strip,
  .pillars-grid,
  .projects-grid,
  .credentials-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .timeline-date {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.65rem;
  }
}
