/* ==========================================================================
   saminazari.me — site styles
   Breakpoints: mobile < 810px, tablet 810–1199px, desktop >= 1200px
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-opsz-italic.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --blue: #0022ff;
  --black: #000;
  --ink: #171717;
  --muted: #666;
  --body: #484848;
  --lead: #3d3d3d;
  --line: #d1d1d1;
  --line-soft: #f5f5f5;
  --card: #f6f6f6;
  --tile: #fbfbfb;

  --pad: 64px;                 /* page side padding */
  --font: "Inter", "Inter Placeholder", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--black);
  font-family: var(--font);
  font-variation-settings: "opsz" 14;   /* "Inter" (text cut) */
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ul, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
hr { border: 0; height: 1px; margin: 0; background: var(--line-soft); }

/* "Inter Display" cut */
.display { font-variation-settings: "opsz" 32; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Type styles ---------- */
.t-heading {                 /* section headings, project titles */
  font-size: 16px; line-height: 20.8px; font-weight: 500;
  font-variation-settings: "opsz" 32;
}
.t-body  { font-size: 15px; line-height: 22px; letter-spacing: -0.02em; color: var(--body); }
.t-lead  { font-size: 15px; line-height: 25px; letter-spacing: -0.02em; font-weight: 500; color: var(--lead); }
.t-small { font-size: 14px; line-height: 22px; letter-spacing: -0.02em; color: var(--muted); }
.t-label { font-size: 14px; line-height: 16.8px; }
.capitalize { text-transform: capitalize; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 65px var(--pad) 0;
}
.signature { display: block; width: 88px; height: 39px; color: var(--blue); }
.signature svg { width: 100%; height: 100%; overflow: visible; }

.breadcrumb { display: flex; align-items: center; font-size: 15px; line-height: 18px; }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; color: var(--black); line-height: 22px; letter-spacing: -0.02em; }
.breadcrumb a svg { width: 10px; height: 10px; }
.breadcrumb .crumb { color: var(--muted); margin-left: 9px; }
.breadcrumb .crumb::before { content: "/"; margin-right: 3px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad) 64px;
  margin-top: 170px;
}
.site-footer .email { font-size: 14px; line-height: 16.8px; }
.socials { display: flex; align-items: center; gap: 28px; color: var(--ink); }
.socials a { display: block; }
.socials svg { display: block; }

a:hover .t-heading, .site-footer .email:hover, .socials a:hover { opacity: .7; }

/* ==========================================================================
   Home
   ========================================================================== */
.home .site-header { position: sticky; top: 0; z-index: 5; }
.home .site-name { font-size: 15px; line-height: 18px; }

.home-nav ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.home-nav a { font-size: 15px; line-height: 22px; letter-spacing: -0.02em; color: var(--muted); transition: color .2s; }
.home-nav a:hover, .home-nav a[aria-current="page"] { color: var(--blue); }

.home-layout { width: min(834px, 100% - 2 * var(--pad)); margin: 171px auto 0; }
.home-nav { position: fixed; top: 279px; left: var(--pad); }

.intro h1 {
  font-size: 24px; line-height: 31.2px; font-weight: 400; color: var(--blue);
  font-variation-settings: "opsz" 32;
}
.intro .t-small { margin-top: 32px; }
.intro .previously a:hover { color: var(--black); }

.projects { list-style: none; padding: 0; margin: 100px 0 0; }
.project { border-top: 1px solid var(--line); padding-top: 100px; padding-bottom: 100px; }
.project:last-child { padding-bottom: 0; }
.project a { display: block; }
.project-head { display: grid; grid-template-columns: 334px 1fr; column-gap: 41px; }
.project-head .meta { margin-top: 3px; font-size: 15px; line-height: 22px; letter-spacing: -0.02em; color: var(--body); }
.project-head .summary { font-size: 14px; line-height: 16.8px; color: var(--muted); }
.project img { width: 100%; height: auto; margin-top: 48px; object-fit: contain; }
.project img.r6 { border-radius: 6px; }
.project img.r4 { border-radius: 4px; }

/* ==========================================================================
   About
   ========================================================================== */
.about-main { width: min(936px, 100% - 2 * var(--pad)); margin: 236px auto 0; }
.about-intro { display: flex; align-items: flex-start; gap: 48px; }
.about-intro img { width: 125px; height: 125px; border-radius: 50%; object-fit: cover; flex: none; }
.about-intro h1 { font-size: 32px; line-height: 41.6px; font-weight: 400; letter-spacing: -0.02em; }

.about-section { border-top: 1px solid var(--line); margin-top: 60px; padding-top: 63px; }
.about-section + .about-section { margin-top: 68px; padding-top: 69px; }
.about-section-head { display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.ext-links { display: flex; align-items: center; gap: 24px; font-size: 15px; line-height: 25px; font-weight: 500; letter-spacing: -0.02em; color: var(--lead); }
.ext-links a { display: inline-flex; align-items: center; gap: 8px; }
.ext-links a:hover { color: var(--black); }
.ext-links .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--black); }

.timeline { list-style: none; padding: 0; margin-top: 70px; display: flex; flex-direction: column; gap: 48px; }
.timeline > li { display: grid; grid-template-columns: 1fr 1fr; }
.entry { display: flex; gap: 24px; align-items: flex-start; }
.entry-logo { width: 72px; height: 72px; flex: none; border-radius: 8px; border: 1px solid #e6e6e6; background: var(--tile); display: grid; place-items: center; }
.entry-meta { padding-top: 4px; }
.entry-meta .name { font-size: 14px; line-height: 16.8px; color: var(--black); }
.entry-meta .name a:hover { text-decoration: underline; }
.entry-meta .role { font-size: 14px; line-height: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--muted); }
.entry-meta .dates { display: flex; align-items: center; gap: 8px; }
.entry-meta .t-body { margin-top: 4px; }
.entry-meta .name + .t-body { margin-top: 4px; }
.entry-meta .t-body + .t-body { margin-top: 4px; }
.entry-desc { margin: 0; }

/* ==========================================================================
   Case studies
   ========================================================================== */
.case { --media: 959px; --text: 671px; --top: 119px; --hero-gap: 48px; }
.case-main { width: min(var(--media), 100% - 2 * var(--pad)); margin: 0 auto; padding-top: var(--top); }
.case-main > :not(figure):not(hr):not(.stats-wrap) { width: min(var(--text), 100%); margin-left: auto; margin-right: auto; }

.case-meta { display: flex; justify-content: space-between; align-items: baseline; }
.case-meta .kind { font-size: 14px; line-height: 15.4px; letter-spacing: -0.04em; color: var(--muted); }
.case-meta time { font-size: 14px; line-height: 22px; letter-spacing: -0.02em; color: var(--muted); }
.flow > .case-title { margin-top: 100px; font-size: 24px; line-height: 31.2px; font-weight: 600; letter-spacing: -0.04em; }
.flow > .case-credits { margin-top: 28px; }
.flow > .case-hero { margin-top: var(--hero-gap); }

/* vertical rhythm inside the article */
.flow > * + * { margin-top: 24px; }
.flow > hr { margin-top: 48px; }
.flow > hr + * { margin-top: 48px; }
.flow > h2 + *, .flow > h3 + * { margin-top: 12px; }
.flow > h2 + h3 { margin-top: 24px; }
.flow > p + p { margin-top: 20px; }
.flow > figure + figure { margin-top: 16px; }
.flow > .caption + figure { margin-top: 8px; }
.flow > figure.space-lg { margin-top: 48px; }
.flow > figure + h3 { margin-top: 40px; }
.flow > * + .stats-wrap, .flow > .callout + * { margin-top: 24px; }
.flow > .cta + * { margin-top: 32px; }
.flow > .cta { margin-top: 32px; }

.flow figure img { width: 100%; height: auto; border-radius: 6px; object-fit: cover; }
.flow figure.contain img { object-fit: contain; }
.flow figure.square img { border-radius: 0; }
img[style*="--ar"] { aspect-ratio: var(--ar); object-fit: cover; }
img.framed { outline: 1px solid #e5e5e5; outline-offset: -1px; }

.flow ul { padding-left: 21px; font-size: 14px; line-height: 22px; letter-spacing: -0.02em; color: var(--muted); }
.flow > p + ul { margin-top: 0; }

.callout { background: var(--card); border-radius: 16px; padding: 24px; }
.callout > * + * { margin-top: 12px; }
.callout .t-lead { color: var(--black); }
.callout .t-lead + .t-lead { margin-top: 20px; }
.callout.note { padding: 16px; }
.callout.note > .t-small { margin: 0; }

.stats-wrap { width: min(var(--text), 100%); margin-left: auto; margin-right: auto; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card); border-radius: 16px; padding: 32px; text-align: center; }
.stat:nth-child(3) { grid-column: 1 / -1; }
.stat:nth-child(3) .stat-desc { max-width: 440px; margin-left: auto; margin-right: auto; }
.stat-num { font-size: 32px; line-height: 38.4px; font-weight: 400; font-variation-settings: "opsz" 32; }
.stat-num strong { font-weight: 700; }
.stat-label { font-size: 15px; line-height: 25px; font-weight: 500; letter-spacing: -0.02em; }
.stat-title { font-size: 16px; line-height: 20.8px; font-weight: 500; font-variation-settings: "opsz" 32; }
.stat-desc { margin-top: 24px; }
.stat-title + .stat-desc { margin-top: 24px; }

.cta { display: flex; justify-content: center; width: auto !important; }
.cta a {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--black); color: #fff; border-radius: 100px;
  padding: 8px 16px; font-size: 15px; line-height: 22px; letter-spacing: -0.02em;
  transition: opacity .2s;
}
.cta a:hover { opacity: .8; }

/* ==========================================================================
   Custom cursor (pointer devices only)
   ========================================================================== */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 50; pointer-events: none;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 16px; min-width: 16px; padding: 0;
  border-radius: 100px; background: var(--blue); color: #fff;
  opacity: 0; transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: opacity .2s, height .25s, padding .25s;
  will-change: transform;
}
.cursor.is-visible { opacity: 1; }
.cursor .cursor-label { display: none; font-size: 15px; line-height: 22px; white-space: nowrap; }
.cursor .cursor-icon { display: none; width: 17px; height: 17px; }
.cursor.is-project { height: 32px; padding: 5px 8px; }
.cursor.is-project .cursor-label, .cursor.is-project .cursor-icon { display: block; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Load-in motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .appear { animation: appear .8s cubic-bezier(.2, .7, .2, 1) both; }
  .appear-2 { animation-delay: .08s; }
  .appear-3 { animation-delay: .16s; }
  @keyframes appear { from { opacity: 0; transform: translateY(16px); } }
}

/* ==========================================================================
   Tablet (810–1199px)
   ========================================================================== */
@media (max-width: 1199.98px) {
  :root { --pad: 48px; }
  .site-header { padding-top: 28px; }
  .signature { width: 77px; height: 34px; }
  .site-footer { margin-top: 140px; }

  .home .site-header {
    padding-top: 28px; padding-bottom: 28px; background: #fff;
    display: grid; grid-template-columns: 1fr auto;
  }
  .home .site-name { display: none; }
  .home-nav { position: static; }
  .home-nav ul { flex-direction: row; gap: 24px; }
  .home-layout { width: auto; margin: 48px var(--pad) 0; }
  .intro .t-small { margin-top: 48px; }
  .intro h1 br { display: none; }
  .projects { margin-top: 100px; }
  .project-head { grid-template-columns: 362px 1fr; column-gap: 45px; }

  .about .site-header { padding-top: 21px; }
  .about-main { width: auto; margin: 93px 50px 0; }
  .about-intro { flex-direction: column; gap: 48px; }

  .case .site-header { position: sticky; top: 0; z-index: 5; background: #fff; padding-top: 28px; padding-bottom: 28px; }
  .case { --media: 800px; --text: 600px; --top: 45px; --hero-gap: 48px; }
  img[style*="--ar-t"] { aspect-ratio: var(--ar-t); }
}

/* ==========================================================================
   Mobile (< 810px)
   ========================================================================== */
@media (max-width: 809.98px) {
  :root { --pad: 20px; }
  .site-header { padding-top: 26px; }
  .signature { width: 64px; height: 28px; }

  .home .site-header { padding-top: 22px; padding-bottom: 21px; }
  .home-nav ul { gap: 20px; }
  .home-layout { margin-top: 76px; }
  .intro .t-small { margin-top: 32px; }
  .project { padding-top: 80px; padding-bottom: 80px; }
  .project-head { display: block; }
  .project-head .summary { margin-top: 16px; }

  .about-main { margin: 74px var(--pad) 0; }
  .about-intro { gap: 24px; }
  .about-section-head { display: block; }
  .ext-links { margin-top: 32px; }
  .about-section + .about-section { margin-top: 72px; padding-top: 73px; }
  .timeline { margin-top: 72px; }
  .timeline > li { display: block; }
  .entry-desc { margin-top: 24px; }

  .case .site-header { position: static; padding: 26px var(--pad) 0; }
  .case { --media: 100%; --text: 100%; --top: 79px; }
  .stats { grid-template-columns: 1fr; }
  img[style*="--ar-m"] { aspect-ratio: var(--ar-m); }
  .stat:nth-child(3) { grid-column: auto; }

  .site-footer { flex-direction: column; gap: 24px; margin-top: 120px; }
}
