@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  box-sizing: border-box;
}

:root {
  --bg: #0b0f1a;
  --panel: rgba(0, 0, 0, 0.42);
  --border: rgba(0, 255, 255, 0.14);
  --border-strong: rgba(0, 255, 255, 0.28);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #00ffff;
  --accent-soft: rgba(0, 255, 255, 0.1);
  --success: #22c55e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(0, 255, 255, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent 22%),
    linear-gradient(180deg, #050816 0%, #0b0f1a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

nav button {
  all: unset;
  cursor: pointer;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  color: #93a4ba;
  font-weight: 600;
  transition: 0.2s ease;
}

nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

nav button.active {
  background: var(--accent);
  color: #00141a;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

main {
  width: 100%;
  max-width: 1080px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeTab 0.35s ease;
}

@keyframes fadeTab {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2.8rem;
  line-height: 1.1;
  color: var(--accent);
}

h1 span {
  display: block;
  color: var(--muted);
  font-size: 1.7rem;
  font-weight: 400;
  margin-top: 0.35rem;
}

h2 {
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

p {
  color: var(--muted);
  line-height: 1.75;
  margin-top: 0;
}

.hero-subtitle {
  max-width: 760px;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s ease;
}

.hero-link.primary {
  background: var(--accent);
  color: #001118;
}

.hero-link.secondary {
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.02);
}

.hero-link:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.badge-group {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.badge {
  display: inline-block;
  margin: 5px;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 999px;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
}

.terminal {
  background: #020617;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 1.35rem;
  margin-top: 1.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  min-height: 190px;
  line-height: 1.9;
  overflow: hidden;
}

.terminal p {
  margin: 8px 0;
  opacity: 0;
  transition: opacity 0.35s ease;
  color: #cbd5e1;
}

.terminal .success {
  color: var(--success);
  font-weight: 600;
}

.about-box {
  margin-top: 2rem;
  padding: 1.4rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-section {
  margin-top: 1.6rem;
}

.project-section:first-of-type {
  margin-top: 1rem;
}

.project-section h3 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-size: 1.25rem;
}

.project-section-intro {
  margin-bottom: 0;
  max-width: 760px;
}

.project-card {
  position: relative;
}

.project-card,
.contact-card {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.2rem;
  opacity: 0;
  transform: translateY(16px);
  transition: 0.25s ease;
}

.project-card.show,
.contact-card.show {
  animation: fadeIn 0.55s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card:hover,
.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.project-card h3,
.contact-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.08rem;
  color: var(--text);
}

.project-card a,
.contact-card a {
  color: var(--accent);
  text-decoration: none;
}

.project-card a:hover,
.contact-card a:hover {
  text-decoration: underline;
}

.project-description {
  margin-bottom: 1rem;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tech-badge {
  font-size: 0.72rem;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
}

.button-group {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
}

.demo-button {
  border: none;
  background: var(--accent);
  color: #001118;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 0.75rem;
}

.demo-button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.contact-icon {
  color: var(--accent);
  margin-right: 10px;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.88);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  width: 90%;
  max-width: 820px;
  background: #0b0f1a;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}

.close-btn {
  float: right;
  font-size: 1.5rem;
  color: var(--accent);
  cursor: pointer;
  line-height: 1;
}

video {
  width: 100%;
  margin-top: 1rem;
  border-radius: 10px;
  background: #000;
}

.coming-soon {
  padding: 3rem 1rem 2rem;
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
}

.kb-toolbar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-toolbar label {
  color: var(--muted);
  font-weight: 600;
}

.kb-select {
  min-width: 180px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-strong);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.kb-select:focus {
  outline: 2px solid rgba(0, 255, 255, 0.25);
  outline-offset: 2px;
}

.kb-panel {
  display: none;
}

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

.kb-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.kb-section h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1.35rem;
}

.kb-section h4 {
  margin: 1.1rem 0 0.45rem;
  color: var(--accent);
  font-size: 1rem;
}

.kb-note {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 1rem 0;
}

.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.kb-item {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.kb-item h4 {
  margin-top: 0;
  color: var(--text);
}

.kb-item p {
  margin-bottom: 0;
}

.kb-diagram,
.kb-code {
  width: 100%;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #020617;
  color: #cbd5e1;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  white-space: pre;
}

.kb-code {
  margin: 0.75rem 0 1rem;
}

@media (max-width: 680px) {
  body {
    padding: 1rem;
  }

  main {
    padding: 1.25rem;
    border-radius: 20px;
  }

  h1 {
    font-size: 2.1rem;
  }

  h1 span {
    font-size: 1.3rem;
  }

  nav {
    width: 100%;
    border-radius: 18px;
  }

  nav button {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-link {
    width: 100%;
    justify-content: center;
  }
}
