/* =========================================================
   Daaneswaran — Portfolio
   Tokens
   ========================================================= */
:root{
  --bg:        #f4f4f2;
  --ink:       #16181a;
  --ink-soft:  #55585c;
  --line:      #d9d7d1;
  --dark:      #0c0e0f;
  --cream:     #f4f2ec;
  --accent:    #a9764a; /* warm film-leader amber, used sparingly */

  --display: "Montserrat", sans-serif;
  --body:    "Inter", sans-serif;

  --gutter: clamp(24px, 6vw, 96px);
  --section-y: clamp(64px, 10vw, 140px);
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   Parallax background layer (used inside hero/education/
   experience/project__intro/outro — parent needs
   position:relative + overflow:hidden)
   ========================================================= */
.parallax-bg{
  position:absolute;
  inset: -10% 0;
  height: 120%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: 0;
}

/* =========================================================
   Signature element: film-reel timecode rail
   ========================================================= */
.reel{
  position: fixed;
  top:0; left:0; right:0;
  height: 3px;
  background: rgba(0,0,0,0.08);
  z-index: 200;
}
.reel__fill{
  height:100%;
  width:0%;
  background: var(--accent);
  transition: width 0.08s linear;
}

/* =========================================================
   Header
   ========================================================= */
.site-header{
  position: fixed;
  top: 3px; left:0; right:0;
  z-index: 150;
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  mix-blend-mode: difference;
  pointer-events:none;
}
.site-header *{ pointer-events:auto; }
.site-header__name{
  color: inherit;
  text-decoration:none;
  font-weight: 700;
}
.site-header__nav{ display:flex; gap: clamp(14px,3vw,32px); }
.site-header__nav a{
  color: inherit;
  text-decoration:none;
  opacity: 0.75;
  display: inline-block;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.site-header__nav a:hover{ opacity:1; transform: translateY(-1px); }
.site-header__tc{
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  display: none;
}
@media (min-width: 640px){
  .site-header__tc{ display:inline; }
}
@media (max-width: 720px){
  .site-header__nav{ display:none; }
}

/* =========================================================
   Shared type + labels
   ========================================================= */
.eyebrow{
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.eyebrow--light{ color: rgba(244,242,236,0.75); }

h1,h2,h3{
  font-family: var(--display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.lede{
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* =========================================================
   Hero / cover
   ========================================================= */
.hero{
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  display:flex;
  align-items:flex-end;
  color: var(--cream);
  background: var(--dark);
}
.hero .parallax-bg{ background-position: center 30%; }
.hero__scrim{
  position:absolute; inset:0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(8,9,10,0.15) 0%, rgba(8,9,10,0.15) 40%, rgba(8,9,10,0.85) 100%);
}
.hero__glow{
  position:absolute;
  z-index: 1;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, rgba(169,118,74,0.28) 0%, rgba(169,118,74,0) 68%);
  filter: blur(10px);
  animation: driftGlow 16s ease-in-out infinite;
  pointer-events: none;
}
@keyframes driftGlow{
  0%, 100%{ transform: translate(0,0) scale(1); }
  50%{ transform: translate(-6%, 8%) scale(1.12); }
}
.hero__content{
  position:relative;
  z-index: 2;
  padding: var(--gutter);
  padding-bottom: clamp(64px, 8vw, 100px);
  width:100%;
}
.hero__title{
  font-size: clamp(3.2rem, 11vw, 8rem);
  line-height: 0.92;
  text-transform: lowercase;
}
.hero__name{
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  margin: 18px 0 6px;
}
.hero__contact{
  font-size: 0.85rem;
  color: rgba(244,242,236,0.7);
  margin:0;
}
.scroll-cue{
  position:absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: 40px;
  width: 1px; height: 60px;
  background: rgba(244,242,236,0.4);
}
.scroll-cue span{
  position:absolute; top:0; left:-2px;
  width:5px; height:5px;
  border-radius:50%;
  background: var(--cream);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue{
  0%{ top:0; opacity:1; }
  85%{ opacity:1; }
  100%{ top:100%; opacity:0; }
}

/* =========================================================
   Split sections (image + text)
   ========================================================= */
.split{
  display:grid;
  grid-template-columns: 1fr 1fr;
  min-height: 90vh;
  align-items: stretch;
}
.split--reverse{ direction: rtl; }
.split--reverse > *{ direction: ltr; }

.split__media{ overflow:hidden; background: #000; }
.split__media img{
  width:100%; height:100%;
  object-fit: cover;
  min-height: 340px;
}
.split__text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding: var(--section-y) var(--gutter);
}
.split__text h2{
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.08;
  margin-bottom: 22px;
  text-transform: lowercase;
}

.skills-list{
  list-style:none;
  margin: 28px 0 0;
  padding:0;
  display:grid;
  gap: 10px;
}
.skills-list li{
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.skills-list li:last-child{ border-bottom: 1px solid var(--line); }

@media (max-width: 860px){
  .split{ grid-template-columns: 1fr; }
  .split__media img{ min-height: 280px; }
}

/* =========================================================
   Education
   ========================================================= */
.education{
  position:relative;
  min-height: 80vh;
  overflow: hidden;
  display:flex;
  align-items:center;
  color: var(--cream);
  background: var(--dark);
}
.education__scrim{
  position:absolute; inset:0;
  z-index: 1;
  background: rgba(8,9,10,0.62);
}
.education__content{
  position:relative;
  z-index: 2;
  width:100%;
  padding: var(--section-y) var(--gutter);
}
.timeline{
  list-style:none;
  margin:0; padding:0;
  max-width: 760px;
}
.timeline li{
  display:flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding: 22px 0;
  border-top: 1px solid rgba(244,242,236,0.2);
  font-family: var(--display);
}
.timeline li:last-child{ border-bottom: 1px solid rgba(244,242,236,0.2); }
.timeline__year{
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: rgba(244,242,236,0.6);
  min-width: 140px;
}
.timeline__name{
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
}

/* =========================================================
   Experience (work)
   ========================================================= */
.experience{
  position:relative;
  overflow: hidden;
  color: var(--cream);
  background: var(--dark);
}
.experience__scrim{
  position:absolute; inset:0;
  z-index: 1;
  background: rgba(8,9,10,0.82);
}
.experience__inner{
  position:relative;
  z-index: 2;
  padding: var(--section-y) var(--gutter);
}
.experience__title{
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height:1.08;
  margin-bottom: 48px;
  text-transform: lowercase;
  max-width: 16ch;
}
.experience__list{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 36px 48px;
}
.exp-item h3{
  font-size: 1.15rem;
  margin-bottom: 10px;
}
.exp-item p{
  margin:0;
  color: rgba(244,242,236,0.72);
  font-size: 0.95rem;
  max-width: 42ch;
}
@media (max-width: 760px){
  .experience__list{ grid-template-columns: 1fr; }
}

/* =========================================================
   Section dividers (film / photography)
   ========================================================= */
.divider{
  position:relative;
  min-height: 70vh;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background: var(--dark);
}
.divider__media{
  position:absolute; inset:0;
  display:flex;
}
.divider__img{
  width:50%; height:118%;
  position: relative;
  top: -9%;
  object-fit:cover;
  filter: grayscale(0.15);
  will-change: transform;
}
.divider__scrim{
  position:absolute; inset:0;
  background: rgba(8,9,10,0.68);
}
.divider__title{
  position:relative;
  color: var(--cream);
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 0.95;
  text-align:center;
  text-transform: lowercase;
}
@media (max-width: 640px){
  .divider__img--b{ display:none; }
  .divider__img--a{ width:100%; }
}

/* =========================================================
   Project sections
   ========================================================= */
.project__intro{
  position:relative;
  min-height: 74vh;
  overflow: hidden;
  display:flex;
  align-items:flex-end;
  color: var(--cream);
  background: var(--dark);
}
.project__scrim{
  position:absolute; inset:0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(8,9,10,0.85) 0%, rgba(8,9,10,0.35) 55%, rgba(8,9,10,0.1) 100%);
}
.project__intro-text{
  position:relative;
  z-index: 2;
  padding: var(--section-y) var(--gutter);
  max-width: 640px;
}
.project__intro-text h2{
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.02;
  text-transform: lowercase;
  margin: 6px 0 20px;
}
.project__tagline{
  margin:0;
  color: rgba(244,242,236,0.75);
  font-size: 1rem;
}

.project__gallery{
  padding: var(--section-y) var(--gutter);
}
.gallery-label{
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery-grid img{
  width:100%; height:100%;
  aspect-ratio: 4/3;
  object-fit:cover;
  background:#111;
}
.gallery-grid--dense{
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 900px){
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .gallery-grid--dense{ grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   Projects — video showcase (black & white, cinematic)
   ========================================================= */
.projects{
  position: relative;
  background: #060607;
  color: var(--cream);
  padding: var(--section-y) var(--gutter);
}
.projects__head{ margin-bottom: clamp(36px, 6vw, 64px); text-align: center; }
.projects__head h2{
  font-size: clamp(2rem, 4vw, 3.2rem);
  text-transform: lowercase;
  margin: 4px 0 14px;
}
.projects__sub{
  margin: 0 auto;
  max-width: 42ch;
  color: rgba(244,242,236,0.6);
  font-size: 0.95rem;
}
.projects__head .eyebrow{ text-align:center; }

.project-cards{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 32px);
  max-width: 1240px;
  margin: 0 auto;
  perspective: 1200px;
}

.project-card{
  display:block;
  text-decoration:none;
  color: inherit;
  border-radius: 20px;
  animation: cardFloat 6s ease-in-out infinite;
}
.project-card:nth-child(2){ animation-delay: -2s; }
.project-card:nth-child(3){ animation-delay: -4s; }
@keyframes cardFloat{
  0%, 100%{ transform: translateY(0); }
  50%{ transform: translateY(-6px); }
}

.project-card__surface{
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px -20px rgba(0,0,0,0.7);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.project-card:hover .project-card__surface,
.project-card:focus-visible .project-card__surface{
  transform: scale(1.045) translateZ(0);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 28px 60px -18px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.06),
              0 0 40px -6px rgba(255,255,255,0.18);
}

.project-card__media{
  aspect-ratio: 4/3;
  overflow: hidden;
  background:#111;
}
.project-card__media img{
  width:100%; height:100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.6s ease;
  filter: grayscale(0.35) contrast(1.05);
}
.project-card:hover .project-card__media img{
  transform: scale(1.08);
  filter: grayscale(0) contrast(1.05);
}

.project-card__play{
  position:absolute;
  top:50%; left:50%;
  width: 62px; height: 62px;
  margin: -31px 0 0 -31px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(10,10,10,0.55);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.35s ease, transform 0.35s ease;
  padding-left: 3px; /* optical centering for play triangle */
}
.project-card:hover .project-card__play,
.project-card:focus-visible .project-card__play{
  opacity: 1;
  transform: scale(1);
}

.project-card__meta{
  position: relative;
  padding: 20px 22px 24px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.project-card__meta h3{
  font-size: 1.05rem;
  margin:0;
}
.project-card__cta{
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: rgba(244,242,236,0.55);
  white-space: nowrap;
  transition: color 0.3s ease, transform 0.3s ease;
}
.project-card__cta i{ font-style:normal; display:inline-block; transition: transform 0.3s ease; }
.project-card:hover .project-card__cta{ color: rgba(244,242,236,0.95); }
.project-card:hover .project-card__cta i{ transform: translateX(3px); }

@media (max-width: 900px){
  .project-cards{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px){
  .project-cards{ grid-template-columns: 1fr; }
  .project-card{ animation: none; }
}

/* Reveal-on-scroll variant: scale + fade (used by Project cards) */
.reveal-scale{
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.reveal-scale.is-visible{
  opacity: 1;
  transform: scale(1);
}

/* =========================================================
   Photo wall (masonry)
   ========================================================= */
.photo-wall{
  padding: var(--section-y) var(--gutter);
  background: var(--dark);
}
.masonry{
  columns: 4 220px;
  column-gap: 14px;
}
.masonry img{
  width:100%;
  margin: 0 0 14px;
  border-radius: 2px;
  break-inside: avoid;
}
@media (max-width: 700px){
  .masonry{ columns: 2 160px; }
}

/* =========================================================
   Outro / contact
   ========================================================= */
.outro{
  position:relative;
  min-height: 100svh;
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  color: var(--cream);
  background: var(--dark);
}
.outro__scrim{
  position:absolute; inset:0;
  z-index: 1;
  background: rgba(6,7,8,0.72);
}
.outro__content{ position:relative; z-index: 2; }
.outro__title{
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  text-transform: lowercase;
  margin: 8px 0 30px;
}
.outro__links{
  display:flex;
  gap: 14px;
  justify-content:center;
  flex-wrap:wrap;
  font-size: 0.95rem;
}
.outro__links a{
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid rgba(244,242,236,0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.outro__links a:hover{ border-color: var(--cream); }
.outro__links span{ color: rgba(244,242,236,0.4); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer{
  padding: 22px var(--gutter) 0;
  background: var(--dark);
  color: rgba(244,242,236,0.55);
  font-family: var(--display);
}
.site-footer__row{
  display:flex;
  flex-wrap:wrap;
  gap: 8px 20px;
  justify-content:space-between;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-bottom: 20px;
}
.site-footer__credit{
  border-top: 1px solid rgba(244,242,236,0.12);
  padding: 14px 0 18px;
  display:flex;
  flex-wrap: wrap;
  align-items:center;
  gap: 8px;
  justify-content:center;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(244,242,236,0.45);
}
.site-footer__credit-sep{ opacity: 0.6; }
.site-footer__credit a{
  color: rgba(244,242,236,0.55);
  text-decoration: none;
  border-bottom: 1px solid rgba(244,242,236,0.25);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.site-footer__credit a:hover,
.site-footer__credit a:focus-visible{
  color: rgba(244,242,236,0.95);
  border-color: rgba(244,242,236,0.7);
}
@media (max-width: 560px){
  .site-footer__row{ justify-content:center; text-align:center; }
}

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal{
  opacity:0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible{
  opacity:1;
  transform:none;
}
