/* ============================================
   Mandeep Singh — SPA (Apple-style scroll)
   ============================================ */

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

:root {
  --bg: #0a0a0a;
  --bg-secondary: #111;
  --text: #f5f5f7;
  --text-muted: #86868b;
  --accent: #d4a853;
  --accent-hover: #e6be6a;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

/* ---- Navigation ---- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}

#navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.3s;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active::after,
.nav-link:hover::after {
  width: 100%;
}

.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: 1.5px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

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

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* ---- Section Common ---- */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 24px;
}

/* ---- Hero ---- */
.hero-section {
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.4) 0%,
    rgba(10, 10, 10, 0.6) 50%,
    rgba(10, 10, 10, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
  width: 100%;
}

.hero-subtitle {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-tagline {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 40px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s 0.8s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  border-color: var(--text);
  transform: translateY(-2px);
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 1.2s forwards;
}

.scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s infinite;
}

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

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

/* ---- About ---- */
.about-section {
  background: var(--bg);
  padding: 120px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  border-radius: 12px;
  transition: transform 0.6s;
}

.about-image:hover img {
  transform: scale(1.03);
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 28px;
}

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

.about-text p:first-of-type {
  font-size: 1.125rem;
  color: var(--text);
}

.about-text strong {
  color: var(--text);
  font-weight: 500;
}

.about-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.skill-tag {
  padding: 8px 18px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 50px;
  color: var(--accent);
  transition: all 0.3s;
}

.skill-tag:hover {
  background: rgba(212, 168, 83, 0.1);
  border-color: var(--accent);
}

/* ---- Reveal Animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ---- Projects ---- */
.projects-section {
  background: var(--bg-secondary);
  padding: 120px 0;
  display: block;
  min-height: auto;
}

.projects-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 80px;
}

.project {
  margin-bottom: 120px;
}

.project:last-child {
  margin-bottom: 0;
}

.project-sticky {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.project-visual {
  position: sticky;
  top: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.project-visual img {
  width: 100%;
  border-radius: 12px;
  transition: transform 0.6s;
}

.project-visual:hover img {
  transform: scale(1.03);
}

.project-number {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(212, 168, 83, 0.15);
  line-height: 1;
  display: block;
  margin-bottom: 16px;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.project-type {
  font-size: 0.875rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 36px;
}

.project-role {
  margin-bottom: 32px;
  padding-left: 20px;
  border-left: 2px solid rgba(212, 168, 83, 0.3);
}

.project-role h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: var(--text);
}

.project-role p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.project-role strong {
  color: var(--text);
  font-weight: 500;
}

/* ---- Contact ---- */
.contact-section {
  background: var(--bg);
  padding: 120px 0;
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 60px;
}

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

.contact-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 40px 32px;
  transition: all 0.4s;
}

.contact-card:hover {
  border-color: rgba(212, 168, 83, 0.3);
  transform: translateY(-4px);
}

.contact-icon {
  color: var(--accent);
  margin-bottom: 20px;
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.contact-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s;
}

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

/* ---- Footer ---- */
.footer {
  padding: 40px 0;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

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

/* ---- Mobile ---- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links .nav-link {
    font-size: 1.5rem;
    color: var(--text);
  }

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

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

  .about-image {
    max-width: 400px;
    margin: 0 auto;
  }

  .project-sticky {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-visual {
    position: relative;
    top: 0;
    max-width: 350px;
  }

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

  .hero-title {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .scroll-indicator {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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