@charset "UTF-8";

@font-face {
  font-family: "HWFont";
  src: url("../../files/fonts/hwfont.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Momo";
  src: url("../../files/fonts/momofont.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #090a0c;
  --bg-raised: #0e1014;
  --surface: rgba(19, 22, 28, 0.78);
  --surface-solid: #14171d;
  --surface-strong: #1a1e25;
  --text: #f4f5f7;
  --text-muted: #a9afb9;
  --text-subtle: #787f8b;
  --accent: #f5d547;
  --accent-strong: #ffe36a;
  --accent-soft: rgba(245, 213, 71, 0.12);
  --accent-line: rgba(245, 213, 71, 0.32);
  --success: #63d9a1;
  --danger: #ff8c8c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, 0.38);
  --radius-sm: 0.85rem;
  --radius-md: 1.25rem;
  --radius-lg: 1.75rem;
  --container: 72rem;
  --header-height: 4.75rem;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-fa: Inter, "Vazirmatn", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  scrollbar-color: var(--accent) var(--bg);
  scrollbar-width: thin;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(245, 213, 71, 0.07), transparent 28rem),
    radial-gradient(circle at 88% 22%, rgba(74, 120, 255, 0.08), transparent 32rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[lang="fa"] body {
  font-family: var(--font-fa);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 0.65px, transparent 0.75px),
    radial-gradient(circle, rgba(245, 213, 71, 0.08) 0.7px, transparent 0.8px);
  background-position: 0 0, 11px 13px;
  background-size: 26px 26px, 31px 31px;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.78), transparent 88%);
  opacity: 0.42;
  pointer-events: none;
  content: "";
}

body::after {
  position: fixed;
  inset: auto -16rem 8% auto;
  z-index: -3;
  width: 34rem;
  aspect-ratio: 1;
  border-radius: 44% 56% 62% 38% / 48% 38% 62% 52%;
  background: rgba(65, 91, 180, 0.08);
  filter: blur(5rem);
  pointer-events: none;
  content: "";
}

::selection {
  background: var(--accent);
  color: #111318;
}

::-webkit-scrollbar {
  width: 0.7rem;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  border: 0.18rem solid var(--bg);
  border-radius: 99rem;
  background: var(--accent);
}

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

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
}

p,
h1,
h2,
h3 {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
p {
  margin-block-start: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: min(calc(100% - 2.5rem), var(--container));
  margin-inline: auto;
}

.section {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8rem);
}

.section--compact {
  padding-block: clamp(3.75rem, 7vw, 5.5rem);
}

.section-anchor {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

html[lang="fa"] .eyebrow {
  letter-spacing: 0;
}

.eyebrow::before {
  width: 1.9rem;
  height: 1px;
  background: var(--accent);
  content: "";
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 29rem);
  gap: 2rem;
  align-items: end;
  margin-bottom: clamp(2.25rem, 5vw, 4rem);
}

.section-heading h2 {
  max-width: 13ch;
  margin-bottom: 0;
  font-size: clamp(2.2rem, 5vw, 4.75rem);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

html[lang="fa"] .section-heading h2 {
  max-width: 18ch;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 1.4vw, 1.12rem);
}

.skip-link {
  position: fixed;
  inset-block-start: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: var(--accent);
  color: #101216;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

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

.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid transparent;
  background: rgba(9, 10, 12, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  transition: border-color 180ms ease, background 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
  background: rgba(9, 10, 12, 0.9);
}

.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-family: "hwfont";
}

.brand-mark {
  display: grid;
  width: 2.35rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 0.75rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: -0.04em;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.header-actions,
.primary-nav,
.primary-nav ul {
  display: flex;
  align-items: center;
}

.primary-nav ul {
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav a,
.language-link {
  display: inline-flex;
  min-height: 2.55rem;
  align-items: center;
  justify-content: center;
  padding-inline: 0.8rem;
  border-radius: 0.7rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.primary-nav a:hover,
.primary-nav a[aria-current="true"],
.language-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.language-link {
  margin-inline-start: 0.55rem;
  border: 1px solid var(--border);
  color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface-solid);
  color: var(--text);
  cursor: pointer;
}

.menu-toggle-lines,
.menu-toggle-lines::before,
.menu-toggle-lines::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  margin-inline: auto;
  border-radius: 1rem;
  background: currentColor;
  content: "";
  transition: transform 160ms ease, opacity 160ms ease;
}

.menu-toggle-lines::before {
  transform: translateY(-0.36rem);
}

.menu-toggle-lines::after {
  transform: translateY(0.24rem);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines {
  background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::before {
  transform: translateY(0.1rem) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines::after {
  transform: translateY(0) rotate(-45deg);
}

.hero {
  display: grid;
  min-height: calc(100svh - var(--header-height));
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(20rem, 0.85fr);
  gap: clamp(3rem, 8vw, 7rem);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 11ch;
  margin-bottom: 1.5rem;
  font-size: clamp(3.5rem, 8.2vw, 7.8rem);
  font-weight: 780;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

html[lang="fa"] .hero h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 6.5rem);
  letter-spacing: -0.04em;
  line-height: 1.14;
}

.hero h1 .accent-word {
  color: var(--accent);
}

html:not([lang="fa"]) .hero h1 .accent-word {
  display: inline-block;
  font-family: "Momo", var(--font-sans);
  font-weight: 400;
  letter-spacing: 0;
  transform: rotate(-2deg) translateY(0.04em);
}

.hero-intro {
  max-width: 42rem;
  margin-bottom: 2.1rem;
  color: var(--text-muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3.15rem;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.78rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 0.85rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  background: var(--accent);
  color: #111318;
  box-shadow: 0 12px 28px rgba(245, 213, 71, 0.15);
}

.button--primary:hover {
  background: var(--accent-strong);
  box-shadow: 0 16px 38px rgba(245, 213, 71, 0.22);
}

.button--secondary {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.button--secondary:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.arrow {
  transition: transform 160ms ease;
}

[dir="rtl"] .arrow {
  transform: scaleX(-1);
}

.button:hover .arrow,
.text-link:hover .arrow {
  transform: translateX(0.2rem);
}

[dir="rtl"] .button:hover .arrow,
[dir="rtl"] .text-link:hover .arrow {
  transform: scaleX(-1) translateX(0.2rem);
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.hero-links a {
  text-underline-offset: 0.3em;
}

.hero-links a:hover {
  color: var(--text);
}

.identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.6rem;
  padding: 0.55rem 0.8rem 0.55rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 99rem;
  background: rgba(255, 255, 255, 0.025);
}

[dir="rtl"] .identity-chip {
  padding: 0.55rem 0.55rem 0.55rem 0.8rem;
}

.identity-chip img {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  object-fit: cover;
}

.identity-chip strong,
.identity-chip span {
  display: block;
}

.identity-chip strong {
  font-size: 0.86rem;
}

.identity-chip span {
  color: var(--text-subtle);
  font-size: 0.72rem;
}

.system-visual {
  position: relative;
  min-height: 33rem;
}

.system-visual::before,
.system-visual::after {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  pointer-events: none;
  content: "";
}

.system-visual::before {
  inset-block-start: 8%;
  inset-inline-end: 4%;
  width: 15rem;
  height: 15rem;
  background: radial-gradient(circle, rgba(245, 213, 71, 0.16), transparent 70%);
}

.system-visual::after {
  inset-block-end: 5%;
  inset-inline-start: 6%;
  width: 13rem;
  height: 13rem;
  background: radial-gradient(circle, rgba(77, 124, 255, 0.14), transparent 70%);
}

.system-panel {
  position: absolute;
  inset: 1.5rem 0 0 1.5rem;
  z-index: 1;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(25, 28, 35, 0.96), rgba(13, 15, 19, 0.9));
  box-shadow: var(--shadow-lg);
}

[dir="rtl"] .system-panel {
  inset: 1.5rem 1.5rem 0 0;
}

.system-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  pointer-events: none;
  content: "";
}

.system-toolbar {
  display: flex;
  min-height: 3.4rem;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.2rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--success);
}

.system-status::before {
  width: 0.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.22rem rgba(99, 217, 161, 0.12);
  content: "";
}

.system-flow {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
}

.system-node {
  position: relative;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
}

.system-node:not(:last-child)::after {
  position: absolute;
  inset-block-end: -1.05rem;
  inset-inline-start: 2rem;
  width: 1px;
  height: 1.05rem;
  background: var(--accent-line);
  content: "";
}

.system-node-index {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

.system-node strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.system-node small {
  color: var(--text-muted);
  font-size: 0.83rem;
}

.system-note {
  position: absolute;
  inset-block-end: 0;
  inset-inline-end: -1.25rem;
  z-index: 3;
  width: min(15rem, 62%);
  padding: 1rem 1.05rem;
  border: 1px solid var(--accent-line);
  border-radius: 1rem;
  background: #202018;
  box-shadow: var(--shadow-sm);
  color: #f7edbd;
  font-size: 0.86rem;
  transform: rotate(-2deg);
}

[dir="rtl"] .system-note {
  inset-inline-end: auto;
  inset-inline-start: -1.25rem;
  transform: rotate(2deg);
}

.system-note strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #17181b;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The hero visual is intentionally closer to a thinking desk than a SaaS dashboard. */
.system-panel {
  overflow: hidden;
  border-color: rgba(20, 22, 27, 0.18);
  background: #e9e2c8;
  color: #17181b;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(-1.25deg);
}

[dir="rtl"] .system-panel {
  transform: rotate(1.25deg);
}

.system-panel::before {
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(17, 19, 23, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 19, 23, 0.055) 1px, transparent 1px);
  background-size: 2rem 2rem;
}

.system-toolbar {
  border-color: rgba(20, 22, 27, 0.16);
  color: rgba(20, 22, 27, 0.6);
}

.system-status {
  color: #247553;
}

.system-flow {
  gap: 0.8rem;
  padding: 1.5rem;
}

.system-node {
  border-color: rgba(20, 22, 27, 0.14);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 24px rgba(41, 38, 27, 0.08);
}

.system-node:nth-child(1) {
  margin-inline-end: 1.5rem;
  transform: rotate(0.5deg);
}

.system-node:nth-child(2) {
  margin-inline-start: 1.1rem;
  transform: rotate(-0.65deg);
}

.system-node:nth-child(3) {
  margin-inline: 0.45rem 0.7rem;
  transform: rotate(0.4deg);
}

.system-node:not(:last-child)::after {
  background: rgba(20, 22, 27, 0.24);
}

.system-node-index {
  color: #7b6414;
}

.system-node small {
  color: rgba(20, 22, 27, 0.68);
}

.system-note {
  border: 0;
  border-radius: 0.25rem;
  background: var(--accent);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
  color: #17181b;
  font-family: "Momo", var(--font-sans);
  font-size: 1rem;
  line-height: 1.35;
  transform: rotate(3deg);
}

[dir="rtl"] .system-note {
  font-family: var(--font-fa);
  transform: rotate(-2deg);
}

.metrics-strip {
  position: relative;
  z-index: 2;
  margin-block: 1.5rem;
  border: 0;
  background: var(--accent);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.2);
  color: #15161a;
  transform: rotate(-0.35deg) scale(1.01);
}

[dir="rtl"] .metrics-strip {
  transform: rotate(0.35deg) scale(1.01);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  transform: rotate(0.35deg);
}

[dir="rtl"] .metrics-grid {
  transform: rotate(-0.35deg);
}

.metric {
  position: relative;
  min-height: 9.5rem;
  padding: 1.8rem 2rem;
  border-inline-end: 1px solid rgba(17, 19, 24, 0.18);
}

.metric:last-child {
  border-inline-end: 0;
}

.metric::before {
  position: absolute;
  inset-block-start: 1.2rem;
  inset-inline-end: 1rem;
  color: rgba(17, 19, 24, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  content: "0" counter(metric-counter);
}

.metrics-grid {
  counter-reset: metric-counter;
}

.metric {
  counter-increment: metric-counter;
}

.metric-value {
  display: block;
  margin-bottom: 0.5rem;
  color: #15161a;
  font-family: "Momo", var(--font-sans);
  font-size: clamp(2rem, 3.2vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

[dir="rtl"] .metric-value {
  font-family: var(--font-fa);
  font-weight: 800;
}

.metric-label {
  color: rgba(17, 19, 24, 0.72);
  font-size: 0.88rem;
  line-height: 1.45;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.25rem);
  align-items: start;
}

.principle-card,
.work-card,
.article-card,
.contact-panel {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.principle-card {
  --card-offset: 0rem;
  position: relative;
  min-height: 19rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) 0.35rem;
  border: 0;
  border-top: 1px solid var(--border-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transform: translateY(var(--card-offset));
  transition: transform 180ms ease, border-color 180ms ease;
}

.principle-card:nth-child(2) {
  --card-offset: 2.4rem;
}

.principle-card:nth-child(3) {
  --card-offset: 0.8rem;
}

.principle-card:hover {
  border-color: var(--accent);
  transform: translateY(calc(var(--card-offset) - 0.35rem));
}

.card-index {
  display: inline-flex;
  min-width: 2.2rem;
  min-height: 2.2rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 4.5rem;
  border: 0;
  border-radius: 0;
  color: var(--accent);
  font-family: "Momo", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.15rem;
  transform: rotate(-4deg);
}

.principle-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.principle-card p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.work-card {
  --work-accent: var(--accent);
  --work-tilt: -0.2deg;
  position: relative;
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  padding: clamp(1.35rem, 2.6vw, 2.15rem);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(150deg, color-mix(in srgb, var(--work-accent) 8%, transparent), transparent 38%),
    rgba(17, 20, 25, 0.88);
  align-self: stretch;
  transform: rotate(var(--work-tilt));
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.work-card:nth-child(1) {
  --work-accent: #f5d547;
  --work-tilt: -0.2deg;
  grid-column: span 7;
}

.work-card:nth-child(2) {
  --work-accent: #7297ff;
  --work-tilt: 0.22deg;
  grid-column: span 5;
}

.work-card:nth-child(3) {
  --work-accent: #68d2af;
  --work-tilt: 0.18deg;
  grid-column: span 5;
}

.work-card:nth-child(4) {
  --work-accent: #ff9678;
  --work-tilt: -0.18deg;
  grid-column: span 7;
}

.work-card:hover {
  z-index: 3;
  border-color: color-mix(in srgb, var(--work-accent) 55%, transparent);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
  transform: translateY(-0.4rem) rotate(0deg);
}

.work-card::before {
  position: absolute;
  inset-block-start: 4.2rem;
  inset-inline-end: 1rem;
  z-index: 0;
  color: color-mix(in srgb, var(--work-accent) 15%, transparent);
  font-family: "Momo", var(--font-sans);
  font-size: clamp(5rem, 10vw, 9rem);
  line-height: 1;
  content: attr(data-index);
  pointer-events: none;
  transform: rotate(-7deg);
}

.work-card::after {
  position: absolute;
  inset: auto -15% -45% auto;
  width: 18rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--work-accent) 20%, transparent), transparent 68%);
  pointer-events: none;
  content: "";
}

.work-card-body {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
}

.work-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  z-index: 2;
  color: color-mix(in srgb, var(--work-accent) 75%, var(--text));
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[lang="fa"] .work-label {
  letter-spacing: 0;
}

.work-card h3 {
  max-width: 15ch;
  margin-block: 1.45rem 0.85rem;
  font-size: clamp(1.85rem, 3.5vw, 3.25rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

html[lang="fa"] .work-card h3 {
  max-width: 17ch;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.work-card p {
  max-width: 37rem;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  align-self: start;
}

.work-media {
  position: relative;
  margin: 1.15rem 0 0;
  overflow: hidden;
  aspect-ratio: 2 / 1;
  border: 1px solid color-mix(in srgb, var(--work-accent) 20%, var(--border));
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--work-accent) 10%, transparent), transparent 52%),
    #0a0c10;
}

.work-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: inherit;
  box-shadow: inset 0 -2rem 4rem rgba(0, 0, 0, 0.12);
  pointer-events: none;
  content: "";
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--media-position, center);
  border-radius: inherit;
  transition: transform 420ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.work-card:hover .work-media img {
  transform: scale(1.018);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.38rem 0.68rem;
  border: 1px solid var(--border);
  border-radius: 99rem;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-muted);
  font-size: 0.76rem;
}

#work {
  isolation: isolate;
}

#work::before {
  position: absolute;
  inset: 8% auto auto -14rem;
  z-index: -1;
  width: 28rem;
  aspect-ratio: 1;
  border: 1px solid rgba(245, 213, 71, 0.12);
  border-radius: 42% 58% 38% 62% / 56% 43% 57% 44%;
  content: "";
  transform: rotate(18deg);
}

.journey-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.journey-sticky {
  position: sticky;
  inset-block-start: calc(var(--header-height) + 2.5rem);
}

.journey-sticky h2 {
  max-width: 10ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  letter-spacing: -0.06em;
  line-height: 0.98;
}

html[lang="fa"] .journey-sticky h2 {
  max-width: 13ch;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.journey-sticky p {
  max-width: 29rem;
  color: var(--text-muted);
}

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

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1.5rem;
  padding-block: 0 2.5rem;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  inset-block-start: 1.15rem;
  inset-block-end: 0;
  inset-inline-start: 6.66rem;
  width: 1px;
  background: var(--border-strong);
  content: "";
}

.timeline-year {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
}

.timeline-content {
  position: relative;
  padding-inline-start: 1.6rem;
}

.timeline-content::before {
  position: absolute;
  inset-block-start: 0.35rem;
  inset-inline-start: -0.1rem;
  width: 0.65rem;
  aspect-ratio: 1;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-line);
  content: "";
}

.timeline-content h3 {
  margin-bottom: 0.25rem;
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.timeline-company {
  margin-bottom: 0.75rem;
  color: var(--text-subtle);
  font-size: 0.88rem;
}

.timeline-content p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.article-card {
  display: flex;
  min-height: 17rem;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease;
}

.article-media {
  margin: 0 0 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  overflow: hidden;
}

.article-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-card:hover {
  border-color: var(--accent-line);
  transform: translateY(-4px);
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-subtle);
  font-size: 0.78rem;
}

.article-card h3 {
  margin-block: 2.5rem 0.8rem;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.article-card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.article-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.articles-state {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-align: center;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 750;
  text-decoration: none;
}

.section-footer-link {
  margin-top: 1.5rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1.2fr);
  gap: clamp(2.5rem, 7vw, 6rem);
  padding: clamp(1.75rem, 5vw, 4rem);
  border-radius: var(--radius-lg);
}

.contact-copy h2 {
  max-width: 9ch;
  margin-bottom: 1.2rem;
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  letter-spacing: -0.065em;
  line-height: 0.94;
}

html[lang="fa"] .contact-copy h2 {
  max-width: 11ch;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.contact-copy p {
  max-width: 30rem;
  color: var(--text-muted);
}

.contact-direct {
  display: inline-block;
  margin-top: 0.6rem;
  color: var(--accent);
  font-weight: 750;
  text-underline-offset: 0.3em;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field label {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 0.85rem;
  background: rgba(6, 7, 9, 0.72);
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.form-field input {
  min-height: 3.25rem;
  padding-inline: 1rem;
}

.form-field textarea {
  min-height: 9rem;
  padding: 0.85rem 1rem;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  background: #0b0d11;
  box-shadow: 0 0 0 4px var(--accent-soft);
  outline: 0;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.contact-form button {
  justify-self: start;
  cursor: pointer;
}

.contact-form button:disabled {
  cursor: progress;
  opacity: 0.65;
  transform: none;
}

.form-status {
  min-height: 1.6rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.form-status[data-state="success"] {
  color: var(--success);
}

.form-status[data-state="error"] {
  color: var(--danger);
}

.site-footer {
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

.reveal {
  opacity: 1;
  transform: none;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(1.25rem);
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms ease, transform 520ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (max-width: 62rem) {

  .hero-grid,
  .contact-panel,
  .journey-layout {
    grid-template-columns: 1fr;
  }

  .system-visual {
    width: min(100%, 34rem);
    margin-inline: auto;
  }

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

  .metric:nth-child(2) {
    border-inline-end: 0;
  }

  .metric:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(17, 19, 24, 0.18);
  }

  .principles-grid,
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .principle-card:last-child {
    grid-column: 1 / -1;
    min-height: 17rem;
  }

  .principle-card:nth-child(n) {
    --card-offset: 0rem;
  }

  .work-card:nth-child(n) {
    grid-column: span 6;
  }

  .journey-sticky {
    position: static;
  }

  .journey-sticky h2 {
    max-width: 14ch;
  }
}

@media (max-width: 48rem) {
  :root {
    --header-height: 4.25rem;
  }

  .section {
    padding-block: clamp(3.25rem, 9vw, 4.4rem);
  }

  .section--compact {
    padding-block: clamp(2.75rem, 8vw, 3.75rem);
  }

  .container {
    width: min(calc(100% - 1.5rem), var(--container));
  }

  .primary-nav {
    position: fixed;
    inset-block-start: var(--header-height);
    inset-inline: 0.75rem;
    display: none;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: rgba(14, 16, 20, 0.98);
    box-shadow: var(--shadow-lg);
  }

  .primary-nav[data-open="true"] {
    display: block;
  }

  .primary-nav ul {
    display: grid;
    gap: 0.2rem;
  }

  .primary-nav a {
    justify-content: flex-start;
    padding-inline: 0.9rem;
  }

  .menu-toggle {
    display: block;
  }

  .language-link {
    margin-inline-start: 0;
  }

  .hero {
    min-height: 0;
    padding-block: 2.25rem 3rem;
  }

  .hero-grid {
    gap: 2.1rem;
  }

  .hero h1 {
    font-size: clamp(3.2rem, 16vw, 5.4rem);
  }

  html[lang="fa"] .hero h1 {
    font-size: clamp(2.8rem, 13vw, 4.6rem);
  }

  .hero-intro {
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    gap: 0.6rem;
    margin-bottom: 1.4rem;
  }

  .hero-actions .button {
    width: 100%;
    justify-content: space-between;
    padding-inline: 1rem;
  }

  .hero-links {
    gap: 0.45rem 0.8rem;
  }

  .identity-chip {
    margin-top: 1rem;
  }

  .system-visual {
    min-height: 30rem;
  }

  .system-panel {
    inset-inline: 0.6rem;
  }

  .system-note {
    inset-inline-end: 0;
  }

  [dir="rtl"] .system-note {
    inset-inline-start: 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .section-heading h2 {
    max-width: 15ch;
  }

  .metrics-strip,
  [dir="rtl"] .metrics-strip {
    margin-block: 1rem;
    transform: none;
  }

  .metrics-grid,
  [dir="rtl"] .metrics-grid {
    transform: none;
  }

  .metric {
    min-height: 0;
    padding: 1.25rem 1rem;
  }

  .principles-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .principle-card:last-child {
    grid-column: auto;
  }

  .work-card:nth-child(n) {
    grid-column: 1 / -1;
    min-height: 0;
    transform: none;
  }

  .work-grid {
    gap: 0.75rem;
  }

  .work-card {
    padding: 1.1rem;
  }

  .work-card::before {
    inset-block-start: 4.75rem;
    opacity: 0.22;
    font-size: clamp(3.6rem, 18vw, 5.5rem);
  }

  .work-card h3 {
    margin: 1rem 0 0.65rem;
    font-size: clamp(1.55rem, 8vw, 2.1rem);
    line-height: 1.08;
  }

  .work-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
  }

  .work-media {
    margin-top: 0.85rem;
    aspect-ratio: 16 / 10;
  }

  .tag-list {
    gap: 0.4rem;
  }

  .tag-list li {
    padding: 0.32rem 0.55rem;
    font-size: 0.72rem;
  }

  .timeline-item {
    grid-template-columns: 4.8rem minmax(0, 1fr);
    gap: 0.65rem;
    padding-block-end: 1.8rem;
  }

  .timeline-item:not(:last-child)::before {
    inset-inline-start: 5.45rem;
  }

  .timeline-content {
    padding-inline-start: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .contact-panel {
    gap: 1.5rem;
    padding: 1.2rem;
  }

  .contact-copy h2 {
    margin-bottom: 0.9rem;
    line-height: 1.02;
  }

  .contact-copy p {
    margin-bottom: 0.9rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
  }

  .site-footer {
    padding-block: 1.5rem 2rem;
  }
}

@media (max-width: 34rem) {
  .container {
    width: min(calc(100% - 1.1rem), var(--container));
  }

  .section {
    padding-block: 3.4rem;
  }

  .section--compact {
    padding-block: 2.5rem;
  }

  .brand-name {
    display: none;
  }

  .primary-nav {
    inset-inline: 0.55rem;
  }

  .system-visual {
    min-height: 25rem;
  }

  .system-panel {
    inset-inline: 0.4rem;
    inset-block-start: 0.75rem;
  }

  .system-flow {
    gap: 0.65rem;
    padding: 0.95rem;
  }

  .system-node {
    padding: 0.82rem;
  }

  .system-note {
    width: min(13rem, 82%);
    padding: 0.75rem 0.8rem;
    font-size: 0.84rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .metric:nth-child(2) {
    border-inline-end: 0;
    border-bottom: 1px solid rgba(17, 19, 24, 0.18);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .metric {
    padding: 1rem 0.9rem;
  }

  .work-card {
    padding: 0.95rem;
  }

  .work-media {
    aspect-ratio: 4 / 3;
  }

  .timeline-item {
    grid-template-columns: 4.4rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .timeline-item:not(:last-child)::before {
    inset-inline-start: 5.07rem;
  }

  .contact-panel {
    padding: 1rem;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .motion-ready .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (forced-colors: active) {
  :root {
    --border: CanvasText;
    --border-strong: CanvasText;
  }

  .button,
  .principle-card,
  .work-card,
  .article-card,
  .contact-panel,
  .system-panel,
  .system-node {
    border: 1px solid CanvasText;
  }
}