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

:root {
  --bg:        #0a0a0f;
  --bg-card:   #12121a;
  --bg-alt:    #0e0e16;
  --surface:   #1a1a2e;
  --border:    #2a2a3e;
  --text:      #e0e0e8;
  --text-dim:  #8888a0;
  --accent:    #7c5cfc;
  --accent2:   #00d4aa;
  --gradient:  linear-gradient(135deg, #7c5cfc, #00d4aa);
  --radius:    14px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

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

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

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

/* ========== Navbar ========== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: var(--transition);
}
.nav-brand {
  font-size: 1.5rem; font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-size: .95rem; font-weight: 500;
  color: var(--text-dim);
  position: relative; padding: .25rem 0;
  transition: var(--transition);
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--gradient);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

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

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 8rem 3rem 4rem;
  gap: 4rem;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-greeting {
  font-size: 1.1rem; color: var(--accent2);
  font-weight: 500; margin-bottom: .5rem;
  letter-spacing: .5px;
}
.hero-name {
  font-size: 3.5rem; font-weight: 700; line-height: 1.15;
  margin-bottom: .75rem;
}
.hero-title {
  font-size: 1.25rem; color: var(--text-dim);
  margin-bottom: 1rem;
}
.hero-desc {
  font-size: 1rem; color: var(--text-dim); margin-bottom: 2rem;
  max-width: 460px;
}
.hero-buttons { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.75rem; border-radius: 10px;
  font-size: .95rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 24px rgba(124,92,252,.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124,92,252,.45); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: .5rem 1.2rem; font-size: .85rem; }
.btn-full { width: 100%; }

/* Code block visual */
.hero-visual { flex: 1; display: flex; justify-content: center; }
.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  width: 100%; max-width: 420px;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.code-header {
  display: flex; gap: 7px; padding: .75rem 1rem;
  background: var(--surface);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }
.code-block pre {
  padding: 1.25rem; font-size: .88rem; line-height: 1.7;
  overflow-x: auto;
}
.code-block code { font-family: 'Fira Code', 'SF Mono', monospace; }
.kw  { color: #c792ea; }
.fn  { color: #82aaff; }
.str { color: #c3e88d; }
.prop { color: #f78c6c; }

/* ========== Sections ========== */
.section {
  padding: 6rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}
.section-alt {
  max-width: none;
  background: var(--bg-alt);
}
.section-alt > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.section-title {
  font-size: 2.25rem; font-weight: 700;
  text-align: center; margin-bottom: 3rem;
}

/* ========== About ========== */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.about-text p { color: var(--text-dim); margin-bottom: 1rem; font-size: 1.05rem; }
.skills-container h3 { margin-bottom: 1.25rem; font-size: 1.2rem; }
.skills-grid { display: grid; gap: 1rem; }
.skill-card {
  display: grid; grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0 .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: var(--transition);
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.skill-icon { grid-row: 1 / 3; font-size: 1.5rem; align-self: center; }
.skill-name { font-weight: 600; font-size: .95rem; }
.skill-bar {
  grid-column: 2;
  height: 5px; background: var(--surface);
  border-radius: 4px; overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 4px;
}

/* ========== Projects ========== */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}
.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(124,92,252,.15);
}
.project-image {
  height: 200px;
  display: flex; align-items: center; justify-content: center;
}
.project-emoji { font-size: 4rem; }
.project-info { padding: 1.5rem; }
.project-info h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.project-info p { color: var(--text-dim); font-size: .9rem; margin-bottom: 1rem; }
.project-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tag {
  padding: .25rem .65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .75rem; color: var(--text-dim);
}

/* ========== Contact ========== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.contact-info p { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 1.5rem; }
.contact-links { display: grid; gap: .75rem; }
.contact-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
}
.contact-item:hover { border-color: var(--accent); transform: translateX(6px); }
.contact-icon { font-size: 1.3rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group input,
.form-group textarea {
  width: 100%; padding: .85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: .95rem;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,92,252,.15);
}
.form-group textarea { resize: vertical; }

/* ========== Footer ========== */
.footer {
  text-align: center; padding: 2rem;
  color: var(--text-dim); font-size: .9rem;
  border-top: 1px solid var(--border);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .navbar { padding: 1rem 1.5rem; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 70%;
    height: 100vh; flex-direction: column;
    background: var(--bg-card); padding: 5rem 2rem 2rem;
    gap: 1.5rem; transition: var(--transition);
    box-shadow: -4px 0 24px rgba(0,0,0,.4);
  }
  .nav-links.open { right: 0; }
  .nav-toggle { display: flex; }

  .hero { flex-direction: column; padding: 7rem 1.5rem 3rem; text-align: center; }
  .hero-name { font-size: 2.25rem; }
  .hero-desc { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-visual { width: 100%; }

  .section { padding: 4rem 1.5rem; }
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}