/* =========================================================
   MUHAMMED IRSHAD — PORTFOLIO
   ========================================================= */

:root {
  --primary: #000000;
  --secondary: #f0eee9;
  --accent: #ffb400;
  --white: #ffffff;
  --muted: rgba(240, 238, 233, .62);
  --dark-line: rgba(240, 238, 233, .16);
  --light-line: rgba(0, 0, 0, .14);
  --heading-size: 80px;
  --heading-line: 80px;
  --section-heading: 40px;
  --body-size: 16px;
  --gutter: clamp(22px, 5vw, 80px);
}

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

html {
  scroll-behavior: auto;
  background: var(--primary);
}

body {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-size: var(--body-size);
  line-height: 1.5;
  color: var(--secondary);
  background: var(--primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-loading { overflow: hidden; }

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

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

button, a { -webkit-tap-highlight-color: transparent; }

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: var(--primary);
  pointer-events: none;
}

.loader-line {
  width: 0;
  height: 2px;
  background: var(--accent);
}

/* NAV */
.site-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gutter);
  color: var(--white);
  mix-blend-mode: difference;
}

.brand {
  width: 112px;
  display: flex;
  align-items: center;
}

.brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.site-nav nav {
  display: flex;
  gap: 25px;
}

.site-nav nav a,
.nav-cta {
  font-size: 13px;
  opacity: .78;
  transition: opacity .25s ease, color .25s ease;
}

.site-nav nav a:hover,
.nav-cta:hover { opacity: 1; }

.nav-cta {
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
}

.nav-cta span { color: var(--accent); }

/* SHARED */
.section-wrap {
  width: min(1400px, calc(100% - (var(--gutter) * 2)));
  margin: 0 auto;
}

.section-dark { background: var(--primary); color: var(--secondary); }
.section-light { background: var(--secondary); color: var(--primary); }

.eyebrow {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .6;
  margin-bottom: 25px;
}

h1, h2, h3, h4 {
  font-weight: 400;
}

h1, h2 {
  letter-spacing: -3px;
  line-height: 1;
}

h2 { font-size: var(--section-heading); }

p { font-size: var(--body-size); font-weight: 400; }

.reveal {
  opacity: 0;
  transform: translateY(35px);
}

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

/* HERO */
.hero-shell {
  position: relative;
  height: 100svh;
  min-height: 620px;
  z-index: 1;
}

.hero {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 620px;
  overflow: hidden;
  background: var(--secondary);
  color: var(--primary);
}

.hero-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}

.hero .eyebrow {
  position: absolute;
  top: 116px;
  left: var(--gutter);
}

.hero h1 {
  font-size: var(--heading-size);
  line-height: var(--heading-line);
  letter-spacing: -3px;
  text-align: center;
}

.hero h1 span { color: var(--accent); }

.hero-bottom {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .55;
}

.scroll-mark { font-size: 22px; color: var(--accent); }

/* ABOUT */
.about {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  z-index: 2;
  padding: 110px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(360px, 1.2fr);
  gap: clamp(50px, 9vw, 160px);
  align-items: center;
}

.about-title h2 {
  font-size: clamp(55px, 6vw, 96px);
  line-height: .94;
  letter-spacing: -4px;
}

.role { margin-top: 25px; color: var(--accent); }

.portrait-wrap {
  width: min(100%, 470px);
  aspect-ratio: 4 / 4.5;
  margin-bottom: 38px;
  overflow: hidden;
  background: #111;
  border-radius: 4px;
}

.portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(100%);
  transition: filter .5s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}

.portrait-wrap:hover img {
  filter: grayscale(0%);
  transform: scale(1.025);
}

.intro {
  max-width: 650px;
  color: var(--muted);
  margin-bottom: 50px;
}

.info-block {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--dark-line);
  border-bottom: 1px solid var(--dark-line);
  margin-bottom: 50px;
}

.info-block .label { color: var(--muted); }
.info-block a { transition: color .25s ease; }
.info-block a:hover { color: var(--accent); }

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

.stat {
  min-height: 105px;
  padding-right: 12px;
  border-right: 1px solid var(--dark-line);
}

.stat:last-child { border-right: 0; }

.stat strong {
  font-size: clamp(38px, 4vw, 60px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -2px;
}

.stat > span { color: var(--accent); font-size: 28px; }

.stat small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

/* WORKS */
.works {
  position: relative;
  z-index: 3;
  padding: clamp(110px, 12vw, 170px) 0;
}

.works-heading {
  display: grid;
  grid-template-columns: minmax(300px, .75fr) minmax(300px, 1fr);
  gap: 50px;
  align-items: end;
  margin-bottom: 80px;
}

.works-heading h2 {
  font-size: clamp(65px, 8vw, 120px);
  line-height: .9;
  letter-spacing: -5px;
}

.disclaimer {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
  padding-bottom: 4px;
}

.work-carousels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(35px, 5vw, 80px);
}

.work-carousel { min-width: 0; }

.carousel-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 18px;
}

.carousel-heading h3 {
  font-size: 24px;
  letter-spacing: -1px;
}

.carousel-count {
  color: var(--muted);
  font-size: 11px;
}

.carousel-count b {
  color: var(--accent);
  font-weight: 400;
}

.carousel-viewport {
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: #111;
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  background: var(--secondary);
  color: var(--primary);
}

.project-image {
  width: 100%;
  aspect-ratio: 2563 / 1230;
  overflow: hidden;
  background: #ddd;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}

.carousel-slide:hover .project-image img { transform: none; }

.project-meta {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 18px;
  border-top: 1px solid rgba(0,0,0,.12);
}

.project-meta h4 {
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -.5px;
}

.project-meta span {
  color: rgba(0,0,0,.55);
  font-size: 11px;
  text-align: right;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border: 1px solid var(--dark-line);
  border-radius: 50%;
  background: transparent;
  color: var(--secondary);
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 20px;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.carousel-btn:disabled {
  opacity: .25;
  cursor: default;
}

/* SERVICES */
.services {
  position: relative;
  z-index: 4;
  padding: clamp(110px, 12vw, 180px) 0;
}

.services-intro {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 90px;
}

.services-intro h2 {
  font-size: clamp(60px, 8vw, 110px);
  line-height: .9;
  letter-spacing: -5px;
}

.services-intro > p:last-child {
  grid-column: 2;
  max-width: 540px;
  color: rgba(0,0,0,.58);
}

.service-list {
  border-top: 1px solid var(--light-line);
}

.service-item {
  display: grid;
  grid-template-columns: 55px 1fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--light-line);
}

.service-item > span {
  font-size: 10px;
  opacity: .45;
}

.service-item h3 {
  font-size: 27px;
  letter-spacing: -1px;
}

.service-item p {
  max-width: 470px;
  color: rgba(0,0,0,.58);
}

/* TOOLS */
.tools {
  position: relative;
  z-index: 4;
  padding: clamp(110px, 12vw, 180px) 0;
}

.tools-layout {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: clamp(50px, 9vw, 140px);
  align-items: start;
}

.tools-heading h2 {
  font-size: clamp(60px, 7vw, 100px);
  line-height: .9;
  letter-spacing: -5px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--dark-line);
}

.tool {
  min-height: 100px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 12px 22px 0;
  border-bottom: 1px solid var(--dark-line);
}

.tool:nth-child(odd) {
  border-right: 1px solid var(--dark-line);
  padding-right: 25px;
}

.tool:nth-child(even) { padding-left: 25px; }

.tool span {
  font-size: 10px;
  color: var(--muted);
}

.tool strong {
  font-size: 19px;
  font-weight: 400;
  letter-spacing: -.5px;
}

/* EXPERIENCE */
.experience {
  position: relative;
  z-index: 4;
  padding: clamp(100px, 12vw, 180px) 0;
}

.section-heading { margin-bottom: 100px; }

.section-heading h2 {
  font-size: clamp(50px, 7vw, 92px);
  line-height: .95;
  letter-spacing: -4px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 900px);
  gap: 0;
}

.column-title {
  font-size: 20px;
  font-weight: 400;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--light-line);
}

.timeline-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 20px;
  padding: 27px 0;
  border-bottom: 1px solid var(--light-line);
}

.timeline-number {
  font-size: 10px;
  opacity: .45;
  padding-top: 6px;
}

.timeline-item h4 {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -1px;
}

.position {
  font-style: italic;
  opacity: .58;
  margin-top: 5px;
}

.timeline-item small {
  display: block;
  margin-top: 9px;
  font-size: 11px;
  opacity: .55;
}

/* CONTACT */
.contact {
  position: relative;
  min-height: 100svh;
  padding: clamp(100px, 12vw, 170px) 0 100px;
  z-index: 5;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(50px, 10vw, 150px);
  min-height: calc(100svh - 280px);
  align-items: center;
}

.contact-heading h2 {
  font-size: clamp(60px, 8vw, 120px);
  line-height: .88;
  letter-spacing: -5px;
}

.contact-intro {
  max-width: 500px;
  color: var(--muted);
  margin-bottom: 55px;
}

.contact-list { border-top: 1px solid var(--dark-line); }

.contact-list a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 0;
  border-bottom: 1px solid var(--dark-line);
  transition: color .25s ease;
}

.contact-list a:hover { color: var(--accent); }
.contact-list span { color: var(--muted); }
.contact-list strong { font-weight: 400; text-align: right; }

.socials {
  display: flex;
  gap: 10px;
  margin-top: 38px;
}

.socials a {
  width: 44px;
  height: 44px;
  border: 1px solid var(--dark-line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}

.socials a:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}

.site-footer {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 25px;
  padding-top: 18px;
  border-top: 1px solid var(--dark-line);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

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

/* RESPONSIVE */
@media (max-width: 1050px) {
  .site-nav nav { gap: 16px; }
  .site-nav nav a { font-size: 11px; }

  .work-carousels { gap: 30px; }

  .about-grid { gap: 60px; }
}

@media (max-width: 900px) {
  :root {
    --heading-size: clamp(54px, 13vw, 80px);
    --heading-line: clamp(55px, 13vw, 80px);
  }

  .site-nav { height: 65px; }
  .site-nav nav { display: none; }
  .brand { width: 92px; }

  .about-grid,
  .timeline-grid,
  .contact-grid,
  .tools-layout {
    grid-template-columns: 1fr;
  }

  .about {
    padding: 100px 0;
  }

  .about-grid { gap: 70px; }
  .about-info { max-width: 700px; }

  .portrait-wrap {
    width: min(100%, 520px);
    aspect-ratio: 16 / 11;
  }

  .portrait-wrap img { object-position: center 22%; }

  .works { padding: 100px 0; }

  .works-heading {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 55px;
  }

  .works-heading h2 { font-size: clamp(55px, 15vw, 90px); }
  .disclaimer { max-width: 620px; font-size: 13px; }

  .work-carousels { grid-template-columns: 1fr; gap: 65px; }

  .services-intro {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 65px;
  }

  .services-intro h2 { font-size: clamp(55px, 15vw, 90px); }
  .services-intro > p:last-child { grid-column: 1; }

  .service-item {
    grid-template-columns: 45px 1fr;
    gap: 15px 20px;
  }

  .service-item p {
    grid-column: 2;
    margin-top: -8px;
  }

  .tools-layout { gap: 70px; }
  .tools-heading h2 { font-size: clamp(55px, 15vw, 90px); }

  .experience { padding-top: 100px; }
  .section-heading { margin-bottom: 60px; }

  .contact-grid {
    min-height: auto;
    padding-bottom: 100px;
  }
}

@media (max-width: 560px) {
  .hero .eyebrow { top: 95px; }
  .hero h1 { letter-spacing: -2px; }

  .nav-cta { font-size: 11px; }

  .stats { gap: 8px; }

  .stat {
    min-height: 95px;
    padding-right: 8px;
  }

  .stat strong { font-size: 34px; }
  .stat > span { font-size: 20px; }
  .stat small { font-size: 9px; }

  .info-block { display: block; }
  .info-block a { display: block; margin-top: 7px; }

  .works-heading { margin-bottom: 42px; }
  .works-heading h2 { font-size: 58px; }
  .disclaimer { font-size: 11px; line-height: 1.55; }

  .carousel-heading h3 { font-size: 20px; }
  .project-meta {
    min-height: 62px;
    padding: 0 12px;
    gap: 10px;
  }
  .project-meta h4 { font-size: 14px; }
  .project-meta span { font-size: 9px; }

  .carousel-controls { margin-top: 15px; }
  .carousel-btn {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .service-item h3 { font-size: 21px; }
  .service-item p { font-size: 13px; }

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

  .tool,
  .tool:nth-child(odd),
  .tool:nth-child(even) {
    border-right: 0;
    padding: 20px 0;
  }

  .tool strong { font-size: 17px; }

  .timeline-item h4 { font-size: 20px; }

  .contact-heading h2 { letter-spacing: -3px; }

  .contact-list a { display: block; }
  .contact-list strong {
    display: block;
    text-align: left;
    margin-top: 6px;
  }

  .site-footer {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    margin: 0 var(--gutter);
    padding-bottom: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .carousel-track { transition: none; }
}
