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

:root {
  /* Premium Palette */
  --primary: #0ea5e9;
  --secondary: #6366f1;
  --bg: #030712;
  --card-bg: rgba(17, 24, 39, 0.6);
  --border: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --neon-blue: #00f2ff;
  --neon-yellow: #fff200;
  --accent-gradient: linear-gradient(135deg, #0ea5e9, #00f2ff);
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Outfit', 'Inter', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background Blobs */
.bg-blob {
  position: fixed;
  width: 500px;
  height: 500px;
  background: var(--accent-gradient);
  filter: blur(120px);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
  animation: blob-float 20s infinite alternate;
}

.blob-1 {
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.blob-2 {
  bottom: -100px;
  right: -100px;
  animation-delay: -5s;
}

@keyframes blob-float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(100px, 50px) scale(1.1);
  }

  66% {
    transform: translate(-50px, 100px) scale(0.9);
  }

  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Scanlines Effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
  background-size: 100% 4px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.15;
}

.glass {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 15px 40px -10px rgba(14, 165, 233, 0.15);
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.5rem 2rem;
  background: rgba(3, 7, 18, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2.5rem;
}

nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

nav a:hover {
  color: var(--text);
  text-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 8rem 2rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
  background: linear-gradient(to bottom right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(14, 165, 233, 0.1));
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin-bottom: 2rem;
  min-height: 3rem;
  /* Prevent layout jump */
}

.typewriter-cursor {
  display: inline-block;
  width: 12px;
  height: 1.2rem;
  background: var(--primary);
  margin-left: 5px;
  vertical-align: middle;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Terminal Visual */
.terminal-window {
  width: 100%;
  max-width: 600px;
  background: #0d1117;
  border-radius: 12px;
  border: 1px solid #30363d;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  margin: 2rem 0;
  text-align: left;
  overflow: hidden;
}

.terminal-header {
  background: #161b22;
  padding: 10px 15px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #30363d;
}

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

.red {
  background: #ff5f56;
}

.yellow {
  background: #ffbd2e;
}

.green {
  background: #27c93f;
}

.terminal-body {
  padding: 20px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e6edf3;
}

.code-keyword {
  color: #ff7b72;
}

.code-func {
  color: #d2a8ff;
}

.code-str {
  color: #a5d6ff;
}

.code-comment {
  color: #8b949e;
}

.btn-primary {
  padding: 1rem 2rem;
  background: var(--accent-gradient);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.4);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 35px -5px rgba(14, 165, 233, 0.5);
}

/* Projects Grid */
.section {
  max-width: 1200px;
  margin: 6rem auto;
  padding: 0 2rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.card {
  overflow: hidden;
  transition: transform 0.3s ease;
}

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

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.card-content {
  padding: 1.5rem;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  height: 4.8rem;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.card-links {
  display: flex;
  gap: 1rem;
}

.card-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

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

.skill-item {
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.skill-item:hover {
  border-color: var(--primary);
  background: rgba(14, 165, 233, 0.05);
}

.skill-item img {
  width: 40px;
  margin-bottom: 1rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 4rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }

  nav ul {
    display: none;
  }
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Arcade Section Specifics */
.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.arcade-card {
  border: 1px solid rgba(234, 179, 8, 0.2);
  position: relative;
  overflow: hidden;
}

.arcade-card::before {
  content: "ARCADE LIVE";
  position: absolute;
  top: 10px;
  right: -30px;
  background: #eab308;
  color: #000;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 30px;
  transform: rotate(45deg);
  z-index: 10;
}

.arcade-card:hover {
  border-color: #eab308;
  box-shadow: 0 0 40px rgba(234, 179, 8, 0.2);
}

.btn-arcade {
  background: linear-gradient(135deg, #eab308, #ca8a04);
  color: #000;
  box-shadow: 0 10px 25px -5px rgba(234, 179, 8, 0.3);
}

.btn-arcade:hover {
  box-shadow: 0 20px 35px -5px rgba(234, 179, 8, 0.4);
}

/* Roadmap Section */
.roadmap-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.roadmap-item {
  display: flex;
  gap: 20px;
  position: relative;
}

.roadmap-item::before {
  content: "";
  position: absolute;
  left: 30px;
  top: 60px;
  bottom: -40px;
  width: 2px;
  background: var(--border);
}

.roadmap-item:last-child::before {
  display: none;
}

.roadmap-icon {
  width: 60px;
  height: 60px;
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-weight: 900;
  color: var(--primary);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
}

.roadmap-content {
  flex: 1;
}

.roadmap-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.status-completed {
  background: rgba(39, 201, 63, 0.2);
  color: #27c93f;
}

.status-active {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.status-planned {
  background: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

/* Interactive Terminal Widget */
.terminal-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  height: 250px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transform: translateY(400px);
  transition: transform 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.terminal-widget.active {
  transform: translateY(0);
}

.terminal-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  font-size: 1.5rem;
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.5);
  transition: all 0.3s ease;
}

.terminal-toggle:hover {
  transform: scale(1.1);
}

.terminal-input-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.terminal-prompt {
  color: #27c93f;
}

.terminal-command-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: inherit;
  flex: 1;
  outline: none;
}

/* MARQUEE ANIMATION */
.marquee-wrapper {
  overflow: hidden;
  width: 100%;
  padding: 40px 0;
  position: relative;
  background: rgba(14, 165, 233, 0.02);
}

.marquee-track {
  display: flex;
  gap: 80px;
  width: max-content;
  animation: scroll-left 30s linear infinite;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 15px;
  filter: grayscale(1) opacity(0.5);
  transition: all 0.4s ease;
}

.marquee-item:hover {
  filter: grayscale(0) opacity(1);
  transform: scale(1.1);
}

.marquee-item img {
  height: 35px;
}

.marquee-item span {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

/* CARD GRID FOR EDUCATION */
.edu-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 2rem;
}

.edu-card {
  padding: 2rem;
  text-align: left;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.edu-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--primary);
  transition: height 0.4s ease;
}

.edu-card:hover::before {
  height: 100%;
}
