/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #07090f;
  --bg2:       #0d1120;
  --bg3:       #111827;
  --border:    rgba(255,255,255,0.07);
  --border2:   rgba(255,255,255,0.12);
  --accent:    #3b82f6;
  --accent2:   #06d6a0;
  --text:      #e2e8f4;
  --text2:     #8899b4;
  --text3:     #4a5f7a;
  --font-head: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius:    12px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-head);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7,9,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px !important;
}
.nav-cta:hover { opacity: 0.9; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}
.mobile-menu a {
  font-size: 15px;
  font-weight: 600;
  color: var(--text2);
  padding: 0.5rem 0;
}
.mobile-menu.open { display: flex; }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59,130,246,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.glow-1 {
  width: 500px; height: 500px;
  background: var(--accent);
  top: -100px; left: -100px;
}
.glow-2 {
  width: 400px; height: 400px;
  background: var(--accent2);
  bottom: -100px; right: 10%;
}

.hero-content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
  z-index: 1;
  max-width: 560px;
  margin-left: max(2rem, calc((100vw - 1100px)/2));
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(6,214,160,0.08);
  border: 1px solid rgba(6,214,160,0.2);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent2);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s ease both;
}

.dot-pulse {
  width: 7px; height: 7px;
  background: var(--accent2);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.5; transform:scale(0.8); }
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 1.2rem;
  animation: fadeUp 0.6s 0.1s ease both;
}
.accent { color: var(--accent); }

.typewriter {
  color: var(--accent2);
  border-right: 2px solid var(--accent2);
  padding-right: 4px;
  min-height: 1.2em;
  display: inline-block;
}

.hero-sub {
  font-size: 15px;
  color: var(--text2);
  font-family: var(--font-mono);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s 0.3s ease both;
}

.badge {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.4s ease both;
}

.hero-code {
  position: absolute;
  right: max(2rem, calc((100vw - 1100px)/2));
  top: 50%;
  transform: translateY(-50%);
  animation: fadeUp 0.6s 0.5s ease both;
  z-index: 1;
}

.code-window {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 340px;
}

.code-header {
  background: var(--bg3);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.code-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
  margin-left: 6px;
}

.code-body {
  padding: 1.2rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text2);
}
.ck { color: #7c6af7; }
.cc { color: #3b82f6; }
.cs { color: #06d6a0; }
.cb { color: #f59e0b; }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text3);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fadeUp 1s 0.8s ease both;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--text3), transparent);
  animation: scrollAnim 1.5s infinite;
}
@keyframes scrollAnim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
}
.btn-outline:hover { background: var(--bg3); transform: translateY(-1px); }
.btn-full { width: 100%; justify-content: center; }

/* ===== SECTIONS ===== */
section { padding: 6rem 0; }

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 3rem;
  color: var(--text);
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-left h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.about-left p {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 1rem;
  line-height: 1.8;
}
.about-left p strong { color: var(--accent2); }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border2); }

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 12px;
  color: var(--text3);
  margin-top: 4px;
  font-weight: 600;
}

.tech-stack {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.stack-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 6px;
}
.stack-item span {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== PROJECTS ===== */
#projects { background: var(--bg); }

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

.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.project-card:hover {
  border-color: var(--border2);
  transform: translateY(-3px);
}

.project-card.featured {
  grid-column: span 2;
  border-color: rgba(59,130,246,0.25);
  background: linear-gradient(135deg, var(--bg2), rgba(59,130,246,0.05));
}

.project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.project-icon { font-size: 24px; }

.project-tag {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
}
.project-tag.live {
  background: rgba(6,214,160,0.1);
  border-color: rgba(6,214,160,0.3);
  color: var(--accent2);
}

.project-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
}

.project-card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  flex: 1;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-tech span {
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text3);
}

.project-links { display: flex; gap: 8px; }

.proj-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid var(--border2);
  color: var(--accent);
  background: transparent;
  transition: background var(--transition);
}
.proj-btn:hover { background: var(--bg3); }

/* ===== YOUTUBE ===== */
#youtube { background: var(--bg2); }

.yt-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.yt-channel {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.yt-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: #ff0000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.yt-name { font-size: 14px; font-weight: 700; }
.yt-sub { font-size: 12px; color: var(--text3); font-family: var(--font-mono); }

.yt-subscribe {
  margin-left: auto;
  background: #ff0000;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  flex-shrink: 0;
  transition: opacity var(--transition);
}
.yt-subscribe:hover { opacity: 0.85; }

.yt-left > p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

.yt-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.yt-topics span {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}

.yt-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yt-card {
  display: flex;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.yt-card:hover { border-color: var(--border2); }

.yt-thumb {
  width: 120px;
  min-height: 68px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0a1a2e, #1a3060);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
}

.yt-play {
  font-size: 18px;
  color: rgba(255,255,255,0.8);
}

.yt-thumb-label {
  font-size: 9px;
  font-family: var(--font-mono);
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.yt-card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.yt-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}

.yt-card-meta {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ===== CONTACT ===== */
#contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-left > p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  transition: border-color var(--transition);
}
.contact-item:hover { border-color: var(--border2); }

.contact-icon {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.contact-item-label {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-item-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font-head);
  transition: border-color var(--transition);
  outline: none;
  resize: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text3);
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 16px;
  font-weight: 800;
}
.footer-logo span { color: var(--accent); }

.footer-mid {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
}

.footer-right {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-code { display: none; }
  .hero-content { max-width: 100%; margin: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .projects-grid { grid-template-columns: 1fr 1fr; }
  .project-card.featured { grid-column: span 2; }
  .yt-wrapper { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .projects-grid { grid-template-columns: 1fr; }
  .project-card.featured { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  section { padding: 4rem 0; }
}
