:root {
  --bg: #06101d;
  --bg-soft: #0a182a;
  --panel: rgba(12, 28, 48, 0.78);
  --panel-solid: #0b1728;
  --text: #e6f7ff;
  --muted: #91a8bb;
  --line: rgba(94, 234, 212, 0.18);
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(45, 212, 191, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 30%),
    var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 82%);
  z-index: -2;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 72px);
  background: rgba(6, 16, 29, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(56, 189, 248, 0.08));
  color: var(--accent);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.14);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.section-pad {
  padding: 88px clamp(20px, 5vw, 72px);
}

.hero {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  align-items: center;
  gap: 44px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 800;
}

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

h1 {
  max-width: 920px;
  margin-bottom: 22px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.hero-text {
  max-width: 720px;
  color: #c4d4e4;
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions,
.filter-bar,
.lab-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.filter,
.lab-tab,
.detail-toggle,
.copy-template {
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn {
  padding: 13px 20px;
  font-weight: 800;
}

.btn:hover,
.filter:hover,
.lab-tab:hover,
.detail-toggle:hover,
.copy-template:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.55);
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #031018;
}

.secondary {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.status-strip span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.06);
  color: #cafff7;
  font-size: 13px;
  font-weight: 700;
}

.hero-panel {
  display: grid;
  gap: 16px;
}

.terminal-card,
.signal-card,
.about-card,
.education-card,
.cert-card,
.project-card,
.lab-shell,
.contact-card,
.skill-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.terminal-card {
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.terminal-top span {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  background: var(--accent);
}

.terminal-top span:nth-child(2) {
  background: var(--accent-2);
}

.terminal-top span:nth-child(3) {
  background: var(--danger);
}

pre {
  min-height: 260px;
  margin: 0;
  padding: 24px;
  white-space: pre-wrap;
  color: #cafff7;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.signal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px;
}

.muted {
  color: var(--muted);
}

.pulse {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.55);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 22px rgba(45, 212, 191, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0); }
}

.split-section {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  align-items: start;
}

.section-heading {
  max-width: 720px;
}

.about-card,
.education-card,
.contact-card,
.lab-shell {
  padding: clamp(22px, 4vw, 34px);
}

.about-card p,
.project-card p,
.skill-card p,
.cert-card p,
.lab-panel p,
.contact-card p,
.education-card p {
  color: #c0d0df;
}

.filter-bar {
  margin: 34px 0 22px;
}

.filter,
.lab-tab,
.detail-toggle,
.copy-template {
  padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.filter.active,
.lab-tab.active {
  background: rgba(45, 212, 191, 0.16);
  color: var(--accent);
}

.skill-grid,
.cert-grid,
.project-grid {
  display: grid;
  gap: 18px;
}

.skill-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.skill-card,
.cert-card,
.project-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
}

.skill-card::before,
.cert-card::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.skill-card:hover::before,
.cert-card:hover::before,
.project-card:hover::before {
  opacity: 1;
}

.card-icon,
.cert-badge {
  display: inline-grid;
  place-items: center;
  height: 38px;
  min-width: 38px;
  margin-bottom: 28px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--accent);
  font-weight: 800;
}

.cert-badge {
  padding: 0 10px;
}

.education-photo {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
}

.edu-main {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.detail-toggle {
  width: 100%;
  margin-bottom: 18px;
}

.detail-panel {
  display: grid;
  gap: 24px;
  padding-top: 10px;
}

.detail-panel ul {
  margin: 0;
  padding-left: 20px;
  color: #c0d0df;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
}

.project-top span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.featured {
  grid-column: span 1;
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.14), rgba(12, 28, 48, 0.78));
}

.lab-shell {
  margin-top: 28px;
}

.lab-tabs {
  margin-bottom: 20px;
}

.lab-panel {
  display: none;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
}

.lab-panel.active {
  display: block;
}

.contact-section {
  padding-bottom: 48px;
}

.copy-template {
  margin-top: 8px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer a {
  color: var(--accent);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 76px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(6, 16, 29, 0.96);
  }

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

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

  .section-pad {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .skill-grid,
  .cert-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .education-photo {
    height: 210px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
