/* =========================================================
   Mohammad Keshvari — CV
   Postmodern / Swiss-typography system
   ========================================================= */

:root{
  --paper:#f3f1ea;        /* warm off-white */
  --ink:#1a1a1a;          /* near-black */
  --navy:#1f2bd1;         /* postmodern blue */
  --yellow:#f6c00a;       /* signal yellow */
  --blue:#5a8fe6;         /* sky bar blue */
  --red:#d24b46;          /* terracotta red */
  --orange:#ec5a2a;       /* brutalist orange */
  --grey:#9a978d;
  --line:#cfccc1;

  --mono:'Space Mono', ui-monospace, 'Courier New', monospace;
  --disp:'Archivo', 'Helvetica Neue', Arial, sans-serif;

  --pad: clamp(20px, 5vw, 90px);
  --maxw: 1320px;
}

*{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--mono);
  font-size:16px;
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}

a{ color:inherit; }

/* ---------- grain ---------- */
.grain{
  position:fixed; inset:0; z-index:1; pointer-events:none;
  opacity:.04; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- progress ---------- */
.progress{
  position:fixed; top:0; left:0; height:3px; width:0;
  background:var(--orange); z-index:60;
}

/* ---------- dotted rules ---------- */
.dots{
  height:10px; margin:0 var(--pad);
  background-image:radial-gradient(var(--orange) 38%, transparent 40%);
  background-size:18px 10px; background-repeat:repeat-x;
  background-position:left center;
}
.dots--top{ margin:0 var(--pad) 0; padding-top:0; }
.dots--light{ background-image:radial-gradient(var(--yellow) 38%, transparent 40%); }

/* =========================================================
   SIDE NAV
   ========================================================= */
.sidenav{
  position:fixed; top:50%; right:18px; transform:translateY(-50%);
  z-index:50; display:flex; flex-direction:column; align-items:flex-end; gap:14px;
  mix-blend-mode:difference; color:#fff;
}
.sidenav__brand{
  font-family:var(--disp); font-weight:900; font-size:20px;
  letter-spacing:-1px; text-decoration:none; margin-bottom:6px;
}
.sidenav ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.sidenav a{
  font-family:var(--mono); font-size:12px; text-decoration:none;
  display:flex; align-items:center; gap:8px; opacity:.6; transition:opacity .2s;
}
.sidenav a::after{
  content:''; width:14px; height:1px; background:currentColor; transition:width .25s;
}
.sidenav a:hover, .sidenav a.is-active{ opacity:1; }
.sidenav a:hover::after, .sidenav a.is-active::after{ width:30px; }
.sidenav a::before{
  content:attr(data-label); font-size:11px; opacity:0; transform:translateX(6px);
  transition:.25s; white-space:nowrap;
}
.sidenav a:hover::before{ opacity:1; transform:translateX(0); }

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position:relative; z-index:2;
  padding:clamp(28px,6vh,70px) 0 0;
  min-height:100vh; display:flex; flex-direction:column;
}
.hero .dots--top{ margin-bottom:clamp(30px,6vh,60px); }

.hero__grid{
  flex:1;
  display:grid;
  grid-template-columns:1.1fr 1fr;
  grid-template-rows:auto auto auto;
  gap:0 var(--pad);
  padding:0 var(--pad);
  align-items:start;
}

.kicker{
  font-size:12px; letter-spacing:.32em; text-transform:uppercase;
  color:var(--navy); font-weight:700; margin:0 0 22px;
}
.kicker--light{ color:var(--yellow); }

.hero__intro{ grid-column:1; grid-row:1; max-width:46ch; padding-top:6px; }
.hero__lead{
  font-size:clamp(15px,1.5vw,19px); line-height:1.5; margin:0 0 18px;
}
.hero__lead em{ color:var(--navy); font-style:normal; font-weight:700; }
.hero__meta{ font-size:13px; color:var(--grey); margin:0; }

.hero__block--yellow{
  grid-column:2; grid-row:1; height:100%; min-height:120px;
  background:var(--yellow); align-self:stretch; margin-left:-var(--pad);
}
.hero__block--blue{
  grid-column:1; grid-row:3; height:46px; background:var(--blue);
  width:78%; margin-top:14px;
}

.hero__title{
  grid-column:1 / -1; grid-row:2;
  font-family:var(--disp); font-weight:900;
  color:var(--navy);
  margin:clamp(10px,3vh,30px) 0 0;
  line-height:.86; letter-spacing:-.02em;
  text-transform:none;
}
.hero__title .line{ display:block; }
.hero__title .line--1{
  font-size:clamp(46px,11vw,150px); color:var(--ink);
}
.hero__title .line--2,
.hero__title .line--3{
  font-size:clamp(40px,10vw,140px); color:var(--navy);
  margin-left:.04em;
}
.hero__title .line--2{ padding-left:clamp(40px,18vw,260px); }

.hero__portrait{
  grid-column:2; grid-row:2; align-self:end;
  position:relative; max-width:340px; justify-self:end; margin-top:18px;
}
.hero__portrait img{
  width:100%; display:block; filter:contrast(1.03) saturate(1.05);
  border:1px solid var(--ink);
}
.hero__portrait-tag{
  position:absolute; bottom:8px; left:8px;
  background:var(--ink); color:var(--paper);
  font-size:10px; letter-spacing:.04em; padding:4px 8px;
}

.hero__scroll{
  display:flex; align-items:center; gap:8px; justify-content:center;
  text-decoration:none; font-size:11px; letter-spacing:.3em; text-transform:uppercase;
  color:var(--ink); padding:clamp(24px,5vh,46px) 0 26px;
}
.hero__scroll svg{ animation:bob 1.6s ease-in-out infinite; }
@keyframes bob{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(4px);} }

/* =========================================================
   SECTION SHELL
   ========================================================= */
.section{ position:relative; z-index:2; padding:clamp(50px,9vh,110px) 0 0; }
.section__head{
  display:flex; align-items:baseline; gap:18px; padding:0 var(--pad) 18px;
}
.section__num{
  font-size:13px; color:var(--orange); font-weight:700; letter-spacing:.1em;
}
.section__title{
  font-family:var(--disp); font-weight:800; letter-spacing:-.02em;
  font-size:clamp(30px,5vw,62px); margin:0; line-height:1;
}
.section__head--invert .section__title{ color:var(--paper); }
.section__head--invert .section__num{ color:var(--yellow); }

/* =========================================================
   ABOUT
   ========================================================= */
.about__grid{
  display:grid; grid-template-columns:1fr 1fr; gap:var(--pad);
  padding:clamp(30px,5vh,56px) var(--pad) 0;
}
.about__lead p{
  font-family:var(--disp); font-weight:600;
  font-size:clamp(20px,2.4vw,30px); line-height:1.25; margin:0;
}
.about__lead strong{ color:var(--navy); }
.about__body p{ margin:0 0 18px; max-width:54ch; }
.about__body mark{ background:var(--yellow); color:var(--ink); padding:0 3px; }

/* =========================================================
   SKILLS
   ========================================================= */
.skills__grid{
  display:grid; grid-template-columns:repeat(3,1fr);
  padding:clamp(30px,5vh,56px) var(--pad) 0; gap:0;
  border-top:1px solid var(--line);
}
.skillcard{
  padding:34px 28px 38px; border-right:1px solid var(--line);
}
.skills__grid .skillcard:last-child{ border-right:0; }
.skillcard--accent{ background:var(--orange); color:#111; border-right:1px solid #111; }
.skillcard h3{
  font-family:var(--disp); font-weight:800; font-size:24px; line-height:1.04;
  margin:0 0 22px; letter-spacing:-.01em;
}
.skillcard ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.skillcard li{ font-size:13.5px; line-height:1.5; padding-left:18px; position:relative; }
.skillcard li::before{
  content:'—'; position:absolute; left:0; color:var(--navy); font-weight:700;
}
.skillcard--accent li::before{ color:#111; }
.skillcard b{ font-weight:700; }

/* =========================================================
   EXPERIENCE
   ========================================================= */
.timeline{
  padding:clamp(30px,5vh,56px) var(--pad) 0;
  border-top:1px solid var(--line);
}
.job{
  display:grid; grid-template-columns:230px 1fr; gap:var(--pad);
  padding:30px 0; border-bottom:1px solid var(--line);
}
.job__meta{ display:flex; flex-direction:column; gap:6px; }
.job__when{ font-size:12px; color:var(--orange); letter-spacing:.04em; }
.job__org{ font-family:var(--disp); font-weight:800; font-size:20px; line-height:1.05; }
.job__role{
  font-family:var(--disp); font-weight:600; font-size:17px; margin:0 0 12px; color:var(--navy);
}
.job__body ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; }
.job__body li{ font-size:13.5px; line-height:1.5; padding-left:18px; position:relative; max-width:72ch; }
.job__body li::before{ content:'·'; position:absolute; left:4px; color:var(--orange); font-weight:700; }
.job__body b{ font-weight:700; }
.job__body i{ color:var(--grey); font-style:italic; }
.job__body a{ color:var(--navy); text-underline-offset:3px; }
.job--feature{ background:rgba(246,192,10,.14); margin:0 calc(var(--pad) * -1); padding-left:var(--pad); padding-right:var(--pad); }

/* =========================================================
   PROJECTS (dark)
   ========================================================= */
.section--projects{
  background:var(--ink); color:var(--paper); margin-top:clamp(50px,9vh,110px);
  padding-bottom:clamp(50px,9vh,90px);
}
.section--projects .dots--light{ margin-bottom:6px; }
.projects__intro{
  padding:clamp(20px,4vh,40px) var(--pad) 0; max-width:70ch;
  font-size:14px; color:#bdbab0;
}
.tabs{
  display:flex; flex-wrap:wrap; gap:10px; padding:26px var(--pad) 0;
}
.tab{
  font-family:var(--mono); font-size:13px; color:var(--paper);
  background:transparent; border:1px solid #4a4a4a; border-radius:999px;
  padding:8px 18px; cursor:pointer; transition:.18s; letter-spacing:.02em;
}
.tab:hover{ border-color:var(--paper); }
.tab.is-active{ background:var(--orange); border-color:var(--orange); color:#111; font-weight:700; }

.panel{ display:none; padding:clamp(26px,4vh,46px) var(--pad) 0; }
.panel.is-active{ display:block; animation:fade .35s ease; }
@keyframes fade{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }
.panel__note{ color:#bdbab0; font-size:13px; max-width:70ch; margin:0 0 26px; }
.panel__sub{
  font-family:var(--disp); font-weight:800; font-size:16px; letter-spacing:.04em;
  text-transform:uppercase; color:var(--yellow); margin:34px 0 14px;
}

.years{ columns:2; column-gap:var(--pad); }
@media (max-width:760px){ .years{ columns:1; } }
.yearblock{ break-inside:avoid; margin-bottom:30px; }
.yearblock__y{
  font-family:var(--disp); font-weight:900; font-size:30px; color:var(--blue);
  display:block; margin-bottom:10px; letter-spacing:-.01em;
}
.yearblock ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.yearblock li{ font-size:13px; line-height:1.45; border-bottom:1px solid #2c2c2c; padding-bottom:8px; }
.yearblock em{ color:#8f8c83; font-style:normal; font-size:12px; }
.yearblock b{ color:var(--paper); }

/* films */
.filmlist{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.filmlist li{
  position:relative; padding:14px 0 14px 70px;
  border-bottom:1px solid #2c2c2c; font-size:14px; line-height:1.45;
}
.filmlist--compact li{ font-size:13px; padding-top:11px; padding-bottom:11px; }
.film__y{
  position:absolute; left:0; top:14px;
  font-family:var(--disp); font-weight:700; color:var(--blue); font-size:14px;
}
.filmlist b{ color:var(--paper); font-weight:700; }
.film__award{
  display:block; color:var(--yellow); font-size:11.5px;
  letter-spacing:.03em; margin-top:4px;
}

/* collabs */
.collab{ border-bottom:1px solid #2c2c2c; padding:18px 0; }
.collab h4{
  font-family:var(--disp); font-weight:800; font-size:19px; margin:0 0 10px;
  display:flex; justify-content:space-between; align-items:baseline; gap:14px; flex-wrap:wrap;
}
.collab h4 span{ font-family:var(--mono); font-weight:400; font-size:12px; color:var(--blue); }
.collab ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px; }
.collab li{ font-size:13px; color:#cbc8be; padding-left:16px; position:relative; }
.collab li::before{ content:'·'; position:absolute; left:3px; color:var(--orange); }
.collab i{ color:#8f8c83; }
.collab a{ color:var(--yellow); text-underline-offset:3px; }

/* wedding + web lists */
.weddinglist{
  list-style:none; margin:0; padding:0; columns:3; column-gap:var(--pad);
}
@media (max-width:760px){ .weddinglist{ columns:2; } }
@media (max-width:460px){ .weddinglist{ columns:1; } }
.weddinglist li{
  break-inside:avoid; font-size:13.5px; padding:7px 0; border-bottom:1px solid #2c2c2c;
}
.weddinglist span{ color:var(--blue); font-weight:700; margin-right:10px; font-size:12px; }

.weblist{ list-style:none; margin:0; padding:0; max-width:520px; }
.weblist li{
  display:flex; align-items:baseline; gap:18px; padding:16px 0;
  border-bottom:1px solid #2c2c2c;
}
.weblist span{ color:var(--blue); font-weight:700; font-size:13px; font-family:var(--disp); }
.weblist a{
  font-family:var(--disp); font-weight:700; font-size:22px; color:var(--paper);
  text-decoration:none; transition:color .2s;
}
.weblist a:hover{ color:var(--yellow); }

/* =========================================================
   EDUCATION
   ========================================================= */
.edu__grid{
  display:grid; grid-template-columns:1fr 1fr; gap:0;
  padding:clamp(30px,5vh,56px) var(--pad) 0; border-top:1px solid var(--line);
}
.edu{ padding:34px 0; }
.edu:first-child{ border-right:1px solid var(--line); padding-right:var(--pad); }
.edu:last-child{ padding-left:var(--pad); }
.edu__deg{
  font-size:11px; letter-spacing:.3em; text-transform:uppercase; color:var(--orange); font-weight:700;
}
.edu h3{ font-family:var(--disp); font-weight:800; font-size:clamp(24px,3vw,34px); margin:12px 0 10px; }
.edu p{ margin:0; font-size:14px; }
.edu__meta{ color:var(--grey); font-size:12.5px; margin-top:6px; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact{
  position:relative; z-index:2; background:var(--navy); color:var(--paper);
  margin-top:clamp(50px,9vh,110px); padding-bottom:40px;
}
.contact .dots--light{ margin-bottom:0; }
.contact__inner{ padding:clamp(40px,8vh,90px) var(--pad) 0; }
.contact__title{
  font-family:var(--disp); font-weight:900; letter-spacing:-.03em;
  font-size:clamp(60px,16vw,200px); line-height:.82; margin:14px 0 clamp(30px,6vh,60px);
  text-transform:none;
}
.contact__title span{ display:block; }
.contact__title span:nth-child(2){ padding-left:clamp(40px,14vw,200px); color:var(--yellow); }

.contact__grid{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  border-top:1px solid rgba(243,241,234,.25);
}
.contact__link{
  display:flex; flex-direction:column; gap:8px; padding:26px 0;
  text-decoration:none; border-bottom:1px solid rgba(243,241,234,.25);
  border-right:1px solid rgba(243,241,234,.25); padding-right:20px;
  transition:background .2s, padding-left .2s; padding-left:0;
}
.contact__link:hover{ background:rgba(246,192,10,.12); padding-left:14px; }
.contact__label{ font-size:11px; letter-spacing:.3em; text-transform:uppercase; color:var(--yellow); }
.contact__value{ font-family:var(--disp); font-weight:700; font-size:clamp(17px,2vw,24px); }

.contact__foot{
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  padding:30px 0 0; font-size:12px; color:rgba(243,241,234,.7); letter-spacing:.03em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width:900px){
  .sidenav{ display:none; }
  .hero__grid{ grid-template-columns:1fr; }
  .hero__intro{ grid-column:1; grid-row:1; }
  .hero__block--yellow{ display:none; }
  .hero__title{ grid-row:2; order:2; }
  .hero__title .line--2{ padding-left:14vw; }
  .hero__portrait{ grid-column:1; grid-row:3; justify-self:start; order:3; margin-top:24px; max-width:260px; }
  .hero__block--blue{ display:none; }
  .about__grid{ grid-template-columns:1fr; gap:30px; }
  .skills__grid{ grid-template-columns:1fr; }
  .skillcard{ border-right:0; border-bottom:1px solid var(--line); }
  .skillcard--accent{ border-right:0; }
  .job{ grid-template-columns:1fr; gap:16px; }
  .edu__grid{ grid-template-columns:1fr; }
  .edu:first-child{ border-right:0; border-bottom:1px solid var(--line); padding-right:0; }
  .edu:last-child{ padding-left:0; }
}
@media (max-width:560px){
  .contact__foot{ flex-direction:column; gap:6px; }
}

/* ---------- reveal-on-scroll ---------- */
.rise{ opacity:0; transform:translateY(22px); transition:opacity .6s ease, transform .6s ease; }
.rise.in{ opacity:1; transform:none; }
.section.rise{ opacity:1; transform:none; }   /* keep section shells visible; animate children */
.job.rise, .skillcard.rise, .collab.rise{ will-change:opacity, transform; }

@media (prefers-reduced-motion:reduce){
  *{ animation:none !important; scroll-behavior:auto !important; }
  .rise{ opacity:1 !important; transform:none !important; }
}
