/* =============================================
   NUPUR AHSAN — Portfolio
   ============================================= */

@font-face {
  font-family: 'DrukCond-Super';
  src: url('fonts/DrukCond-Super.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DrukWide-Medium';
  src: url('fonts/DrukWide-Medium.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'KlarheitGrotesk';
  src: url('fonts/KlarheitGrotesk-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:           #E5DCCF;
  --ink:          #242424;
  --font-display: 'DrukCond-Super', sans-serif;
  --font-nav:     'DrukWide-Medium', sans-serif;
  --font-body:    'KlarheitGrotesk', 'Helvetica Neue', sans-serif;
  --nav-h:        52px;
  --site-max:     1440px;
  --site-pad:     clamp(24px, 4vw, 80px);
}

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

html { scroll-behavior: auto; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* Centre + cap the whole site */
  max-width: var(--site-max);
  margin-inline: auto;
  box-shadow: 1px 0 0 rgba(36,36,36,0.12), -1px 0 0 rgba(36,36,36,0.12);
}

/* Hide scrollbar but keep scroll functionality */
html {
  scrollbar-width: none; /* Firefox */
}
html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

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

/* Screen-reader-only utility — visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Custom cursor — desktop only */
@media (pointer: fine) {
  body, a, button, input, textarea, select, [data-img], label {
    cursor: none !important;
  }

  .custom-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 12px; height: 12px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, background 0.2s ease, width 0.2s ease, height 0.2s ease;
    mix-blend-mode: difference;
  }

  .custom-cursor.hover {
    width: 24px;
    height: 24px;
    background: #fff;
  }
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  /* horizontally centred and capped — mirrors body's max-width */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--site-max);
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  display: flex;
  align-items: center;
  padding: 0 28px;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  width: 100%;
  justify-content: space-between;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.nav-item.active .nav-dot { opacity: 1; }

.nav-link {
  font-family: var(--font-nav);
  font-size: clamp(9px, 1.4vw, 18px);
  font-weight: normal;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.nav-link:hover { opacity: 0.5; }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  width: 100%;
  padding-top: var(--nav-h);
  padding-bottom: 10px;
}

.hero-name {
  position: sticky;
  top: var(--nav-h);
  left: 0;
  padding: 0 30px;
  width: 100%; 
  z-index: 2;
  pointer-events: none;
  line-height: 0;
}

.hero-name-text {
  display: block;
  width: 100%;
  font-family: var(--font-display);
  font-weight: normal;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 0.9;
  letter-spacing: -0.01em;
  font-size: 19vw; /* fallback; JS overrides */
}

.hero-image-wrap {
  position: relative;
  margin-top: 32vw;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 66vw, 700px);
  aspect-ratio: 4 / 4.6;
  border-radius: 100px;
  overflow: hidden;
  z-index: 3;
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.hero-img-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #c8bfb2 0%, #a89e92 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-placeholder span {
  font-family: var(--font-nav);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #8a8178;
  text-transform: uppercase;
}

/* Placeholder visibility is now controlled by JS (load/error events on .hero-img) */
.hero-img-placeholder.hidden { display: none; }

/* =============================================
   EXP & PROJECTS SECTION
   ============================================= */
.exp-section {
  background: var(--bg);
  min-height: 100vh;
  padding: 80px 0 40px;
  position: relative;
}

.exp-inner { padding: 0 30px; }

.exp-heading {
  font-family: var(--font-display);
  font-size: clamp(52px, 16vw, 200px);
  font-weight: normal;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 16px;
}

.exp-list { list-style: none; padding: 0; margin: 0; }

.exp-item { position: relative; }

.exp-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 0;
  color: var(--ink);
  cursor: pointer;
  transition: opacity 0.2s;
}

.exp-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  transition: background 0.2s;
}

.exp-name {
  font-family: var(--font-nav);
  font-size: clamp(12px, 2.8vw, 40px);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1;
}

.exp-divider {
  width: 100%;
  height: 1px;
  background: var(--ink);
}

.exp-link:hover .exp-dot {
  background: var(--bg);
  outline: 1.5px solid var(--ink);
}

/* Hover preview — desktop only */
.exp-preview {
  position: fixed;
  top: 50%;
  right: max(6vw, calc(50vw - var(--site-max) / 2 + 24px));
  transform: translateY(-50%);
  width: clamp(160px, 18vw, 260px);
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 50;
}

.exp-preview.visible { opacity: 1; }

.exp-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* =============================================
   GALLERY SECTION
   ============================================= */
.gallery-section {
  background: var(--bg);
  min-height: 100vh;
  padding: 80px 0 40px;
}

.gallery-inner { padding: 0 16px; }

.gallery-heading {
  font-family: var(--font-display);
  font-size: clamp(52px, 16vw, 200px);
  font-weight: normal;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 0.9;
  margin-bottom: 24px;
}

.gallery-main {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 50px;
  overflow: hidden;
}

.gallery-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-divider {
  width: 100%;
  height: 1px;
  background: var(--ink);
  opacity: 0.8;
  margin: 32px 0;
}

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

.gallery-grid-item {
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-grid-item:hover img { transform: scale(1.04); }

.gallery-nav {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gallery-btn {
  background: none;
  border: none;
  color: var(--ink);
  font-size: 40px;
  cursor: pointer;
  padding: 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
  line-height: 1;
}

.gallery-btn:hover { opacity: 1; }

/* Fullscreen modal */
.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.gallery-modal.open {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.gallery-modal-bg {
  position: absolute;
  inset: 0;
  background: #000000;
}

.gallery-modal-img {
  position: relative;
  z-index: 2;
  max-height: 88vh;
  max-width: 88vw;
  object-fit: contain;
  border-radius: 12px;
  display: block;
}

.gallery-modal-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 3;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.gallery-modal-close:hover { opacity: 1; }

.gallery-modal-prev,
.gallery-modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: none;
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.gallery-modal-prev { left: 24px; }
.gallery-modal-next { right: 24px; }
.gallery-modal-prev:hover,
.gallery-modal-next:hover { border-color: #fff; }

.gallery-modal-swipe-hint {
  display: none;
}

/* =============================================
   ABOUT SECTION
   ============================================= */
.about-section {
  background: var(--bg);
  min-height: 110vh;
  color: var(--ink);
  padding: 80px 0 60px;
  isolation: isolate;
}

/* Full-bleed name — JS measures a probe span inside */
.about-name {
  display: block;
  font-family: var(--font-display);
  font-weight: normal;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 0.9;
  letter-spacing: -0.01em;
  font-size: 22vw; /* fallback; JS overrides */
  width: 100%;      /* body is already capped */
  margin-bottom: 48px;
  padding: 0 30px;
  overflow: hidden;
}

.about-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  padding: 0 clamp(20px, 4vw, 60px);
  margin-bottom: 80px;
  align-items: start;
}

.about-bio {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.6vw, 22px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.45;
}

.about-block-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 60px);
  font-weight: normal;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.about-achievement-list { list-style: none; padding: 0; margin: 0; }

.about-achievement-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(36,36,36,0.12);
  font-family: var(--font-body);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.about-achievement-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink);
  flex-shrink: 0;
  margin-top: 5px;
}

.about-skills-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about-skill {
  width: 100%;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.4vw, 18px);
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border: 1.5px solid rgba(36,36,36,0.18);
  border-radius: 8px;
  line-height: 1.4;
  transition: background 0.2s, color 0.2s;
}

.about-skill:hover {
  background: var(--ink);
  color: var(--bg);
}

/* =============================================
   ABOUT — SOCIAL + CONTACT FORM
   ============================================= */
.about-contact-wrap {
  padding: 0 clamp(20px, 4vw, 60px) 0;
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.about-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 48px;
}

/* currentColor inherits from the link, so hover just flips body colour */
.about-social-link {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid rgba(36,36,36,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.about-social-link:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.about-contact-heading {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 80px);
  font-weight: normal;
  color: var(--ink);
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.about-contact-sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.5vw, 19px);
  color: var(--ink);
  opacity: 0.6;
  margin-bottom: 36px;
}

.about-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.about-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.about-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid rgba(36,36,36,0.2);
  border-radius: 50px;
  padding: 18px 24px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.about-input::placeholder { color: var(--ink); opacity: 0.35; }
.about-input:focus { border-color: var(--ink); }

.about-textarea {
  border-radius: 20px;
  resize: vertical;
  min-height: 140px;
}

.about-submit {
  align-self: flex-end;
  font-family: var(--font-nav);
  font-size: clamp(12px, 1.2vw, 15px);
  letter-spacing: 0.1em;
  color: var(--bg);
  background: var(--ink);
  border: none;
  border-radius: 50px;
  padding: 20px 48px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.about-submit:hover    { opacity: 0.75; }
.about-submit:disabled { opacity: 0.4; cursor: not-allowed; }

.about-form-status {
  font-family: var(--font-body);
  font-size: clamp(13px, 1.2vw, 15px);
  color: var(--ink);
  opacity: 0.6;
  min-height: 20px;
  text-align: center;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #ddd5c6; /* fallback for browsers without color-mix() support */
  background: color-mix(in srgb, var(--ink) 10%, var(--bg));
  padding: 24px clamp(16px, 4vw, 60px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  font-family: var(--font-body);
  font-size: clamp(11px, 1.1vw, 14px);
  font-weight: 600;
  color: var(--ink);
}

/* =============================================
   DESKTOP  (≥ 1100px)
   ============================================= */
@media (min-width: 1100px) {
  .hero-image-wrap {
    margin-top: 160px;
  }
}

/* =============================================
   TABLET  (601px – 900px)
   ============================================= */
@media (min-width: 601px) and (max-width: 900px) {
  :root { --nav-h: 48px; }

  .hero-image-wrap {
    margin-top: 28vw;
    width: 75vw;
    border-radius: 90px;
  }

  .exp-heading { font-size: clamp(48px, 12vw, 110px); }
  .exp-dot     { display: none; }
  .exp-preview { display: none; }

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

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

  .about-col:first-child { grid-column: 1 / -1; }

  .about-form-row { grid-template-columns: 1fr 1fr; }
}

/* =============================================
   MOBILE  (≤ 600px)
   ============================================= */
@media (max-width: 600px) {
  :root { --nav-h: 44px; }

  /* Navbar */
  .navbar { padding: 0 14px; }
  .nav-dot { width: 9px; height: 9px; }

  /* Hero */
  .hero-name { padding: 0 14px; }

  .hero-image-wrap {
    margin-top: 20vw;
    width: 80vw;
    border-radius: 60px;
  }

  /* Exp */
  .exp-section { padding: 60px 0 20px; min-height: 90vh; }
  .exp-inner   { padding: 0 16px; }
  .exp-heading { font-size: clamp(44px, 18vw, 80px); }
  .exp-dot     { display: none; }
  .exp-preview { display: none; }
  .exp-name    { font-size: clamp(13px, 4.8vw, 22px); }
  .exp-link    { padding: 16px 0; }

  /* Gallery */
  .gallery-section { padding: 60px 0 20px; min-height: 90vh; }
  .gallery-heading { font-size: clamp(44px, 16vw, 80px); }
  .gallery-main    { border-radius: 20px; }

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

  .gallery-modal-prev,
  .gallery-modal-next {
    display: none;
  }

  .gallery-modal-swipe-hint {
    display: block;
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    opacity: 0.5;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
  }

  .gallery-modal-img {
    max-height: 80vh;
    max-width: 94vw;
  }

  /* About */
  .about-section { padding: 48px 0 0px; }

  /* On mobile the probe-based JS still fits edge-to-edge correctly
     because padding is part of the total width budget */
  .about-name {
    padding: 0 14px;
    margin-bottom: 36px;
  }

  .about-columns {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 16px;
    margin-bottom: 48px;
  }

  .about-bio            { font-size: clamp(15px, 4.2vw, 20px); }
  .about-block-heading  { font-size: clamp(40px, 10vw, 58px); }
  .about-achievement-item { font-size: clamp(13px, 3.8vw, 17px); padding: 12px 0; }
  .about-skill          { font-size: clamp(13px, 3.8vw, 17px); }

  /* Contact */
  .about-contact-wrap { padding: 0 16px; }
  .about-contact-heading { font-size: clamp(36px, 10vw, 60px); }
  .about-contact-sub  { font-size: clamp(14px, 4vw, 17px); }
  .about-input        { font-size: clamp(14px, 4vw, 17px); padding: 16px 20px; }
  .about-form-row     { grid-template-columns: 1fr; }
  .about-submit       { align-self: stretch; text-align: center; font-size: 13px; }

  /* Footer */
  .site-footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    font-size: 12px;
  }
}