/* =========================================================
   LUMIN — Design System
   Ink base + four project light temperatures.
   Fraunces (display) / Space Grotesk (body) / IBM Plex Mono (utility)
   ========================================================= */

:root {
  /* color */
  --ink: #0B0D10;
  --ink-soft: #14171C;
  --ink-line: rgba(243, 239, 231, 0.12);
  --paper: #F3EFE7;
  --paper-dim: rgba(243, 239, 231, 0.62);
  --paper-faint: rgba(243, 239, 231, 0.38);

  --gold: #E8B36B;
  --cyan: #6FD3C7;
  --violet: #A98CF0;
  --amber: #E8935A;

  --light: var(--gold);
  /* default / lumin signature light */

  /* type */
  --font-display: "Fraunces", ui-serif, Georgia, serif;
  --font-body: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* layout */
  --container: 1180px;
  --gutter: clamp(24px, 6vw, 96px);
  --section-pad: clamp(96px, 14vw, 200px);

  /* motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

::selection {
  background: var(--light);
  color: var(--ink);
}

/* focus visibility — never sacrificed for aesthetics */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  inset-inline-start: -999px;
  top: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 12px 20px;
  z-index: 999;
  font-family: var(--font-mono);
  font-size: 13px;
}

.skip-link:focus {
  inset-inline-start: 16px;
  top: 16px;
}

/* =========================================================
   Grain overlay — very subtle, sits above everything
   ========================================================= */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: 0.035;
  mix-blend-mode: overlay;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   Custom cursor
   ========================================================= */
.cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--paper);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--paper-dim);
  transition: width .25s var(--ease), height .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}

.cursor-ring.is-active {
  width: 56px;
  height: 56px;
  border-color: var(--light);
}

@media (hover:none),
(pointer:coarse) {
  .cursor {
    display: none;
  }
}

body.no-custom-cursor .cursor {
  display: none;
}

/* =========================================================
   Header / nav
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  mix-blend-mode: difference;
}

.logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 40px);
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--paper-dim);
  position: relative;
  padding-bottom: 3px;
}

.site-nav a:hover {
  color: var(--paper);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--paper);
  transition: right .3s var(--ease);
}

.site-nav a:hover::after {
  right: 0;
}

.nav-cta {
  border: 1px solid var(--paper-dim);
  padding: 8px 16px;
  border-radius: 999px;
}

.nav-cta::after {
  display: none;
}

.nav-cta:hover {
  border-color: var(--paper);
}

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1px;
  background: var(--paper);
  width: 100%;
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 45;
  background: var(--ink);
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 28px;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform .5s var(--ease);
}

.mobile-nav.is-open {
  transform: translateY(0);
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
}

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-nav {
    display: flex;
  }
}

/* =========================================================
   Utility: scroll reveal
   ========================================================= */
.reveal-up,
.reveal-scale {
  opacity: 0;
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--delay, 0) * 70ms);
}

.reveal-up {
  transform: translateY(28px);
}

.reveal-scale {
  transform: scale(.96);
}

.reveal-up.in-view,
.reveal-scale.in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-up,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* =========================================================
   Section shell
   ========================================================= */
section {
  position: relative;
  padding: var(--section-pad) var(--gutter);
  max-width: var(--container);
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--light);
  margin: 0 0 18px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.08;
  margin: 0 0 20px;
  max-width: 14ch;
}

.section-note {
  color: var(--paper-dim);
  max-width: 46ch;
  font-size: 17px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-headline {
  margin: 0 0 28px;
}

.light-text {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(42px, 8.6vw, 108px);
  line-height: 1.03;
  letter-spacing: -0.01em;
  display: inline-block;
  color: var(--paper-faint);
  background: linear-gradient(var(--paper), var(--paper));
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  --mx: 50%;
  --my: 40%;
  -webkit-mask-image: radial-gradient(circle 320px at var(--mx) var(--my), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 78%);
  mask-image: radial-gradient(circle 320px at var(--mx) var(--my), rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0) 78%);
  transition: font-variation-settings .2s linear;
}

@supports not (background-clip: text) {
  .light-text {
    color: var(--paper);
    -webkit-text-fill-color: var(--paper);
  }
}

.hero-sub {
  max-width: 46ch;
  font-size: 18px;
  color: var(--paper-dim);
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 90px;
}

.btn {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 15px 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .3s var(--ease), background .3s, border-color .3s, color .3s;
}

.btn-primary {
  background: var(--paper);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--light);
}

.btn-ghost {
  border: 1px solid var(--paper-dim);
}

.btn-ghost:hover {
  border-color: var(--paper);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--paper-faint);
}

.scroll-cue span {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--paper-dim), transparent);
  animation: scrollcue 2.2s var(--ease) infinite;
}

.scroll-cue em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

@keyframes scrollcue {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
  }

  50.1% {
    transform-origin: bottom;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-cue span {
    animation: none;
  }
}

/* =========================================================
   SELECTED WORK
   ========================================================= */
.work {
  padding-top: var(--section-pad);
}

.section-head {
  margin-bottom: clamp(60px, 8vw, 110px);
}

.project {
  --accent: var(--gold);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
  padding: clamp(48px, 7vw, 90px) 0;
  border-top: 1px solid var(--ink-line);
}

.project:last-child {
  border-bottom: 1px solid var(--ink-line);
}

.project[data-light="gold"] {
  --accent: var(--gold);
}

.project[data-light="cyan"] {
  --accent: var(--cyan);
}

.project[data-light="violet"] {
  --accent: var(--violet);
}

.project[data-light="amber"] {
  --accent: var(--amber);
}

.project-reverse {
  direction: rtl;
}

.project-reverse>* {
  direction: ltr;
}

.project-visual {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}

.project:hover .project-visual img {
  transform: scale(1.045);
}

.visual-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%);
  mix-blend-mode: screen;
  opacity: .55;
  pointer-events: none;
}

.eco-graphic {
  width: 100%;
  height: 100%;
  padding: 20px;
}

.lumin-graphic {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lumin-ray {
  position: absolute;
  width: 220%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .5;
  animation: rayrotate 12s linear infinite;
}

.r1 {
  animation-duration: 14s;
}

.r2 {
  transform: rotate(60deg);
  animation-duration: 18s;
}

.r3 {
  transform: rotate(-60deg);
  animation-duration: 22s;
}

@keyframes rayrotate {
  to {
    transform: rotate(360deg);
  }
}

.lumin-word {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 46px);
  color: var(--paper);
}

@media (prefers-reduced-motion: reduce) {
  .lumin-ray {
    animation: none;
  }
}

.project-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

.project h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 44px);
  margin: 0 0 16px;
}

.project-copy>p {
  color: var(--paper-dim);
  max-width: 42ch;
  margin: 0 0 22px;
  font-size: 16px;
}

.project-points {
  list-style: none;
  margin: 0 0 30px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-points li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--paper-dim);
}

.project-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 1px;
  background: var(--accent);
}

.project-link {
  font-family: var(--font-mono);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--paper);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: gap .3s var(--ease), color .3s;
}

.project-link:hover {
  gap: 14px;
  color: var(--accent);
}

.project-link-soon {
  color: var(--paper-faint);
  border-bottom-color: var(--ink-line);
  cursor: default;
}

@media (max-width: 860px) {

  .project,
  .project-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

/* =========================================================
   HOW I THINK
   ========================================================= */
.thinking {
  text-align: center;
}

.principles {
  display: grid;
  gap: clamp(40px, 6vw, 70px);
  margin-top: 40px;
}

.principle {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(28px, 5.4vw, 56px);
  line-height: 1.15;
  color: var(--paper-faint);
  margin: 0;
}

.principle span {
  color: var(--paper);
  font-weight: 500;
}

/* =========================================================
   CAPABILITIES
   ========================================================= */
.capability-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: 4px;
  overflow: hidden;
}

.capability {
  background: var(--ink);
  padding: clamp(28px, 3vw, 40px);
}

.capability h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  margin: 0 0 10px;
}

.capability p {
  color: var(--paper-dim);
  font-size: 14.5px;
  margin: 0;
  max-width: 40ch;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}

.tech-tags span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--paper-dim);
  border: 1px solid var(--ink-line);
  padding: 8px 14px;
  border-radius: 999px;
}

@media (max-width: 700px) {
  .capability-list {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ABOUT
   ========================================================= */
.about-inner {
  max-width: 680px;
}

.about-text {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(20px, 2.6vw, 28px);
  line-height: 1.5;
  color: var(--paper-dim);
  margin: 0 0 28px;
}

.about-text:first-of-type {
  color: var(--paper);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  text-align: center;
  padding-bottom: clamp(120px, 14vw, 200px);
}

.contact h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.08;
  margin: 0 0 40px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2vw, 20px);
  color: var(--light);
  border-bottom: 1px solid var(--light);
  padding-bottom: 6px;
  margin-bottom: 50px;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
}

.contact-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--paper-dim);
  border: 1px solid var(--ink-line);
  padding: 10px 20px;
  border-radius: 999px;
  transition: color .3s, border-color .3s;
}

.contact-links a:hover {
  color: var(--paper);
  border-color: var(--paper-dim);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 30px var(--gutter) 40px;
  max-width: var(--container);
  margin: 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-faint);
  border-top: 1px solid var(--ink-line);
}

@media (max-width: 500px) {
  .site-footer {
    flex-direction: column;
    gap: 8px;
  }
}

/* =========================================================
   Multilingual layer — EN / FA / AR
   ========================================================= */
:root {
  --font-rtl: "Vazirmatn", "Noto Sans Arabic", Tahoma, sans-serif;
}

.mobile-controls {
  display: none;
  align-items: center;
  gap: 16px;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: clamp(8px, 1vw, 16px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  white-space: nowrap;
}

.language-switcher button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--paper-faint);
  padding: 4px 2px;
  font: inherit;
  cursor: pointer;
  transition: color .25s ease, opacity .25s ease;
}

.language-switcher button:hover,
.language-switcher button.is-active {
  color: var(--paper);
}

.language-switcher button.is-active {
  color: var(--light);
}

.language-switcher span {
  color: var(--paper-faint);
}

body.lang-rtl {
  font-family: var(--font-rtl);
}

body.lang-rtl .eyebrow,
body.lang-rtl .project-index,
body.lang-rtl .project-link,
body.lang-rtl .btn,
body.lang-rtl .site-nav a,
body.lang-rtl .contact-email,
body.lang-rtl .contact-links a,
body.lang-rtl .site-footer,
body.lang-rtl .language-switcher,
body.lang-rtl .scroll-cue em {
  font-family: var(--font-rtl);
}

body.lang-rtl .hero-headline,
body.lang-rtl .section-head h2,
body.lang-rtl .project h3,
body.lang-rtl .principle,
body.lang-rtl .about-text,
body.lang-rtl .contact h2,
body.lang-rtl .logo,
body.lang-rtl .mobile-nav a {
  font-family: var(--font-rtl);
}

body.lang-rtl .hero-headline,
body.lang-rtl .hero-sub,
body.lang-rtl .section-head,
body.lang-rtl .section-note,
body.lang-rtl .project-copy,
body.lang-rtl .capabilities,
body.lang-rtl .about-inner {
  text-align: right;
}

body.lang-rtl .thinking,
body.lang-rtl .contact {
  text-align: center;
}

body.lang-rtl .project,
body.lang-rtl .project-reverse {
  direction: rtl;
}

body.lang-rtl .project>*,
body.lang-rtl .project-reverse>* {
  direction: rtl;
}

body.lang-rtl .project-points li {
  padding-inline-start: 20px;
  padding-inline-end: 0;
}

body.lang-rtl .project-points li::before {
  inset-inline-start: 0;
}

body.lang-rtl .project-link {
  flex-direction: row-reverse;
}

body.lang-rtl .tech-tags {
  justify-content: flex-start;
}

body.lang-rtl .mobile-nav {
  align-items: flex-end;
}

body.lang-rtl .scroll-cue {
  flex-direction: row-reverse;
}

body.lang-rtl .scroll-cue em {
  writing-mode: vertical-lr;
}

body.lang-rtl .site-footer {
  direction: rtl;
}

body.lang-rtl .nav-cta {
  font-family: var(--font-rtl);
}

body.lang-rtl .language-switcher {
  letter-spacing: 0;
}

body.lang-rtl .light-text {
  line-height: 1.25;
}

body.lang-rtl .hero-sub,
body.lang-rtl .section-note,
body.lang-rtl .project-copy>p,
body.lang-rtl .capability p {
  line-height: 1.9;
}

@media (max-width:760px) {
  .site-header {
    padding: 18px var(--gutter);
  }

  .site-nav {
    display: none;
  }

  .mobile-controls {
    display: flex;
  }

  .mobile-controls .language-switcher {
    margin-left: 0;
  }

  .mobile-nav .language-switcher {
    display: none;
  }
}

@media (min-width:761px) {
  .site-nav .language-switcher {
    display: flex;
  }
}

@media (max-width:700px) {
  body.lang-rtl .tech-tags {
    justify-content: flex-start;
  }
}