:root {
  --bg: #0c0d14;
  --surface: #12131b;
  --surface-2: #171822;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f6;
  --text-soft: #b4b6c0;
  --text-muted: #5d5f6b;
  --text-dim: #7c7e8a;
  --green: #22c55e;
  --container: 1160px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: #fff; color: #0c0d14; }
.btn--primary:hover { background: #dcdce2; }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
button.btn { font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.3); }
.btn--sm { height: 32px; padding: 0 16px 0 22px; gap: 18px; font-size: 12px; }
.underline { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 13, 20, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.nav { display: flex; gap: 28px; font-size: 12px; color: var(--text-dim); }
.nav a { transition: color 0.2s; }
.nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "text photo"
    "stats stats";
  padding-top: 56px;
  padding-bottom: 24px;
  column-gap: 40px;
}
.hero__text { grid-area: text; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 11px;
  color: #c9cad2;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero__title {
  margin: 10px 0 0;
  font-size: clamp(40px, 6vw, 52px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 660px;
}
.hero__title .muted { display: block; color: var(--text-muted); }

.hero__hi { margin: 24px 0 0; font-size: 17px; color: var(--text-soft); }
.hero__intro { margin: 22px 0 0; max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--text-dim); }
.hero__intro a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.hero__intro a:hover { text-decoration-color: currentColor; }
.hero__actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.hero__photo {
  grid-area: photo;
  width: 260px;
  height: 307px;
  margin-top: 16px;
  margin-right: 40px;
}
.hero__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
/* Fallback when assets/profile.png is missing */
.hero__photo.is-empty {
  background:
    radial-gradient(circle at 50% 28%, #2a2c3a 0 17%, transparent 17.5%),
    radial-gradient(ellipse at 50% 100%, #22242f 0 48%, transparent 48.5%);
  opacity: 0.8;
}

.stats {
  grid-area: stats;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 12px 0 0;
  padding: 0;
}
.stats li { display: flex; flex-direction: column; gap: 4px; min-width: 60px; }
.stats strong { font-size: 19px; font-weight: 500; }
.stats span { font-size: 10px; color: var(--text-muted); }

.divider {
  border: 0;
  height: 1px;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--border) 10%, var(--border) 70%, transparent);
}

/* ---------- Sections ---------- */
.section { padding: 32px 24px 96px; }
.section--last { padding-bottom: 160px; }
.section__inner { max-width: 848px; margin: 0 auto; }
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 40px;
}
#work .eyebrow { margin-bottom: 54px; }

/* ---------- Work grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
  transition: transform 0.45s var(--ease), border-color 0.3s, opacity 0.8s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.card--featured { grid-column: 1 / -1; }

.card__media {
  position: relative;
  height: 138px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--c);
}
.card--featured .card__media { height: 178px; }

.card__art {
  color: var(--ink);
  transition: transform 0.6s var(--ease), color 0.35s;
}
.card:hover .card__art { transform: scale(1.06); color: var(--ink-hover); }

.badge {
  position: absolute;
  left: 12px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9px;
  background: rgba(10, 16, 50, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.card__body { padding: 14px 12px 12px; }
.card__meta { font-size: 9px; color: var(--text-muted); margin: 0 0 6px; }
.card__title { font-size: 12px; font-weight: 500; margin: 0 0 6px; }
.card__desc { font-size: 10px; color: var(--text-muted); margin: 0; }

.art-hamrah { display: flex; align-items: center; gap: 22px; }
.art-hamrah__words { display: flex; flex-direction: column; align-items: center; line-height: 1; }
.art-hamrah__en { font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
.art-hamrah__fa { font-family: "Vazirmatn", sans-serif; font-size: 22px; font-weight: 700; letter-spacing: 0.3em; margin-top: 4px; }
.art-divar { font-family: "Vazirmatn", sans-serif; font-size: 44px; font-weight: 900; }
.art-jobex { font-family: "Michroma", sans-serif; font-size: 24px; letter-spacing: 0.12em; }

.mini-dash {
  width: 190px;
  height: 90px;
  background: #22232d;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: relative;
  padding: 10px;
}
.mini-dash__line { height: 3px; border-radius: 2px; background: #33343f; margin-bottom: 5px; }
.mini-dash__donut {
  position: absolute;
  left: 58px;
  top: 30px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: conic-gradient(#3040a0 0 62%, #2b2c38 62% 100%);
  -webkit-mask: radial-gradient(circle, transparent 12px, #000 13px);
  mask: radial-gradient(circle, transparent 12px, #000 13px);
}
.mini-dash__tip {
  position: absolute;
  left: 86px;
  top: 22px;
  width: 42px;
  height: 30px;
  background: #0b0c12;
  border-radius: 2px;
}

/* ---------- About ---------- */
.lead {
  font-size: clamp(20px, 2.6vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--text-dim);
  margin: 0 0 32px;
  max-width: 720px;
}
.lead strong { color: var(--text); font-weight: 500; }
.about__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  font-size: 13px;
  color: var(--text-soft);
}
.about__cols p { margin: 0; }

/* ---------- Experience ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.job { padding: 24px 0; border-bottom: 1px solid var(--border); }
.job__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.job__role { margin: 0; font-size: 15px; font-weight: 500; }
.job__org { margin: 4px 0 0; font-size: 12px; color: var(--text-dim); }
.job__time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 400;
  color: var(--text-dim);
  vertical-align: 2px;
}
.job__points {
  margin: 14px 0 0;
  padding-left: 16px;
  font-size: 12.5px;
  color: var(--text-soft);
  display: grid;
  gap: 6px;
  max-width: 680px;
}
.job__points li::marker { color: var(--text-muted); }
.job__points b { color: var(--text); font-weight: 500; }

/* ---------- Skills & Education ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; }
.skills { display: grid; gap: 22px; }
.skill-group h4, .edu h4 { margin: 0 0 10px; font-size: 13px; font-weight: 500; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  padding: 5px 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 11px;
  color: var(--text-soft);
}
.edu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.edu li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.edu h4 { margin-bottom: 3px; }
.edu p { margin: 0; font-size: 11px; color: var(--text-dim); }
.edu span { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* ---------- Contact ---------- */
.contact {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(15, 16, 24, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.contact__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.contact__title { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.contact__sub { margin: 0; font-size: 10px; color: var(--text-dim); }
.contact__actions { display: flex; gap: 8px; }
.contact .btn { height: 32px; font-size: 11px; padding: 0 14px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.card.reveal.is-visible:hover { transform: translateY(-4px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot { animation: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .nav { display: none; }
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "text" "stats";
    padding-top: 32px;
  }
  .hero__photo { width: 180px; height: 213px; margin: 0 0 24px; }
  .hero__actions { margin-top: 28px; }
  .hero__hi { font-size: 15px; }
  .hero__intro { font-size: 15px; }
  .stats { justify-content: flex-start; margin-top: 40px; }
  .section { padding: 32px 16px 72px; }
  .section--last { padding-bottom: 200px; }
  #work .eyebrow, .eyebrow { margin-bottom: 28px; }
  .grid { grid-template-columns: 1fr; }
  .card__media, .card--featured .card__media { height: 160px; }
  .card__meta { font-size: 10px; }
  .card__title { font-size: 14px; }
  .card__desc { font-size: 12px; }
  .about__cols, .split { grid-template-columns: 1fr; gap: 24px; }
  .split { gap: 48px; }
  .job__head { flex-direction: column; gap: 6px; }
  .contact__inner { flex-direction: column; align-items: flex-start; }
  .contact__actions { flex-wrap: wrap; }
}
.art-raysens { display: flex; align-items: center; gap: 18px; }
.art-raysens__fa { font-family: "Vazirmatn", sans-serif; font-size: 34px; font-weight: 700; }
.art-arvin { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: linear-gradient(135deg, #6c63ff, #22d3b8); color: #fff; font-family: "Vazirmatn", sans-serif; font-size: 42px; font-weight: 900; line-height: 1; opacity: 0.9; }
.art-greentell { width: 190px; height: auto; filter: brightness(10); opacity: 0.85; }
.art-goldoon { width: 64px; height: 78px; }
