/* اوسا وب — palette: ink + teal craft + warm stone */
:root {
  --ink: #12201c;
  --ink-soft: #2a3d36;
  --muted: #5c6f67;
  --stone: #f3efe6;
  --stone-2: #e8e2d4;
  --paper: #faf7f0;
  --teal: #0f6b5c;
  --teal-deep: #0a4d42;
  --copper: #c45c26;
  --copper-soft: #d4783f;
  --line: rgba(18, 32, 28, 0.12);
  --radius: 2px;
  --font: "Vazirmatn", Tahoma, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.8;
  font-size: 1.05rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

strong {
  font-weight: 700;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.container {
  width: min(1100px, calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  transition: background 0.35s var(--ease), backdrop-filter 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(250, 247, 240, 0.88);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.2rem;
  height: 2px;
  background: var(--copper);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 1.35rem;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(5px) rotate(-45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-5px) rotate(45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(15, 107, 92, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(196, 92, 38, 0.12), transparent 50%),
    linear-gradient(165deg, #e4ddd0 0%, var(--paper) 45%, #ebe6da 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(15, 107, 92, 0.07) 100%),
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 48px,
      rgba(18, 32, 28, 0.03) 48px,
      rgba(18, 32, 28, 0.03) 49px
    );
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 32, 28, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 28, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, black, transparent 75%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: drift 14s ease-in-out infinite alternate;
}

.hero-orb--1 {
  width: min(48vw, 420px);
  height: min(48vw, 420px);
  top: 8%;
  left: 5%;
  background: rgba(15, 107, 92, 0.28);
}

.hero-orb--2 {
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  bottom: 12%;
  right: 8%;
  background: rgba(196, 92, 38, 0.2);
  animation-delay: -4s;
  animation-duration: 18s;
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(24px, -30px) scale(1.08);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  text-align: center;
}

.brand-mark {
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--teal-deep);
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 40px rgba(15, 107, 92, 0.15);
}

.hero-title {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1rem;
  max-width: 22ch;
  margin-inline: auto;
}

.hero-lead {
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  color: var(--muted);
  max-width: 36ch;
  margin-inline: auto;
  margin-bottom: 2.25rem;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--teal);
  color: #f7f4ec;
}

.btn-primary:hover {
  background: var(--teal-deep);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(18, 32, 28, 0.22);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(18, 32, 28, 0.04);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

.scroll-hint {
  position: absolute;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1.5rem;
  height: 2.4rem;
  border: 1.5px solid rgba(18, 32, 28, 0.28);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 0.45rem;
}

.scroll-hint span {
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: var(--teal);
  animation: scroll-dot 1.6s var(--ease) infinite;
}

@keyframes scroll-dot {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* Sections */
.section {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
}

.section-head {
  max-width: 38rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-head h2 {
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

.about {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--stone) 100%);
}

.about-body {
  display: grid;
  gap: 1.25rem;
  max-width: 46rem;
  color: var(--ink-soft);
  font-size: 1.08rem;
}

.about-body strong {
  color: var(--ink);
}

/* Skills */
.skills {
  background: var(--ink);
  color: #e8e4da;
}

.skills .section-head h2 {
  color: #f5f1e8;
}

.skills .section-head p {
  color: rgba(232, 228, 218, 0.7);
}

.skill {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  padding: clamp(2rem, 4vw, 2.75rem) 0;
  border-top: 1px solid rgba(245, 241, 232, 0.12);
}

.skill:last-child {
  border-bottom: 1px solid rgba(245, 241, 232, 0.12);
}

.skill-index {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--copper-soft);
  padding-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.skill-content h3 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: #f5f1e8;
}

.skill-content h3 span {
  font-weight: 500;
  font-size: 0.72em;
  color: rgba(232, 228, 218, 0.45);
  margin-right: 0.35rem;
}

.skill-lead {
  color: rgba(232, 228, 218, 0.78);
  margin-bottom: 1.35rem;
  max-width: 42rem;
}

.skill-list {
  display: grid;
  gap: 0.55rem;
}

.skill-list li {
  position: relative;
  padding-right: 1.15rem;
  color: rgba(232, 228, 218, 0.68);
  font-size: 0.98rem;
}

.skill-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.9;
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 2.5rem;
}

.wp-grid h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--copper-soft);
  margin-bottom: 0.9rem;
}

/* Projects */
.projects {
  background:
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(15, 107, 92, 0.08), transparent),
    var(--paper);
}

.project-list {
  border-top: 1px solid var(--line);
}

.project-link {
  display: block;
  padding: 1.75rem 0.35rem 1.85rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), padding 0.3s var(--ease);
}

.project-link:hover {
  background: rgba(15, 107, 92, 0.045);
  padding-inline: 1rem;
}

.project-top {
  display: grid;
  grid-template-columns: 3.25rem 1fr auto;
  align-items: start;
  gap: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.project-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--copper);
  padding-top: 0.45rem;
}

.project-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 1rem;
}

.project-name {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 700;
  color: var(--ink);
}

.project-domain {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 400;
  direction: ltr;
}

.project-arrow {
  font-size: 1.15rem;
  color: var(--teal);
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  padding-top: 0.35rem;
}

.project-link:hover .project-arrow {
  opacity: 1;
  transform: translateX(0);
}

.project-desc {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.85;
  max-width: 52rem;
  margin-bottom: 0.95rem;
  padding-right: calc(3.25rem + 1rem);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-right: calc(3.25rem + 1rem);
}

.project-tags li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal-deep);
  background: rgba(15, 107, 92, 0.08);
  border: 1px solid rgba(15, 107, 92, 0.14);
  padding: 0.28rem 0.7rem;
}

/* Contact */
.contact {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(155deg, #083d35 0%, var(--teal-deep) 42%, #125248 100%);
  color: #f3efe6;
  padding-block: clamp(5rem, 12vw, 8rem);
}

.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 15% 20%, rgba(196, 92, 38, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 50% at 90% 80%, rgba(255, 255, 255, 0.06), transparent 55%);
}

.contact-line {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 239, 230, 0.25), transparent);
}

.contact-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.contact-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--copper-soft);
  margin-bottom: 0.85rem;
}

.contact-copy h2 {
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.contact-copy > p {
  color: rgba(243, 239, 230, 0.78);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  max-width: 34rem;
}

.contact-points {
  display: grid;
  gap: 0.55rem;
}

.contact-points li {
  position: relative;
  padding-right: 1.15rem;
  color: rgba(243, 239, 230, 0.72);
  font-size: 0.95rem;
}

.contact-points li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--copper-soft);
}

.contact-card {
  background: rgba(250, 247, 240, 0.08);
  border: 1px solid rgba(243, 239, 230, 0.16);
  backdrop-filter: blur(10px);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: grid;
  gap: 1.25rem;
}

.contact-person {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.contact-avatar {
  flex-shrink: 0;
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(196, 92, 38, 0.25);
  border: 1px solid rgba(212, 120, 63, 0.45);
  color: #f7e8dc;
  font-size: 0.85rem;
  font-weight: 700;
}

.contact-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(243, 239, 230, 0.55);
  margin-bottom: 0.15rem;
}

.contact-person strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.contact-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(243, 239, 230, 0.2), transparent);
}

.contact-phone-block {
  display: block;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(243, 239, 230, 0.1);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.contact-phone-block:hover {
  border-color: rgba(212, 120, 63, 0.45);
  background: rgba(0, 0, 0, 0.28);
}

.contact-phone {
  display: block;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  margin: 0.15rem 0 0.35rem;
}

.contact-phone-hint {
  font-size: 0.78rem;
  color: rgba(243, 239, 230, 0.5);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.contact .btn-primary {
  background: var(--copper);
  color: #fff;
  flex: 1 1 auto;
  min-width: 8rem;
}

.contact .btn-primary:hover {
  background: var(--copper-soft);
}

.btn-contact-ghost {
  background: transparent;
  border: 1.5px solid rgba(243, 239, 230, 0.28);
  color: #f3efe6;
  flex: 1 1 auto;
  min-width: 8rem;
}

.btn-contact-ghost:hover {
  border-color: rgba(243, 239, 230, 0.65);
  background: rgba(243, 239, 230, 0.06);
}

/* Footer */
.site-footer {
  background: #0a2e28;
  color: rgba(243, 239, 230, 0.55);
  padding: 1.5rem 0;
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-brand {
  font-weight: 700;
  color: rgba(243, 239, 230, 0.85);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero .reveal:nth-child(1) {
  transition-delay: 0.05s;
}
.hero .reveal:nth-child(2) {
  transition-delay: 0.18s;
}
.hero .reveal:nth-child(3) {
  transition-delay: 0.3s;
}
.hero .reveal:nth-child(4) {
  transition-delay: 0.42s;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    inset-inline: 0;
    background: rgba(250, 247, 240, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav a::after {
    display: none;
  }

  .skill {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .wp-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .project-top {
    grid-template-columns: 2.5rem 1fr;
  }

  .project-arrow {
    display: none;
  }

  .project-desc,
  .project-tags {
    padding-right: 0;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-title {
    max-width: none;
  }

  .hero-lead {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-orb,
  .scroll-hint span {
    animation: none;
  }
}
