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

:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --text: #e4e4e7;
  --text-muted: #8888a0;
  --accent: #6c63ff;
  --accent-hover: #7f78ff;
  --border: #1e1e2a;
  --card-bg: #14141e;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --max-width: 1100px;
  --transition: .3s cubic-bezier(.4, 0, .2, 1);
}

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

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* ─── Nav ─── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(10, 10, 15, .8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 24px rgba(0, 0, 0, .3);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.nav-logo:hover {
  color: var(--accent);
}

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

.nav-links a {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: color var(--transition);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero ─── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero-greeting {
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: .75rem;
  letter-spacing: .04em;
}

.hero-name {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1.15;
  margin-top: .25rem;
}

.hero-description {
  max-width: 520px;
  color: var(--text-muted);
  margin-top: 1.5rem;
  font-size: 1.05rem;
}

.hero .btn {
  margin-top: 2.5rem;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: .4; transform: scaleY(.6); }
}

/* ─── Fade-up animation ─── */

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp .7s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Scroll reveal ─── */

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s ease, transform .6s ease;
}

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

/* ─── Sections ─── */

.section {
  padding: 7rem 2rem;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  max-width: 300px;
}

/* ─── About ─── */

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

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.about-image-wrapper {
  position: relative;
}

.about-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 2px solid var(--accent);
  border-radius: 12px;
  z-index: -1;
  transition: inset var(--transition);
}

.about-image-wrapper:hover::after {
  inset: 8px -8px -8px 8px;
}

.about-image-placeholder {
  aspect-ratio: 1;
  background: var(--card-bg);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.about-image-placeholder svg {
  width: 48px;
  height: 48px;
}

.about-image-placeholder span {
  font-size: .85rem;
}

/* ─── Projects ─── */

.projects-grid {
  display: grid;
  gap: 2rem;
}

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

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

.project-image {
  background: var(--bg-secondary);
}

.project-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--border);
}

.project-info {
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.project-description {
  color: var(--text-muted);
  font-size: .925rem;
  flex: 1;
}

.project-tech {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}

.project-tech li {
  font-size: .75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(108, 99, 255, .1);
  padding: .25rem .7rem;
  border-radius: 100px;
}

.project-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.project-link {
  color: var(--text-muted);
  transition: color var(--transition);
}

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

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

/* ─── Skills / Proficiency Bars ─── */

.proficiency-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 3rem;
}

.proficiency-item {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.proficiency-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proficiency-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: .95rem;
}

.proficiency-badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .6rem;
  border-radius: 100px;
}

.proficiency-badge.expert {
  color: #34d399;
  background: rgba(52, 211, 153, .12);
}

.proficiency-badge.advanced {
  color: #60a5fa;
  background: rgba(96, 165, 250, .12);
}

.proficiency-badge.intermediate {
  color: #fbbf24;
  background: rgba(251, 191, 36, .12);
}

.proficiency-badge.beginner {
  color: #f87171;
  background: rgba(248, 113, 113, .12);
}

.proficiency-track {
  height: 8px;
  background: var(--border);
  border-radius: 100px;
  overflow: hidden;
}

.proficiency-fill {
  height: 100%;
  width: var(--fill);
  border-radius: 100px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(.22, 1, .36, 1);
}

.proficiency-fill.animate {
  transform: scaleX(1);
}

.proficiency-fill.expert {
  background: linear-gradient(90deg, #34d399, #10b981);
}

.proficiency-fill.advanced {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.proficiency-fill.intermediate {
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
}

.proficiency-fill.beginner {
  background: linear-gradient(90deg, #f87171, #ef4444);
}

/* ─── Contact ─── */

.contact-container {
  text-align: center;
  max-width: 600px;
}

.contact-text {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.contact-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

.contact-socials a {
  color: var(--text-muted);
  transition: color var(--transition), transform var(--transition);
}

.contact-socials a:hover {
  color: var(--accent);
  transform: translateY(-3px);
}

.contact-socials svg {
  width: 22px;
  height: 22px;
}

/* ─── Button ─── */

.btn {
  display: inline-block;
  padding: .85rem 2rem;
  font-size: .9rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all var(--transition);
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, .25);
}

/* ─── Footer ─── */

.footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
}

/* ─── Responsive ─── */

@media (max-width: 900px) {
  .proficiency-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

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

  .about-image-wrapper {
    max-width: 280px;
  }

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

  .project-image-placeholder {
    min-height: 180px;
  }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    inset: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 1.25rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 200;
  }

  .section {
    padding: 5rem 1.25rem;
  }

  .proficiency-grid {
    gap: 1rem;
  }

  .hero {
    padding: 0 1.25rem;
  }
}
