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

:root {
  --bg:       #0a0a0b;
  --bg-alt:   #111113;
  --card:     #18181b;
  --border:   #27272a;
  --text:     #fafafa;
  --muted:    #a1a1aa;
  --accent:   #6366f1;
  --accent2:  #a855f7;
  --gradient: linear-gradient(135deg, var(--accent), var(--accent2));
  --radius:   12px;
  --font:     "Inter", system-ui, sans-serif;
  --heading:  "Sora", var(--font);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

.section {
  padding: 100px 0;
}

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

.section-title {
  font-family: var(--heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.25;
  margin: 12px 0 40px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

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

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.btn-small {
  padding: 8px 20px;
  font-size: 0.8rem;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}

/* ========== NAVIGATION ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 11, 0.8);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.2rem;
}

.logo span {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text);
  cursor: pointer;
}

/* ========== HERO ========== */
.hero {
  padding: 140px 0 100px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.greeting {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--heading);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
}

.typed-wrap {
  display: inline-block;
  font-family: var(--heading);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 8px;
  min-height: 2rem;
}

.cursor {
  animation: blink 1s infinite;
  -webkit-text-fill-color: var(--accent);
}

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

.subtitle {
  color: var(--muted);
  margin-top: 16px;
  max-width: 480px;
  font-size: 0.95rem;
}

.hero-cta {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stats strong {
  display: block;
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 700;
}

.hero-stats span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* --- Profile Card --- */
.profile-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.profile-card h3 {
  font-family: var(--heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-card > p {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.tags span {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.status {
  margin-top: 24px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  color: #22c55e;
  font-size: 0.78rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}

/* ========== ABOUT ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  font-size: 0.95rem;
  color: var(--muted);
}

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

/* ========== PROJECTS ========== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.link {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.link:hover { text-decoration: underline; }

.projects {
  display: grid;
  gap: 24px;
}

.project-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.8);
}

.gradient-1 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.gradient-2 { background: linear-gradient(135deg, #0ea5e9, #06b6d4); }
.gradient-3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }

.project-body { padding: 24px 28px; }

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.project-body h3 {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-body p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

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

.project-links span {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

/* ========== SKILLS ========== */
.skills {
  display: grid;
  gap: 20px;
  max-width: 640px;
}

.skill span {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar i.animated { transform: scaleX(1); }

/* ========== CONTACT ========== */
.contact-box {
  max-width: 680px;
  margin: 0 auto;
}

.contact-form {
  margin-top: 32px;
}

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

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  transition: border-color 0.2s;
  resize: none;
}

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

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .btn { width: 100%; justify-content: center; margin-top: 4px; }

.form-note {
  margin-top: 12px;
  font-size: 0.82rem;
  text-align: center;
}

.form-note.success { color: #22c55e; }
.form-note.error   { color: #ef4444; }

.socials {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.socials a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}

.socials a:hover { color: var(--accent); }

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}

#toTop {
  color: var(--muted);
  transition: color 0.2s;
}

#toTop:hover { color: var(--text); }

/* ========== REVEAL ANIMATION ========== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.96);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }
  .hamburger { display: block; }
  .nav-actions .btn-small { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .subtitle { margin: 16px auto 0; }

  .hero-cta { justify-content: center; }

  .hero-stats {
    justify-content: center;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-thumb {
    height: 120px;
  }

  .contact-form .row {
    grid-template-columns: 1fr;
  }

  .section { padding: 64px 0; }
}

@media (max-width: 480px) {
  .hero-stats { gap: 20px; }
  .hero-stats strong { font-size: 1.4rem; }
}
