:root {
  --bg: #f4f2ee;
  --surface: #edeae4;
  --border: #d8d4cc;
  --text: #111010;
  --muted: #bbb;
  --muted-text: #666;
  --accent-dim: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
  --bg: #0d0d0d;
  --surface: #151515;
  --border: #222;
  --text: #f0ede8;
  --muted: #444;
  --muted-text: #888;
  --accent-dim: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] nav {
  background: rgba(13, 13, 13, 0.9);
}

[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .cert-card:hover {
  background: #1a1a1a;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  transition:
    background 0.3s,
    color 0.3s;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 60px;
  background: rgba(8, 15, 14, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.logo {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}
.logo span {
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--muted-text);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text);
}

.nav-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-links {
  margin-left: auto;
}

.nav-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted-text);
  font-family: "DM Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 150px;
  padding: 120px 60px 80px;
  position: relative;
  overflow: hidden;
}

.hero-left {
  position: relative;
  z-index: 1;
  flex: 0 1 520px;
}

/* terminal replaced by dashboard */

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.6;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 28px;
  background-color: rgba(128, 128, 128, 0.125);
  padding: 7px 10px;
  border-radius: 20px;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgb(103, 188, 103);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

.hero-name {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -3px;
  margin-bottom: 12px;
}

.hero-title {
  font-family: "DM Mono", sans-serif;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: -2px;
  color: var(--muted);
  margin-bottom: 30px;
  min-height: 3.8rem;
}

.hero-desc {
  max-width: 480px;
  color: var(--muted-text);
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 48px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: "DM Mono", monospace;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
}
.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.terminal {
  background: #1c1c1c;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.14),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #262626;
  border-bottom: 1px solid #333;
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.r {
  background: #ff5f57;
}
.dot.y {
  background: #febc2e;
}
.dot.g {
  background: #28c840;
}
.terminal-title {
  flex: 0.85;
  text-align: center;
  font-size: 11px;
  color: #666;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 20px 20px 28px;
  font-size: 12.5px;
  line-height: 2;
}
.t-prompt {
  color: #7ec8a0;
}
.t-cmd {
  color: #e8e4df;
}
.t-ok {
  color: #28c840;
}
.t-info {
  color: #777;
}
.t-warn {
  color: #febc2e;
}
.t-line {
  display: flex;
  gap: 8px;
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 13px;
  background: #7ec8a0;
  vertical-align: text-bottom;
  animation: blink 1.2s step-end infinite;
  margin-left: 2px;
  position: relative;
  top: 1px;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

section {
  padding: 100px 60px;
}

.section-label {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted-text);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::after {
  content: "";
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--border);
}

.section-title {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -1.5px;
  line-height: 1.05;
  margin-bottom: 16px;
}

.section-sub {
  color: var(--muted-text);
  font-size: 13px;
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 56px;
}

#about {
  border-top: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about-text {
  color: var(--muted-text);
  font-size: 13.5px;
  line-height: 2;
}
.about-text p + p {
  margin-top: 20px;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}
.skill-tag {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 11px;
  color: var(--muted-text);
  letter-spacing: 0.05em;
  background: var(--surface);
  transition: all 0.2s;
}
.skill-tag:hover {
  border-color: var(--text);
  color: var(--text);
}

#certifications {
  border-top: 1px solid var(--border);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.cert-card {
  background: var(--surface);
  padding: 36px 32px;
  border: 1px solid var(--border);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.cert-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.cert-card:hover::before {
  transform: scaleX(1);
}
.cert-card:hover {
  background: #e6e2db;
}

.cert-issuer {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.cert-name {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.cert-desc {
  font-size: 12.5px;
  color: var(--muted-text);
  line-height: 1.8;
  margin-bottom: 24px;
}
.cert-arrow {
  position: absolute;
  top: 32px;
  right: 32px;
  font-size: 18px;
  color: var(--muted);
  transition: all 0.2s;
}
.cert-card:hover .cert-arrow {
  color: var(--text);
  transform: translate(3px, -3px);
}
.cert-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
  border: 1px solid var(--text);
  color: var(--text);
}

#projects {
  border-top: 1px solid var(--border);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.project-card {
  background: var(--surface);
  padding: 36px 32px;
  border: 1px solid var(--border);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.project-card:hover::before {
  transform: scaleX(1);
}
.project-card:hover {
  background: #e6e2db;
}

.project-num {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.project-name {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.project-desc {
  font-size: 12.5px;
  color: var(--muted-text);
  line-height: 1.8;
  margin-bottom: 24px;
}
.project-stack {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stack-tag {
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted-text);
}
.project-arrow {
  position: absolute;
  top: 32px;
  right: 32px;
  font-size: 18px;
  color: var(--muted);
  transition: all 0.2s;
}
.project-card:hover .project-arrow {
  color: var(--text);
  transform: translate(3px, -3px);
}

#contact {
  border-top: 1px solid var(--border);
}
.contact-inner {
  max-width: 600px;
}
.contact-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 40px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-text);
  text-decoration: none;
  font-size: 13px;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  transition: all 0.2s;
}
.contact-link:hover {
  color: var(--text);
  border-color: var(--text);
  transform: translateY(-2px);
}
.contact-link .icon {
  font-size: 16px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 32px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ── Scroll progress bar ─────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #28c840, #7ec8a0);
  opacity: 0.4;
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ── Career timeline ─────────────────────────────────── */
#career {
  border-top: 1px solid var(--border);
}

.timeline {
  position: relative;
  padding-left: 32px;
  max-width: 680px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #28c840;
  border: 2px solid #080f0e;
  box-shadow: 0 0 0 1px #28c840;
}

.timeline-date {
  font-size: 11px;
  color: var(--muted-text);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 28px;
  transition: border-color 0.2s;
}

.timeline-card:hover {
  border-color: #28c840;
}

.timeline-company {
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.timeline-role {
  font-size: 12px;
  color: #28c840;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.timeline-desc {
  font-size: 12.5px;
  color: var(--muted-text);
  line-height: 1.8;
}

/* Hamburger hidden on desktop */
.hamburger {
  display: none;
}

@media (max-width: 900px) {
  nav {
    padding: 16px 20px;
  }

  .nav-right {
    gap: 8px;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: #080f0e;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px 28px;
    gap: 0;
    z-index: 99;
    margin-left: 0;
  }

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

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 13px;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
  }

  .hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--muted-text);
    border-radius: 2px;
    transition: all 0.25s;
  }

  .hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  #hero {
    flex-direction: column;
    padding: 100px 24px 60px;
    gap: 48px;
    align-items: flex-start;
  }

  .dashboard {
    flex: unset !important;
    width: 100% !important;
    min-width: unset !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .hero-left {
    flex: unset;
    width: 100%;
  }

  section {
    padding: 80px 24px;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .certs-grid {
    grid-template-columns: 1fr;
  }
  footer {
    padding: 24px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ── Dark-only theme ─────────────────────────────────── */
:root {
  --bg: #080f0e;
  --surface: #0e1917;
  --border: #1a2b28;
  --text: #f0ede8;
  --muted: #444;
  --muted-text: #888;
  --accent-dim: rgba(255, 255, 255, 0.05);
}

body {
  position: relative;
}

section,
footer,
.project-card,
.cert-card,
.contact-link,
.skill-tag,
.btn {
  position: relative;
  z-index: 1;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 560px;
  height: 560px;
  top: -140px;
  left: -180px;
  background: radial-gradient(circle, #1a4d3a 0%, transparent 70%);
  opacity: 0.8;
}

.orb-2 {
  width: 440px;
  height: 440px;
  top: 30%;
  right: -130px;
  background: radial-gradient(circle, #0d3828 0%, transparent 70%);
  opacity: 0.9;
}

.orb-3 {
  width: 400px;
  height: 400px;
  bottom: 5%;
  left: 20%;
  background: radial-gradient(circle, #163d2e 0%, transparent 70%);
  opacity: 0.8;
}

nav {
  background: rgba(8, 15, 14, 0.9) !important;
}

.project-card:hover,
.cert-card:hover {
  background: #1a2b28;
}

/* ── Dashboard ───────────────────────────────────────── */
.dashboard {
  flex: 0 0 550px;
  background: #111816;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1e2e2b;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: #0d1614;
  border-bottom: 1px solid #1e2e2b;
}

.dashboard-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Syne", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #e8e4df;
}

.dashboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28c840;
  animation: pulse 2s infinite;
}

.dashboard-sub {
  font-size: 10px;
  color: #555;
  letter-spacing: 0.05em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: #1a2b28;
}

.dash-card {
  background: #111816;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.dash-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-status.online {
  background: #28c840;
}
.dash-status.warn {
  background: #febc2e;
}
.dash-status.offline {
  background: #ff5f57;
}

.dash-name {
  font-size: 12px;
  font-weight: 600;
  color: #d8d4cf;
  letter-spacing: 0.03em;
}

.dash-metric {
  display: grid;
  grid-template-columns: 52px 42px 1fr;
  align-items: center;
  gap: 6px;
}

.dash-metric-inline {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dash-label {
  font-size: 10px;
  color: #555;
  letter-spacing: 0.05em;
}

.dash-val {
  font-size: 11px;
  color: #a0c8b0;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dash-bar {
  height: 4px;
  background: #1e2e2b;
  border-radius: 2px;
  overflow: hidden;
}

.dash-fill {
  height: 100%;
  background: #28c840;
  border-radius: 2px;
  transition: width 0.6s ease;
  min-width: 2px;
}

.dash-fill.warn {
  background: #febc2e;
}
.dash-fill.high {
  background: #ff5f57;
}
