/* ========================================
   Nadeem Aslam Portfolio
   Style: jonnyczar.com inspired
   Light, editorial, lots of whitespace
   ======================================== */

:root {
  --bg: #fafafa;
  --bg-white: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #999999;
  --accent: #1a1a1a;
  --border: #e8e8e8;
  --border-light: #f0f0f0;
  --radius: 16px;
  --transition: 0.25s ease;
  --max-width: 1200px;
  --android: #34a853;
  --ios: #007aff;
  --both: #8b5cf6;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

img {
  -webkit-user-drag: none;
  user-select: none;
}

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

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

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

/* ========================================
   Nav
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

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

.nav-logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

.nav-cta {
  color: var(--text) !important;
  font-weight: 600 !important;
}

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

.nav-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: var(--transition);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  padding: 160px 0 100px;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
}

.hero-text {
  flex: 1;
  max-width: 640px;
}

.hero-text h1 {
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -2px;
  margin-bottom: 28px;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}

.hero-socials {
  display: flex;
  gap: 28px;
}

.hero-socials a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.hero-socials a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--text);
  transition: var(--transition);
}

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

.hero-socials a:hover::after {
  width: 100%;
}

.hero-portrait {
  flex-shrink: 0;
}

.hero-portrait {
  flex-shrink: 0;
  position: relative;
}

.hero-portrait::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

.portrait-img {
  width: 420px;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.portrait-img:hover {
  filter: grayscale(0%);
}

/* ========================================
   Section labels
   ======================================== */

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ========================================
   Highlights
   ======================================== */

.highlights {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.highlight-card {
  padding-right: 20px;
}

.highlight-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 12px;
}

.highlight-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   About
   ======================================== */

.about {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

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

.about-left h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.about-right p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-details {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 48px;
}

.about-details div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-details strong {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

.about-details span {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ========================================
   Skills strip
   ======================================== */

.skills-strip {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.strip-scroll {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  width: max-content;
}

.strip-scroll span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.strip-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}

/* ========================================
   Work / Projects
   ======================================== */

.work {
  padding: 100px 0;
}

.work-heading {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 60px;
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding: 60px 0;
  border-top: 1px solid var(--border);
  transition: var(--transition);
}

.project:last-of-type {
  border-bottom: 1px solid var(--border);
}

.project:hover {
  opacity: 0.85;
}

.project.reverse {
  direction: rtl;
}

.project.reverse > * {
  direction: ltr;
}

.project-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.project-platform {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.project-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.project:hover .project-arrow {
  color: var(--text);
  transform: translate(3px, -3px);
}

.project-content h3 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.project-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-tags span {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.project-stat {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.project-icon {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  border-radius: 24px;
  object-fit: cover;
  margin: 0 auto;
  display: block;
}

/* More work */
.more-work {
  text-align: center;
  padding: 60px 0 0;
}

.more-work-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 700;
  transition: var(--transition);
  position: relative;
}

.more-work-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--text);
}

.more-work-link:hover {
  opacity: 0.6;
}

/* ========================================
   Experience
   ======================================== */

.experience {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}

.exp-list {
  margin-bottom: 48px;
}

.exp-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.exp-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.exp-right h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.exp-company {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-bottom: 12px;
}

.exp-right p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.education {
  padding-top: 24px;
}

/* ========================================
   Testimonials
   ======================================== */

.testimonials {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
}

.testimonial-card {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: var(--transition);
}

.testimonial-card:hover {
  border-color: #ccc;
}

.testimonial-stars {
  font-size: 0.9rem;
  color: #f5a623;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.testimonial-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.testimonial-author strong {
  font-size: 0.85rem;
  font-weight: 700;
}

.testimonial-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.testimonial-author span::before {
  content: '·';
  margin-right: 8px;
}

.testimonial-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.testimonial-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f5a623;
  background: rgba(245, 166, 35, 0.08);
  padding: 5px 14px;
  border-radius: 50px;
}

.testimonial-summary span:last-child {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========================================
   FAQ
   ======================================== */

.faq {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.faq-list {
  margin-top: 48px;
  max-width: 720px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 24px 0;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.25s ease;
}

.faq-item summary:hover {
  color: var(--text-secondary);
}

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  padding: 0 0 24px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 640px;
}

/* ========================================
   Contact
   ======================================== */

.contact {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-left h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
}

.contact-links {
  display: flex;
  flex-direction: column;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  transition: var(--transition);
}

.contact-link:last-child {
  border-bottom: 1px solid var(--border);
}

.contact-link:hover {
  padding-left: 8px;
}

.contact-link-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  width: 80px;
  flex-shrink: 0;
}

.contact-link-value {
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
}

.contact-link-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.contact-link:hover .contact-link-arrow {
  color: var(--text);
  transform: translateX(4px);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ========================================
   Animations
   ======================================== */

/* Fade up */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger children */
.stagger-children .fade-up:nth-child(1) { transition-delay: 0s; }
.stagger-children .fade-up:nth-child(2) { transition-delay: 0.08s; }
.stagger-children .fade-up:nth-child(3) { transition-delay: 0.16s; }
.stagger-children .fade-up:nth-child(4) { transition-delay: 0.24s; }
.stagger-children .fade-up:nth-child(5) { transition-delay: 0.32s; }
.stagger-children .fade-up:nth-child(6) { transition-delay: 0.40s; }

/* Hero entrance */
.hero-text {
  opacity: 0;
  transform: translateY(30px);
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-portrait {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

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

/* Nav slide down */
.nav {
  animation: navSlide 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes navSlide {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skill strip continuous scroll */
@keyframes stripScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.strip-scroll.animate {
  animation: stripScroll 25s linear infinite;
}

.strip-scroll.animate:hover {
  animation-play-state: paused;
}

/* Scale in for project icons */
.fade-up .project-icon {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.6s ease 0.2s, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}

.fade-up.visible .project-icon {
  opacity: 1;
  transform: scale(1);
}

/* Highlight number count-up feel */
.highlight-number {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.visible .highlight-number {
  animation: numberPop 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes numberPop {
  0% { transform: scale(0.7); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

/* Testimonial card hover lift */
.testimonial-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease, box-shadow 0.35s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Section label slide-in */
.section-label {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-label.visible {
  opacity: 1;
  transform: translateX(0);
}


/* ========================================
   Responsive
   ======================================== */

@media (max-width: 900px) {
  .section-inner,
  .nav-inner,
  .hero-inner {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(250, 250, 250, 0.98);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 99;
  }

  .nav-links.active {
    display: flex;
  }

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

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

  .nav-toggle.active span:first-child {
    transform: rotate(45deg) translate(3px, 3px);
  }

  .nav-toggle.active span:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 40px;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

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

  .portrait-img {
    width: 260px;
  }

  .hero-portrait::after {
    height: 80px;
  }

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

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

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

  .project.reverse {
    direction: ltr;
  }

  .project-content h3 {
    font-size: 1.3rem;
  }

  .exp-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .about-details {
    flex-direction: column;
    gap: 20px;
  }

  .highlights, .about, .work, .experience, .testimonials, .faq, .contact {
    padding: 60px 0;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 32px;
  }

  .testimonial-card {
    padding: 24px;
  }

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

@media (max-width: 480px) {
  .hero {
    padding: 100px 0 40px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
    letter-spacing: -1px;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .portrait-img {
    width: 200px;
  }

  .hero-portrait::after {
    height: 60px;
  }

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

  .highlight-number {
    font-size: 2.2rem;
  }

  .highlight-card p {
    font-size: 0.82rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .about-left h2,
  .contact-left h2 {
    font-size: 1.5rem;
  }

  .about-right p {
    font-size: 0.92rem;
  }

  .strip-scroll {
    gap: 16px;
  }

  .strip-scroll span {
    font-size: 0.78rem;
  }

  .project-content h3 {
    font-size: 1.1rem;
  }

  .project-icon {
    max-width: 140px;
  }

  .exp-right h3 {
    font-size: 1rem;
  }

  .contact-link-label {
    width: 60px;
    font-size: 0.68rem;
  }

  .contact-link-value {
    font-size: 0.85rem;
  }

  .testimonial-card p {
    font-size: 0.88rem;
  }

  .testimonial-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
