/* ============================================
   RUHAB ASIM — PORTFOLIO STYLES
   Dark theme. Single accent color.
   ============================================ */

:root {
  /* Colors */
  --bg: #0a0a0f;
  --bg-elevated: #12121b;
  --bg-card: #15151f;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f3f7;
  --text-muted: #9797ab;
  --accent: #34e7c4;
  --accent-soft: rgba(52, 231, 196, 0.12);
  --live-dot: #34e7c4;

  /* Type */
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Layout */
  --container: 1100px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

/* ============ RESET ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* ============ BACKGROUND GRID ============ */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

.bg-grid::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, transparent 0%, var(--bg) 65%);
}

/* ============ NAVBAR ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  background: rgba(10, 10, 15, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), background var(--transition);
}

.navbar.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10, 10, 15, 0.85);
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.navbar__links {
  display: flex;
  gap: 36px;
}

.navbar__links a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

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

.navbar__links a:hover::after {
  width: 100%;
}

/* Hamburger toggle */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

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

.navbar__toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.97);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-menu__links a {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
}

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

/* ============ SHARED LAYOUT ============ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 120px 24px 0;
}

.section:last-of-type {
  padding-bottom: 120px;
}

.section__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--accent);
  color: #06150f;
}

.btn--primary:hover {
  background: #4ff3d2;
}

.btn--outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

/* ============ PILL BADGES ============ */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pill-badge--live {
  border-color: rgba(52, 231, 196, 0.3);
  color: var(--accent);
}

.pill-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-dot);
  box-shadow: 0 0 0 0 rgba(52, 231, 196, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 231, 196, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(52, 231, 196, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 231, 196, 0); }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 680px;
}

.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 6rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 35%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__subheading {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 600;
  color: var(--text);
}

.hero__paragraph {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.hero__scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.5); opacity: 0.4; }
}

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

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ ABOUT ============ */
.about__intro {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 56px;
  padding: 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about__avatar {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.about__intro-text {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.about__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--transition), border-color var(--transition);
}

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

.card__icon {
  display: inline-block;
  font-size: 1.6rem;
  margin-bottom: 14px;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card__body {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============ PROJECTS ============ */
.project-featured {
  display: block;
  background: linear-gradient(160deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

.project-featured::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.project-featured:hover {
  border-color: rgba(52, 231, 196, 0.35);
}

.project-featured__top {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.project-featured__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 14px;
}

.project-featured__desc {
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 22px;
}

.project-featured__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.tag {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.project-featured__link {
  position: relative;
  z-index: 1;
}

.projects__coming-soon {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.card--dimmed {
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  opacity: 0.6;
}

.badge-locked {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.card__coming-soon {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-muted);
}

/* ============ SKILLS ============ */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.skill-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

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

.skill-card__icon {
  font-size: 1.8rem;
}

.skill-card__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.skill-card:hover .skill-card__label {
  color: var(--text);
}

/* ============ CONTACT ============ */
.section--contact {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section--contact .section__label,
.section--contact .section__heading {
  width: 100%;
}

.contact__paragraph {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 32px;
  margin-top: -24px;
}

.contact__socials {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

/* ============ FOOTER ============ */
.footer {
  max-width: var(--container);
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer__top {
  transition: color var(--transition);
}

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

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .about__cards {
    grid-template-columns: 1fr;
  }

  .skills__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .projects__coming-soon {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .navbar__nav,
  .navbar__links {
    display: none;
  }

  .navbar__toggle {
    display: flex;
  }

  .section {
    padding: 80px 20px 0;
  }

  .section:last-of-type {
    padding-bottom: 80px;
  }

  .about__intro {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 18px 20px;
  }

  .hero {
    padding-top: 90px;
  }

  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    justify-content: center;
  }

  .section__heading {
    margin-bottom: 32px;
  }

  .project-featured {
    padding: 24px;
  }

  .skills__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .pill-badge__dot,
  .hero__scroll-line {
    animation: none;
  }

  .btn:hover,
  .card:hover,
  .skill-card:hover {
    transform: none;
  }
}
