/* ============================
   VARIABLES & RESET
=============================== */
:root {
  --bg-primary: #080b14;
  --bg-secondary: #0d1117;
  --bg-card: #0f1623;
  --bg-card-hover: #141d2e;
  --accent-green: #a855f7;
  --accent-cyan: #c084fc;
  --accent-purple: #7c3aed;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  --border: rgba(168, 85, 247, 0.15);
  --border-hover: rgba(168, 85, 247, 0.45);
  --glow: rgba(168, 85, 247, 0.15);
  --glow-cyan: rgba(192, 132, 252, 0.15);
  --font-mono: 'JetBrains Mono', monospace;
  --font-sans: 'Inter', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

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

/* ============================
   NAVBAR
=============================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 4%;
  background: rgba(8, 11, 20, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

#navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 32px;
  width: auto;
  opacity: 0.9;
  transition: opacity var(--transition), filter var(--transition);
}

.nav-logo:hover {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

.brand-bracket {
  color: var(--accent-green);
}

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

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
  padding-bottom: 2px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-green);
  transition: var(--transition);
}

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

.nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent-green);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================
   HERO
=============================== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 6%;
}

#matrix-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.terminal-tag {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.t-green { color: var(--accent-green); }
.t-cyan  { color: var(--accent-cyan); }
.t-out   { color: var(--text-secondary); margin-left: 0.5rem; }

.hero-logo {
  height: clamp(2.8rem, 7vw, 5rem);
  width: auto;
  margin-bottom: 1rem;
  display: block;
}

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

.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--accent-cyan);
  margin-bottom: 1.5rem;
  min-height: 2rem;
}

.cursor {
  animation: blink 1s step-end infinite;
  color: var(--accent-green);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--accent-green);
  color: #ffffff;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover {
  background: #9333ea;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--glow);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

.hero-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--accent-green);
  border-bottom: 2px solid var(--accent-green);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50%       { transform: rotate(45deg) translateY(8px); }
}

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

.section-dark {
  background: var(--bg-secondary);
}

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

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--accent-green);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  white-space: nowrap;
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 300px;
}

/* ============================
   ABOUT
=============================== */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  display: block;
}

.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: var(--transition);
}

.profile-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 40px var(--glow);
}

.profile-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.avatar-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(168,85,247,0.12), rgba(192,132,252,0.12));
  border: 2px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent-green);
  border-right-color: var(--accent-cyan);
  animation: spin 4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.profile-info {
  text-align: center;
}

.profile-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.profile-info p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--accent-green);
  margin-top: 0.5rem;
  font-family: var(--font-mono);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(168, 85, 247, 0); }
}

.terminal-snippet {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-sm);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.t-line {
  line-height: 1.8;
  color: var(--text-secondary);
}

/* ============================
   TIMELINE / EDUCATION
=============================== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-green), transparent);
}

.timeline-item {
  display: flex;
  gap: 2rem;
  padding-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-dot {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--accent-green);
  position: relative;
  z-index: 1;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  flex: 1;
  transition: var(--transition);
}

.timeline-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 30px var(--glow);
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  color: var(--accent-green);
  margin-top: 2px;
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

.card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.card-subtitle {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.card-badge {
  margin-left: auto;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.card-badge.active {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-green);
  border-color: rgba(168, 85, 247, 0.35);
}

.card-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* ============================
   TAGS
=============================== */
.card-tags, .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #b39ddb;
  background: rgba(109, 40, 217, 0.12);
  border: 1px solid rgba(109, 40, 217, 0.3);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
}

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

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.skill-category:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 30px var(--glow);
}

.skill-cat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.skill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  color: var(--accent-green);
}

.skill-icon svg {
  width: 22px;
  height: 22px;
}

.skill-cat-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.skill-name {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 140px;
}

.skill-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #c084fc);
  border-radius: 2px;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.skill-fill.animated {
  width: var(--w);
}

/* ============================
   PROJECTS
=============================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
  cursor: default;
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px var(--glow);
  transform: translateY(-4px);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.project-icon {
  display: flex;
  align-items: center;
  color: var(--accent-green);
}

.project-icon svg {
  width: 28px;
  height: 28px;
}

.project-links {
  display: flex;
  gap: 0.5rem;
}

.project-link {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.project-link svg {
  width: 18px;
  height: 18px;
}

.project-link:hover {
  color: var(--accent-green);
}

.project-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.projects-note {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* ============================
   CONTACT
=============================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.contact-item:hover {
  border-color: var(--border-hover);
  color: var(--accent-green);
  background: var(--glow);
  transform: translateX(4px);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  min-width: 20px;
  color: var(--accent-green);
}

.contact-icon svg {
  width: 18px;
  height: 18px;
}


.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-green);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: var(--transition);
  resize: vertical;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

.form-success {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-green);
  text-align: center;
  padding: 0.75rem;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.05);
}

.hidden { display: none; }

/* ============================
   FOOTER
=============================== */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2.5rem 6%;
  text-align: center;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  height: 22px;
  width: auto;
  display: block;
  margin: 0 auto 0.75rem;
  opacity: 0.75;
}

.footer-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem !important;
  margin-top: 0.25rem;
  color: var(--text-muted);
}

/* ============================
   RESPONSIVE
=============================== */
@media (max-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-visual { order: -1; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(8, 11, 20, 0.98);
    flex-direction: column;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 0.75rem;
  }

  .hamburger { display: flex; }

  .section { padding: 4rem 5%; }

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

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

  .about-stats { gap: 1.25rem; }

  .timeline::before { left: 14px; }
  .timeline-dot { width: 30px; height: 30px; min-width: 30px; }
  .timeline-item { gap: 1.25rem; }
}

@media (max-width: 480px) {
  .hero-logo { height: 2.2rem; }
  .section-title { font-size: 1.3rem; }
}

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

.hero-content > * {
  animation: fadeInUp 0.7s ease both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }
.hero-content > *:nth-child(6) { animation-delay: 0.6s; }
