/* ============================================
   SHAHRIYAR AHMAD — Portfolio
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg:        #0e0e0e;
  --bg-2:      #141414;
  --bg-3:      #1a1a1a;
  --text:      #f0ece6;
  --text-dim:  #7a7570;
  --text-mid:  #b0aa9f;
  --accent:    #c8b89a;
  --line:      rgba(255,255,255,0.07);
  --font-sans: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --ease:      cubic-bezier(0.76, 0, 0.24, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  cursor: none;
}

a { color: inherit; text-decoration: none; cursor: none; }
img { display: block; width: 100%; height: auto; }
button { cursor: none; font-family: var(--font-sans); }
* { cursor: none; }
img { opacity: 1 !important; }

/* ============================================
   INTRO OVERLAY
   ============================================ */
.intro {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
}

.intro.hidden {
  pointer-events: none;
}

.intro-inner {
  text-align: center;
  user-select: none;
}

.intro-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 2rem;
  opacity: 0;
}

.intro-name {
  font-family: var(--font-sans);
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--text);
  margin-bottom: 2rem;
  opacity: 0;
}

.intro-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-mid);
  margin-bottom: 4rem;
  opacity: 0;
}

.intro-enter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.intro-enter span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.intro-line {
  width: 1px;
  height: 48px;
  background: var(--accent);
  transform-origin: top center;
  animation: intro-line-pulse 2s ease-in-out infinite;
}

@keyframes intro-line-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.15); }
}

/* ============================================
   CURSOR
   ============================================ */
.cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 20003;
  transform: translate(-50%, -50%);
  transition: width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s;
}

.cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(200, 184, 154, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 20002;
  transform: translate(-50%, -50%);
  transition: transform 0.12s var(--ease-out), width 0.3s var(--ease), height 0.3s var(--ease);
}

body:has(a:hover) .cursor,
body:has(button:hover) .cursor {
  width: 14px;
  height: 14px;
}

body:has(a:hover) .cursor-follower,
body:has(button:hover) .cursor-follower {
  width: 60px;
  height: 60px;
  border-color: rgba(200, 184, 154, 0.2);
}

/* ============================================
   NAVIGATION
   ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 3rem;
  transition: background 0.4s, padding 0.4s;
}

nav.scrolled {
  background: rgba(14,14,14,0.92);
  backdrop-filter: blur(12px);
  padding: 1rem 3rem;
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: color 0.2s;
}
.nav-logo:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.nav-menu-btn.open span:first-child { transform: translateY(6px) rotate(45deg); }
.nav-menu-btn.open span:last-child  { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-link {
  font-size: 3rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s;
}
.mobile-link:hover { color: var(--text); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 3rem 5rem;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero-content {
  max-width: 900px;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(16px);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line span {
  display: block;
  transform: translateY(100%);
}

.hero-sub {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  opacity: 0;
  transform: translateY(12px);
}

.hero-scroll {
  position: absolute;
  bottom: 3rem;
  right: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  opacity: 0;
}

.hero-scroll span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  writing-mode: vertical-rl;
}

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

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================
   WORK / PROJECTS
   ============================================ */
.work {
  padding: 6rem 3rem;
}

.work-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2rem;
}

.section-title {
  font-size: clamp(0.7rem, 1vw, 0.8rem);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-dim);
  border-radius: 2px;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,184,154,0.05);
}

/* Project grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.project-card {
  background: var(--bg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.project-card.in-view {
  opacity: 1;
  transform: none;
}

.project-card.hidden {
  display: none;
}

.project-link {
  display: block;
}

.project-img-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
  position: relative;
}

.project-img {
  width: 100%;
  height: 100%;
  background: var(--bg-3);
  transition: transform 0.7s var(--ease);
  object-fit: cover;
  display: block;
}

.project-img.placeholder {
  background: radial-gradient(
    ellipse at 30% 40%,
    color-mix(in srgb, var(--accent) 25%, var(--bg-3)),
    var(--bg-3) 70%
  );
}

.project-img.has-image {
  background-size: cover;
  background-position: center;
}

.project-card:hover .project-img {
  transform: scale(1.04);
}

.project-info {
  padding: 1.5rem 1.5rem 2rem;
  border-top: 1px solid var(--line);
}

.project-category {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.project-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: block;
  margin-bottom: 0.5rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 0.4rem;
  color: var(--text);
  transition: color 0.2s;
}
.project-card:hover .project-title { color: var(--accent); }

.project-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ============================================
   ABOUT
   ============================================ */
.about {
  padding: 8rem 3rem;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 6rem;
  align-items: start;
  max-width: 1200px;
}

.about-bio {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.detail-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.detail-value {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-mid);
}

.about-photo {
  position: sticky;
  top: 7rem;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  border: 1px solid var(--line);
}

/* Button */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 2px;
  transition: background 0.25s, color 0.25s;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  padding: 8rem 3rem;
  border-top: 1px solid var(--line);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  max-width: 1200px;
}

.contact-sub {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-mid);
  margin: 1.5rem 0 2.5rem;
  max-width: 360px;
}

.contact-links {
  display: flex;
  gap: 1.5rem;
}

.social-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.social-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea {
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.btn-submit {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  border-radius: 2px;
  transition: background 0.25s, color 0.25s;
}
.btn-submit:hover {
  background: var(--accent);
  color: var(--bg);
}

.form-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  min-height: 1.2em;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  opacity: 0.5;
}
.footer-email {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

/* ============================================
   PROJECT PAGE (shared)
   ============================================ */
.project-hero {
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  padding: 0 3rem 4rem;
  position: relative;
  background: var(--bg-3);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.project-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  transition: transform 10s linear;
}

.project-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
  z-index: 0;
}

.project-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.project-hero-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.project-hero-label::before {
  content: '';
  display: block;
  width: 30px;
  height: 1px;
  background: var(--accent);
}

.project-hero h1 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.project-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 2px;
}

.project-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 3rem;
}

.project-intro {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 6rem;
  margin-bottom: 6rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
}

.project-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-mid);
}

.project-description p + p {
  margin-top: 1.2em;
}

.project-meta-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.meta-item:last-child { border-bottom: none; }

.meta-key {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.meta-val {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.5;
}

.project-images {
  display: grid;
  gap: 1px;
  background: var(--line);
}
.project-images.cols-2 { grid-template-columns: 1fr 1fr; }
.project-images.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.project-images.cols-1 { grid-template-columns: 1fr; }

.project-image-item {
  background: var(--bg-3);
  overflow: hidden;
}
.project-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.project-image-item.tall { aspect-ratio: 3/4; }
.project-image-item.wide { aspect-ratio: 16/9; }
.project-image-item.square { aspect-ratio: 1/1; }

.project-quote {
  padding: 5rem 3rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  max-width: 1200px;
  margin: 4rem auto;
}

.project-quote blockquote {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-mid);
  max-width: 800px;
}

.project-quote cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-style: normal;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3rem;
  border-top: 1px solid var(--line);
}

.project-nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.project-nav-link:hover { color: var(--accent); }
.project-nav-link .arrow { font-size: 1rem; }

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  /* y-only reveal — opacity handled by GSAP or always visible */
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .about-inner {
    grid-template-columns: 1fr 300px;
    gap: 4rem;
  }
}

@media (max-width: 768px) {
  nav { padding: 1.25rem 1.5rem; }
  nav.scrolled { padding: 1rem 1.5rem; }

  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }

  .hero { padding: 0 1.5rem 4rem; }
  .hero-scroll { right: 1.5rem; }

  .work { padding: 4rem 1.5rem; }
  .work-header { flex-direction: column; align-items: flex-start; }

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

  .about { padding: 5rem 1.5rem; }
  .about-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .about-photo { position: static; }
  .about-details { grid-template-columns: 1fr; gap: 1.5rem; }

  .contact { padding: 5rem 1.5rem; }
  .contact-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer {
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-hero { padding: 0 1.5rem 3rem; }
  .project-body { padding: 4rem 1.5rem; }
  .project-intro {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .project-images.cols-2,
  .project-images.cols-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .filters { gap: 0.4rem; }
  .filter-btn { font-size: 0.62rem; padding: 0.35rem 0.75rem; }
  * { cursor: auto !important; }
  .cursor, .cursor-follower { display: none; }
}
