:root {
  --bg-dark: #0a192f;
  --bg-light: #112240;
  --text-primary: #ccd6f6;
  --text-secondary: #8892b0;
  --accent: #64ffda;
  --accent-tint: rgba(100, 255, 218, 0.1);
  --font-main: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes glitch {
  0% {
    text-shadow: 2px 2px 0px red, -2px -2px 0px blue;
  }

  25% {
    text-shadow: -2px 2px 0px red, 2px -2px 0px blue;
  }

  50% {
    text-shadow: 2px -2px 0px red, -2px 2px 0px blue;
  }

  75% {
    text-shadow: -2px -2px 0px red, 2px 2px 0px blue;
  }

  100% {
    text-shadow: 2px 2px 0px red, -2px -2px 0px blue;
  }
}

/* Cursor Glow */
.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(100, 255, 218, 0.05) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
  display: none;
  /* JS will enable on desktop */
}

/* Typography */
h1,
h2,
h3,
h4 {
  color: var(--text-primary);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.highlight {
  color: var(--accent);
}

.section-title {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  font-size: clamp(20px, 4vw, 32px);
  white-space: nowrap;
}

.section-title .text {
  margin-left: 20px;
}

.section-title::after {
  content: "";
  display: block;
  width: 200px;
  height: 1px;
  background: var(--bg-light);
  margin-left: 20px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 50px;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.logo {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links li a {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.nav-links li a:hover {
  color: var(--accent);
}

.hamburger {
  display: none;
  cursor: pointer;
}

/* Hero Section */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 50px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
}

.greeting {
  font-family: var(--font-mono);
  color: var(--accent);
  margin-bottom: 20px;
}

.glitch {
  font-size: clamp(40px, 8vw, 70px);
  margin: 0;
  line-height: 1.1;
}

.glitch:hover {
  animation: glitch 0.3s infinite;
}

.subtitle {
  font-size: clamp(30px, 6vw, 60px);
  color: var(--text-secondary);
  margin-top: 10px;
}

.hero-desc {
  margin-top: 20px;
  max-width: 500px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.cta-group {
  margin-top: 40px;
  display: flex;
  gap: 20px;
}

.btn {
  padding: 12px 24px;
  font-family: var(--font-mono);
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn.primary {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn.primary:hover {
  background: var(--accent-tint);
}

.btn.secondary {
  border: 1px solid transparent;
  /* ghostly */
  color: var(--text-secondary);
}

.btn.secondary:hover {
  color: var(--text-primary);
}

.hero-visual {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.code-block {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border: 1px solid var(--text-secondary);
  box-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.7);
}

.code-block .keyword {
  color: #c792ea;
}

.code-block .type {
  color: #ffcb6b;
}

.code-block .string {
  color: #c3e88d;
}

/* Sections */
section {
  padding: 100px 50px;
  max-width: 1000px;
  margin: 0 auto;
}

/* About */
.about-grid {
  display: grid;
  gap: 50px;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

/* Skills */
.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.skill-category {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.skill-category:hover {
  transform: translateY(-5px);
}

.skill-category h3 {
  margin-bottom: 15px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 5px 10px;
  border-radius: 4px;
}

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

.project-card {
  background: var(--bg-light);
  padding: 30px;
  border-radius: 8px;
  transition: transform 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-7px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.folder-icon {
  color: var(--accent);
  font-size: 2rem;
}

.links a {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.links a:hover {
  color: var(--accent);
}

.project-card h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.project-tech {
  display: flex;
  gap: 15px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Timeline */
.timeline-container {
  position: relative;
  border-left: 2px solid var(--bg-light);
  padding-left: 30px;
}

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

.timeline-item::before {
  content: "";
  position: absolute;
  left: -36px;
  top: 5px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
}

.timeline-item .date {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.timeline-item h4 {
  margin-bottom: 5px;
}

.timeline-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Chiya Guff Contact */
.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  background: var(--bg-light);
  padding: 50px;
  border-radius: 8px;
  box-shadow: 0 10px 30px -15px rgba(2, 12, 27, 0.7);
}

.contact-text {
  flex: 1;
  min-width: 300px;
}

.contact-text h3 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.chiya-options {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.chiya-card {
  background: var(--bg-dark);
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid var(--text-secondary);
  flex: 1;
  transition: transform 0.3s ease, border-color 0.3s ease;
  cursor: pointer;
}

.chiya-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}

.demo-btn {
  margin-top: 15px;
  width: 100%;
  border-color: var(--text-secondary);
  font-size: 0.8rem;
  opacity: 0.8;
}

.demo-btn:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}

/* Modal Enhancements */
.modal-content.large {
  max-width: 800px;
  height: 60vh;
  display: flex;
  flex-direction: column;
}

.terminal-body {
  background: black;
  font-family: 'Fira Code', monospace;
  color: var(--accent);
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  position: relative;
}

.typing-container {
  white-space: pre-wrap;
  line-height: 1.5;
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(100, 255, 218, 0.3);
  animation: scan 3s linear infinite;
  pointer-events: none;
}

@keyframes scan {
  0% {
    top: 0%;
  }

  100% {
    top: 100%;
  }
}

.slide-content {
  animation: fadeIn 0.5s ease;
}

.slide-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  border-bottom: 1px dashed var(--text-secondary);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.slide-code {
  background: #112240;
  padding: 10px;
  color: #a8b2d1;
  border-radius: 4px;
  margin-top: 10px;
  font-size: 0.9rem;
}

.chiya-card.selected {
  border-color: var(--accent);
  background: var(--accent-tint);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(100, 255, 218, 0.1);
}

.chiya-card .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.chiya-card .small {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  margin-top: 5px;
}

.contact-form {
  flex: 1.5;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-dark);
  border: 1px solid var(--text-secondary);
  border-radius: 4px;
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-tint);
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

.rocket {
  display: inline-block;
  transition: transform 0.3s ease;
}

.btn:hover .rocket {
  transform: translateX(5px) translateY(-5px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 25, 47, 0.9);
  backdrop-filter: blur(5px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--bg-light);
  width: 90%;
  max-width: 600px;
  border-radius: 8px;
  border: 1px solid var(--text-secondary);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  font-family: var(--font-mono);
}

.modal-header {
  background: #020c1b;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--text-secondary);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red {
  background: #ff5f56;
}

.terminal-dot.yellow {
  background: #ffbd2e;
}

.terminal-dot.green {
  background: #27c93f;
}

.modal-title {
  margin-left: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.modal-body {
  padding: 20px;
  color: var(--text-primary);
  min-height: 200px;
}

.json-display {
  background: #020c1b;
  padding: 15px;
  border-radius: 4px;
  color: var(--accent);
  margin-top: 15px;
  white-space: pre-wrap;
  font-size: 0.85rem;
  display: none;
}

.modal-footer {
  padding: 15px;
  border-top: 1px solid rgba(136, 146, 176, 0.1);
  text-align: right;
}

.btn.small {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* Transmission Steps */
.step {
  margin-bottom: 5px;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

.step.success {
  color: var(--accent);
}

.step.process {
  color: var(--text-secondary);
}

/* Footer */
footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg-dark);
}

/* Mobile */
@media (max-width: 768px) {
  .navbar {
    padding: 20px;
  }

  .nav-links {
    display: none;
    /* simple mobile hide for now, or add js toggle */
  }

  .hamburger {
    display: block;
    color: var(--accent);
    font-size: 1.5rem;
  }

  .hero-visual {
    display: none;
  }

  #hero {
    text-align: center;
  }

  .cta-group {
    justify-content: center;
  }
}