@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn/Vazirmatn[wght].f6d31671339d.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: dark light;
  --font-sans: "Segoe UI", Tahoma, Arial, sans-serif;
  --font-display: "Segoe UI", Tahoma, Arial, sans-serif;
  --container: 1180px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 30px;
  --radius-pill: 999px;
  --shadow-sm: 0 10px 35px rgba(0, 0, 0, .08);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, .25);
  --transition: 180ms ease;
  --color-navy: #0d1b2a;
  --color-gold: #c9a15a;
  --color-cream: #f7f4ee;
  --color-mist: #e6e2da;
  --color-cyan: #83dbe5;
}

html[lang="fa"] {
  --font-sans: "Vazirmatn", Tahoma, Arial, sans-serif;
  --font-display: "Vazirmatn", Tahoma, Arial, sans-serif;
}

html[data-theme="dark"],
.theme-dark {
  color-scheme: dark;
  --color-bg: #0b0e12;
  --color-bg-soft: #11151a;
  --color-surface: #151a20;
  --color-surface-2: #1b2128;
  --color-text: #f6f4ef;
  --color-text-muted: #aeb5bd;
  --color-border: rgba(255, 255, 255, .11);
  --color-border-strong: rgba(255, 255, 255, .22);
  --color-accent: #d5ae66;
  --color-accent-strong: #e8c47e;
  --color-accent-soft: rgba(201, 161, 90, .14);
  --color-inverse: #0b0e12;
  --color-success: #70d29c;
  --color-danger: #ff8f8f;
  --header-bg: rgba(11, 14, 18, .78);
}

html[data-theme="light"],
.theme-light {
  color-scheme: light;
  --color-bg: #f7f4ee;
  --color-bg-soft: #efebe3;
  --color-surface: #ffffff;
  --color-surface-2: #f3efe7;
  --color-text: #0d1b2a;
  --color-text-muted: #5f6670;
  --color-border: rgba(13, 27, 42, .12);
  --color-border-strong: rgba(13, 27, 42, .22);
  --color-accent: #a8792f;
  --color-accent-strong: #7c551c;
  --color-accent-soft: rgba(201, 161, 90, .18);
  --color-inverse: #ffffff;
  --color-success: #1c8150;
  --color-danger: #b33f3f;
  --header-bg: rgba(247, 244, 238, .84);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 112px;

  background: var(--color-bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

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

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

p,
h1,
h2,
h3,
h4,
dl,
dd,
ul,
ol,
figure {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -.025em;
}

h1 {
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  margin-bottom: 1.4rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

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

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

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

.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0;
  scroll-margin-top: 112px;
}

#home,
#about,
#partners,
#services,
#portfolio,
#skills,
#experience,
#education,
#contact {
  scroll-margin-top: 112px;
}

.section-dark {
  color: #f7f4ee;
  background:
    radial-gradient(circle at 15% 20%, rgba(201, 161, 90, .12), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(131, 219, 229, .08), transparent 28%),
    #0b0e12;
}

.section-light {
  background: var(--color-bg);
  color: var(--color-text);
}

.section-bordered {
  border-block: 1px solid var(--color-border);
}

.section-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1rem;
  color: var(--color-accent);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section-kicker::before,
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

.section-heading {
  margin-bottom: clamp(32px, 5vw, 64px);
}

.section-heading p,
.section-lead,
.hero-lead,
.project-summary,
.rich-copy {
  color: var(--color-text-muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
}

.section-dark .section-heading p,
.section-dark .hero-lead,
.section-dark .project-summary {
  color: #bcc2c8;
}

.centered {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.centered .section-kicker {
  justify-content: center;
}

.split-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
  gap: 50px;
  align-items: end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 48px;
  padding: .85rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition), border-color var(--transition), color var(--transition);
}

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

.button-primary {
  background: linear-gradient(135deg, #d7b26d, #b98635);
  color: #101216;
  box-shadow: 0 12px 30px rgba(201, 161, 90, .18);
}

.button-primary:hover {
  background: linear-gradient(135deg, #e1c187, #c99b52);
}

.button-ghost {
  border-color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .045);
  color: inherit;
}

.section-light .button-ghost {
  border-color: var(--color-border-strong);
  background: transparent;
}

.text-link,
.text-button,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--color-accent-strong);
  font-weight: 800;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.skip-link {
  position: fixed;
  inset-inline-start: 18px;
  top: -80px;
  z-index: 9999;
  padding: .8rem 1rem;
  background: var(--color-accent);
  color: #111;
  border-radius: 0 0 8px 8px;
  font-weight: 800;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

.empty-state {
  padding: 28px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.empty-state.inverted {
  color: #aeb5bd;
  border-color: rgba(255, 255, 255, .18);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .contact-section,
  .project-modal,
  .hero-actions,
  .project-actions {
    display: none !important;
  }

  body,
  .section,
  .section-dark,
  .section-light {
    color: #000 !important;
    background: #fff !important;
  }
}

/* Lenis must not compete with browser smooth scrolling. */
html.lenis, html.lenis body { scroll-behavior: auto !important; }
