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

:root {
  --bg: #080b10;
  --bg2: #0d1117;
  --bg3: #111820;
  --border: rgba(255,255,255,0.07);
  --text: #e6edf3;
  --muted: #7d8590;
  --accent: #00d4ff;
  --accent2: #7c3aed;
  --green: #39d353;
  --red: #f85149;
  --yellow: #d29922;
  --card-bg: rgba(255,255,255,0.03);
  --card-border: rgba(255,255,255,0.06);
  --radius: 12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 24px;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
}
#navbar.scrolled {
  background: rgba(8,11,16,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.5px;
}
.nav-links { list-style: none; display: flex; gap: 32px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ===== HERO ===== */
#hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 100px 24px 60px;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
}
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(100px); opacity: 0.12;
  animation: pulse 6s ease-in-out infinite alternate;
}
.glow-1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -100px;
}
.glow-2 {
  width: 500px; height: 500px;
  background: var(--accent2);
  bottom: -200px; right: -100px;
  animation-delay: 3s;
}
@keyframes pulse {
  from { opacity: 0.08; transform: scale(1); }
  to   { opacity: 0.18; transform: scale(1.1); }
}

.hero-content {
  position: relative; z-index: 1;
  flex: 1; max-width: 580px;
}
.hero-visual {
  position: relative; z-index: 1;
  flex: 1; display: flex; justify-content: flex-end; align-items: center;
  padding-left: 60px;
}

@media (max-width: 900px) {
  #hero { flex-direction: column; text-align: center; }
  .hero-visual { padding-left: 0; padding-top: 40px; width: 100%; justify-content: center; }
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 100px;
  padding: 6px 14px; font-size: 0.8rem; font-weight: 500;
  color: var(--accent); margin-bottom: 24px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.hero-name-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-location {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 20px;
  font-weight: 500;
}
.hero-sub {
  font-size: 1.05rem; color: var(--muted);
  max-width: 460px; margin-bottom: 32px; line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: flex; align-items: center; gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat-n { font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; }
.stat-l { font-size: 0.78rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-divider { width: 1px; height: 36px; background: var(--border); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none; cursor: pointer;
  transition: all 0.2s; border: none;
  font-family: 'Inter', sans-serif;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-primary:hover {
  background: #fff; transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(0,212,255,0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-1px);
}
.btn-full { width: 100%; text-align: center; }

/* ===== TERMINAL ===== */
.terminal-window {
  background: rgba(13,17,23,0.9);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  width: 420px; max-width: 100%;
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(0,212,255,0.05);
  overflow: hidden;
}
.terminal-bar {
  background: rgba(255,255,255,0.04);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.terminal-title { font-size: 0.75rem; color: var(--muted); margin-left: auto; font-family: 'JetBrains Mono', monospace; }
.terminal-body { padding: 20px; font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; line-height: 1.8; }
.t-line { display: flex; align-items: center; gap: 8px; }
.t-prompt { color: var(--accent); font-weight: 700; }
.t-cmd { color: #e6edf3; }
.t-out { color: var(--muted); padding-left: 16px; }
.t-green { color: var(--green); }
.t-cursor {
  display: inline-block;
  animation: caret 1.2s step-end infinite;
  color: var(--accent);
}
@keyframes caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===== CONTAINER ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== SECTIONS ===== */
section { padding: 100px 0; }
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: '//'; color: var(--accent2); font-weight: 700;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 56px;
  line-height: 1.15;
}

/* ===== ABOUT ===== */
#about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: 64px; align-items: center;
}
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
.about-img-wrap { position: relative; }
.about-img {
  width: 100%; border-radius: var(--radius-lg);
  aspect-ratio: 4/5; object-fit: cover;
  filter: grayscale(20%);
  border: 1px solid var(--border);
}
.about-img-badge {
  position: absolute; bottom: -16px; right: -16px;
  background: var(--accent); color: #000;
  padding: 10px 16px; border-radius: 8px;
  font-weight: 600; font-size: 0.85rem;
  box-shadow: 0 8px 30px rgba(0,212,255,0.3);
}
.about-text h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800; letter-spacing: -1px;
  margin-bottom: 20px; line-height: 1.2;
}
.about-text p {
  color: var(--muted); margin-bottom: 16px; line-height: 1.75;
}
.about-text p strong { color: var(--text); }
.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 6px 14px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  transition: border-color 0.2s;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }

/* ===== SKILLS ===== */
#skills { background: var(--bg); }
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.skill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px; transition: border-color 0.2s, transform 0.2s;
}
.skill-card:hover {
  border-color: rgba(0,212,255,0.3);
  transform: translateY(-3px);
}
.skill-icon { font-size: 1.8rem; margin-bottom: 14px; }
.skill-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.skill-card p { color: var(--muted); font-size: 0.87rem; line-height: 1.65; margin-bottom: 16px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.skill-tags span {
  background: rgba(0,212,255,0.07);
  border: 1px solid rgba(0,212,255,0.15);
  color: var(--accent); font-size: 0.72rem;
  padding: 3px 10px; border-radius: 100px; font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}
.skill-bar-wrap {
  height: 3px; background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.skill-bar {
  height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}
.skill-bar.animated { width: var(--w); }

/* ===== PROJECTS ===== */
#projects { background: var(--bg2); }
.projects-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
}
.project-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.project-card.featured {
  grid-column: span 1;
}
@media (min-width: 900px) {
  .project-card.featured {
    grid-column: span 2;
  }
  .project-card.featured .project-img { height: 260px; }
}
.project-img-wrap { position: relative; overflow: hidden; }
.project-img {
  width: 100%; height: 180px; object-fit: cover;
  transition: transform 0.4s;
  display: block;
}
.project-card:hover .project-img { transform: scale(1.05); }
.project-overlay {
  position: absolute; top: 12px; left: 12px;
}
.project-type {
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--accent); font-size: 0.72rem; font-weight: 600;
  padding: 4px 12px; border-radius: 100px;
  font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.05em;
}
.project-body { padding: 20px; }
.project-body h3 { font-size: 0.98rem; font-weight: 700; margin-bottom: 8px; }
.project-body p { color: var(--muted); font-size: 0.84rem; line-height: 1.65; margin-bottom: 14px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tech span {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  color: #a78bfa; font-size: 0.7rem; font-weight: 500;
  padding: 3px 9px; border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
}

/* ===== MARQUEE ===== */
#stack { background: var(--bg); padding: 80px 0; }
.stack-marquee-wrap { overflow: hidden; position: relative; }
.stack-marquee-wrap::before,
.stack-marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2;
}
.stack-marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.stack-marquee-wrap::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }
.stack-track {
  display: flex; gap: 12px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.stack-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 12px 22px; border-radius: 100px;
  font-size: 0.88rem; font-weight: 500; white-space: nowrap;
  transition: border-color 0.2s;
}
.stack-item:hover { border-color: var(--accent); }

/* ===== CONTACT ===== */
#contact { background: var(--bg2); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr;
  gap: 64px; align-items: start;
}
@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}
.contact-text h2 { margin-bottom: 20px; }
.contact-text p { color: var(--muted); margin-bottom: 16px; line-height: 1.75; }
.contact-links { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.contact-link {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--muted);
  font-size: 0.9rem; font-weight: 500;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
}
.contact-link:hover {
  border-color: var(--accent); color: var(--text);
  transform: translateX(4px);
}
.cl-icon { font-size: 1rem; }
.contact-form-wrap {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 32px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--muted); margin-bottom: 6px; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-group input, .form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
  color: var(--text); font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
  outline: none; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  border-color: var(--accent);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--muted); }

/* ===== FOOTER ===== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 24px;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { color: var(--muted); font-size: 0.82rem; }

/* ===== ACCENT ===== */
.accent { color: var(--accent); }

/* ===== ANIMATIONS ===== */
.fade-in {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .nav-links { display: none; }
  .hero-stats { gap: 16px; }
  .stat-n { font-size: 1.4rem; }
  .terminal-window { width: 100%; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
