
:root {
  --bg: #07110f;
  --bg-2: #0a1714;
  --surface: rgba(14, 29, 25, 0.74);
  --surface-2: #0d1c18;
  --line: rgba(203, 235, 220, 0.12);
  --line-strong: rgba(203, 235, 220, 0.22);
  --text: #f1f6f3;
  --muted: #9badA5;
  --soft: #c6d4cd;
  --accent: #b9ff66;
  --accent-2: #6ee7c4;
  --accent-dark: #182813;
  --radius: 28px;
  --max: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; background: var(--bg); }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Vazirmatn, IRANSansX, "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.85;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { background: var(--accent); color: #07110f; }

.site-shell { min-height: 100vh; position: relative; isolation: isolate; overflow: clip; }
.section-pad { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.scroll-progress { position: fixed; z-index: 200; top: 0; right: 0; width: 100%; height: 3px; transform-origin: right center; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.noise { position: fixed; inset: 0; pointer-events: none; z-index: -1; opacity: .15; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E"); }
.ambient { position: fixed; width: 560px; height: 560px; border-radius: 999px; filter: blur(130px); pointer-events: none; z-index: -2; opacity: .13; }
.ambient-a { background: #9cff57; top: -180px; right: -120px; }
.ambient-b { background: #1bd6aa; left: -180px; top: 46vh; }

.topbar { width: min(var(--max), calc(100% - 48px)); margin: 20px auto 0; min-height: 62px; border: 1px solid var(--line); border-radius: 999px; background: rgba(5, 14, 12, .68); backdrop-filter: blur(18px); display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 18px; position: sticky; top: 14px; z-index: 100; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.wordmark { display: flex; gap: 9px; align-items: center; direction: ltr; font-size: .78rem; letter-spacing: .12em; color: var(--soft); font-weight: 700; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.primary-button, .ghost-button { border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 999px; min-height: 42px; padding: 0 17px; font-weight: 800; font-size: .84rem; transition: .25s ease; }
.primary-button { background: var(--accent); color: #07110f; box-shadow: 0 10px 30px rgba(185,255,102,.13); }
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(185,255,102,.22); }
.ghost-button { border: 1px solid var(--line-strong); background: rgba(255,255,255,.03); color: var(--soft); }
.ghost-button:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.24); }

.hero { padding-top: 90px; padding-bottom: 38px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(330px, .58fr); gap: clamp(38px, 7vw, 96px); align-items: end; }
.availability { width: fit-content; display: flex; align-items: center; gap: 9px; color: var(--muted); direction: ltr; font-size: .78rem; letter-spacing: .11em; text-transform: uppercase; margin-bottom: 38px; }
.availability span { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(185,255,102,.07), 0 0 22px rgba(185,255,102,.35); }
.overline { margin: 0 0 10px; color: var(--accent); font-size: 1rem; font-weight: 900; }
.hero h1 { margin: 0; max-width: 850px; font-size: clamp(3.2rem, 7vw, 7.2rem); line-height: .99; letter-spacing: -.055em; font-weight: 950; text-wrap: balance; }
.hero h1 span { display: block; color: transparent; -webkit-text-stroke: 1px rgba(241,246,243,.55); }
.hero-lead { max-width: 780px; margin: 28px 0 0; font-size: clamp(1rem, 1.35vw, 1.18rem); line-height: 2; color: var(--soft); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 30px; }
.hero-cta { min-height: 52px; padding-inline: 22px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 700; font-size: .9rem; }
.text-link:hover { color: var(--text); }
.hero-panel-wrap { align-self: end; }
.hero-panel { border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(145deg, rgba(22,44,37,.82), rgba(8,20,17,.78)); padding: 24px; box-shadow: 0 34px 70px rgba(0,0,0,.25), inset 0 1px rgba(255,255,255,.04); position: relative; overflow: hidden; }
.hero-panel::before { content: ""; position: absolute; width: 160px; height: 160px; background: var(--accent); filter: blur(80px); opacity: .09; top: -80px; left: -50px; }
.hero-panel-head, .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .76rem; letter-spacing: .08em; direction: ltr; color: var(--muted); font-weight: 800; }
.hero-panel > p { margin: 22px 0 26px; color: var(--soft); font-size: .93rem; line-height: 1.95; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.stat-grid > div { min-height: 96px; padding: 15px; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.stat-grid strong { font-size: 1.6rem; line-height: 1; letter-spacing: -.04em; direction: ltr; color: var(--accent); }
.stat-grid span { color: var(--muted); font-size: .76rem; margin-top: 7px; }
.contact-strip { margin-top: 58px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: stretch; }
.contact-strip a, .contact-strip > span { min-height: 52px; display: inline-flex; align-items: center; gap: 8px; padding: 0 19px; border-left: 1px solid var(--line); color: var(--muted); font-size: .8rem; direction: ltr; transition: .2s; }
.contact-strip a:hover { color: var(--accent); background: rgba(255,255,255,.02); }

.intro-grid { padding-top: 128px; padding-bottom: 128px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 80px; align-items: start; }
.section-index { display: inline-block; direction: ltr; color: var(--accent); letter-spacing: .13em; font-size: .7rem; font-weight: 900; margin-bottom: 20px; }
.intro-statement h2, .section-head h2, .closing-section h2 { margin: 0; font-size: clamp(2.2rem, 4vw, 4.4rem); line-height: 1.18; letter-spacing: -.035em; font-weight: 900; }
.intro-statement h2 em { font-style: normal; color: var(--accent); }
.intro-copy { border-right: 1px solid var(--line-strong); padding-right: 30px; }
.intro-copy p { color: var(--soft); margin: 0 0 20px; font-size: 1rem; }

.bento-section { padding-bottom: 128px; }
.section-head { display: grid; grid-template-columns: 1fr minmax(260px, 420px); gap: 50px; align-items: end; margin-bottom: 38px; }
.section-head h2 { font-size: clamp(2.1rem, 3.5vw, 3.8rem); }
.section-head > p { color: var(--muted); margin: 0; font-size: .9rem; }
.bento-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.bento-card, .proof-card { border: 1px solid var(--line); background: linear-gradient(145deg, rgba(13,30,25,.88), rgba(8,20,17,.72)); border-radius: var(--radius); padding: 24px; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.icon-badge { width: 36px; height: 36px; border-radius: 12px; background: rgba(185,255,102,.08); border: 1px solid rgba(185,255,102,.16); color: var(--accent); display: inline-grid; place-items: center; }
.card-head { direction: rtl; justify-content: flex-start; color: var(--text); font-size: .88rem; letter-spacing: 0; }
.skills-card { grid-row: span 2; }
.skill-list { display: grid; gap: 20px; margin-top: 28px; }
.skill-meta { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.skill-meta span { font-size: .86rem; font-weight: 750; }
.skill-meta small { color: var(--muted); font-size: .72rem; }
.skill-track { height: 5px; background: rgba(255,255,255,.06); overflow: hidden; border-radius: 999px; direction: rtl; }
.skill-track span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: inherit; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 27px; direction: ltr; justify-content: flex-end; }
.tag-cloud span, .project-tags span { border: 1px solid var(--line); background: rgba(255,255,255,.025); color: var(--soft); border-radius: 999px; padding: 6px 10px; font-size: .73rem; }
.value-card ul { list-style: none; padding: 0; margin: 25px 0 0; display: grid; gap: 12px; }
.value-card li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; color: var(--soft); font-size: .84rem; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.value-card li svg { color: var(--accent); margin-top: 5px; }
.trait-grid { margin-top: 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.trait-grid span { min-height: 62px; display: grid; place-items: center; text-align: center; border: 1px solid var(--line); border-radius: 16px; color: var(--soft); font-size: .78rem; }

.experience-section { padding-bottom: 128px; }
.project-stack { display: grid; gap: 14px; }
.project-card { display: grid; grid-template-columns: 92px 1fr; gap: 0; border: 1px solid var(--line); background: rgba(8,19,16,.76); border-radius: var(--radius); overflow: hidden; transition: .28s ease; }
.project-card:hover { border-color: rgba(185,255,102,.24); transform: translateY(-2px); background: rgba(10,23,19,.92); }
.project-number { display: grid; place-items: start center; padding-top: 26px; color: rgba(241,246,243,.22); direction: ltr; font-size: .76rem; font-weight: 900; border-left: 1px solid var(--line); }
.project-main { padding: 26px 28px 30px; }
.project-topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.project-topline > span { direction: ltr; color: var(--muted); font-size: .75rem; letter-spacing: .04em; }
.project-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-dark); color: var(--accent); border: 1px solid rgba(185,255,102,.1); }
.project-kicker { direction: ltr; text-align: right; color: var(--accent-2); font-size: .71rem; letter-spacing: .09em; margin: 22px 0 8px; text-transform: uppercase; }
.project-main h3 { margin: 0; max-width: 900px; font-size: clamp(1.3rem, 2.25vw, 2.1rem); line-height: 1.4; letter-spacing: -.02em; }
.project-text { margin: 14px 0 0; max-width: 930px; color: var(--soft); font-size: .91rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; direction: ltr; justify-content: flex-end; }
.media-grid { display: grid; grid-template-columns: 1.45fr .55fr; gap: 12px; margin-top: 24px; }
.media-frame { margin: 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #0a1613; }
.media-frame img { width: 100%; height: 260px; display: block; object-fit: cover; filter: saturate(.82) contrast(1.04); transition: transform .45s ease, filter .45s ease; }
.media-frame:hover img { transform: scale(1.025); filter: saturate(1) contrast(1); }
.media-frame figcaption { color: var(--muted); padding: 10px 13px 12px; font-size: .72rem; border-top: 1px solid var(--line); }

.proof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: 128px; }
.proof-card { min-height: 320px; display: flex; flex-direction: column; justify-content: space-between; }
.proof-card h3 { margin: auto 0 10px; font-size: clamp(1.55rem, 2.7vw, 2.55rem); line-height: 1.35; letter-spacing: -.025em; max-width: 560px; }
.proof-card p { color: var(--soft); margin: 0; font-size: .88rem; max-width: 570px; }
.award-card { background: radial-gradient(circle at 10% 20%, rgba(185,255,102,.12), transparent 38%), linear-gradient(145deg, rgba(13,30,25,.92), rgba(8,20,17,.77)); }
.education-card { background: radial-gradient(circle at 90% 10%, rgba(110,231,196,.11), transparent 38%), linear-gradient(145deg, rgba(13,30,25,.92), rgba(8,20,17,.77)); }

.closing-section { text-align: center; padding: 90px 24px 110px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.closing-section > div { max-width: 970px; margin: auto; }
.closing-section h2 { font-size: clamp(2.3rem, 5vw, 5.4rem); }
.closing-section p { color: var(--muted); margin: 24px auto 0; }
.closing-actions { margin-top: 30px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.footer { min-height: 130px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); direction: ltr; font-size: .72rem; letter-spacing: .11em; }

@media (max-width: 980px) {
  .hero { padding-top: 64px; }
  .hero-grid, .intro-grid, .section-head, .proof-grid { grid-template-columns: 1fr; }
  .hero-grid { align-items: start; }
  .hero-panel-wrap { max-width: 620px; }
  .intro-grid { gap: 34px; padding-top: 95px; padding-bottom: 95px; }
  .intro-copy { max-width: 720px; }
  .bento-grid { grid-template-columns: 1fr; }
  .skills-card { grid-row: auto; }
  .media-grid { grid-template-columns: 1fr; }
  .media-frame img { height: min(420px, 55vw); }
}

@media (max-width: 680px) {
  .section-pad, .topbar { width: min(100% - 28px, var(--max)); }
  .topbar { min-height: 56px; padding-right: 14px; }
  .wordmark span { display: none; }
  .top-actions .ghost-button { display: none; }
  .hero { padding-top: 52px; }
  .availability { margin-bottom: 26px; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4.7rem); }
  .hero-lead { font-size: .94rem; line-height: 1.9; }
  .contact-strip { display: grid; grid-template-columns: 1fr; margin-top: 42px; }
  .contact-strip a, .contact-strip > span { border-left: 0; border-bottom: 1px solid var(--line); justify-content: flex-start; overflow-wrap: anywhere; }
  .intro-grid, .bento-section, .experience-section, .proof-grid { padding-bottom: 88px; }
  .intro-grid { padding-top: 88px; }
  .intro-copy { padding-right: 18px; }
  .section-head { gap: 18px; margin-bottom: 28px; }
  .bento-card, .proof-card { border-radius: 22px; padding: 20px; }
  .trait-grid { grid-template-columns: 1fr 1fr; }
  .project-card { grid-template-columns: 44px 1fr; border-radius: 22px; }
  .project-number { padding-top: 24px; font-size: .65rem; }
  .project-main { padding: 22px 17px 24px; }
  .project-kicker { font-size: .64rem; }
  .project-tags { justify-content: flex-start; }
  .proof-card { min-height: 290px; }
  .closing-section { width: 100%; padding-inline: 22px; }
  .closing-actions { align-items: stretch; }
  .closing-actions a { width: 100%; }
  .footer { flex-direction: column; justify-content: center; text-align: center; }
}

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

@media print {
  @page { size: A4; margin: 10mm; }
  :root { --text: #101513; --soft: #29312e; --muted: #56605c; --line: #d8dedb; --line-strong: #c7cfcb; --accent: #1c7d5f; }
  html, body { background: white !important; color: var(--text) !important; }
  body { font-size: 10pt; }
  .no-print, .ambient, .noise, .scroll-progress, .hero-actions, .closing-actions { display: none !important; }
  .site-shell { overflow: visible; background: white; }
  .section-pad { width: 100%; }
  .hero { padding: 5mm 0 4mm; }
  .hero-grid { grid-template-columns: 1.35fr .65fr; gap: 8mm; }
  .availability { margin-bottom: 4mm; color: #4f5b56; }
  .hero h1 { font-size: 34pt; color: #111; }
  .hero h1 span { color: #111; -webkit-text-stroke: 0; display: inline; }
  .hero-lead { margin-top: 4mm; font-size: 9pt; color: #333; }
  .hero-panel, .bento-card, .project-card, .proof-card { background: white !important; box-shadow: none !important; border-color: #d7ddda !important; break-inside: avoid; }
  .hero-panel { padding: 4mm; }
  .hero-panel > p { margin: 3mm 0; color: #333; }
  .stat-grid > div { min-height: 18mm; }
  .contact-strip { margin-top: 5mm; }
  .contact-strip a, .contact-strip > span { min-height: 9mm; color: #333; padding: 0 3mm; }
  .intro-grid { padding: 8mm 0; gap: 8mm; grid-template-columns: 1fr 1fr; }
  .intro-statement h2, .section-head h2 { font-size: 20pt; }
  .intro-copy p, .section-head > p { color: #333; font-size: 8.5pt; }
  .bento-section, .experience-section, .proof-grid { padding-bottom: 8mm; }
  .bento-grid { grid-template-columns: 1fr 1fr; gap: 3mm; }
  .bento-card { padding: 4mm; }
  .skills-card { grid-row: span 2; }
  .tag-cloud span, .project-tags span { color: #333; background: #f6f8f7; }
  .project-stack { gap: 3mm; }
  .project-card { grid-template-columns: 12mm 1fr; }
  .project-main { padding: 4mm; }
  .project-main h3 { font-size: 13pt; }
  .project-text { color: #333; font-size: 8.5pt; }
  .media-grid { grid-template-columns: 1.25fr .75fr; margin-top: 3mm; }
  .media-frame img { height: 42mm; }
  .proof-grid { grid-template-columns: 1fr 1fr; gap: 3mm; }
  .proof-card { min-height: 50mm; padding: 4mm; }
  .proof-card h3 { font-size: 15pt; }
  .closing-section { padding: 8mm 0; }
  .closing-section h2 { font-size: 23pt; color: #111; }
  .footer { min-height: 20mm; color: #555; }
}

/* cPanel static build enhancements */
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.icon.small { width: .95em; height: .95em; }
.reveal { opacity: 0; transform: translateY(24px); filter: blur(5px); transition: opacity .75s cubic-bezier(.22,1,.36,1), transform .75s cubic-bezier(.22,1,.36,1), filter .75s ease; transition-delay: var(--reveal-delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
.skill-track span { width: 0; transition: width 1.1s cubic-bezier(.22,1,.36,1); }
.cursor-glow { position: fixed; z-index: -1; width: 420px; height: 420px; border-radius: 50%; pointer-events: none; opacity: .08; background: radial-gradient(circle, var(--accent), transparent 62%); filter: blur(30px); transform: translate(-50%,-50%); left: -500px; top: -500px; will-change: left,top; }
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform .2s ease-out, border-color .25s ease, background .25s ease; }
.featured-project { position: relative; }
.featured-project::after { content: "CASE STUDY"; position: absolute; top: 18px; left: 20px; direction: ltr; font-size: .58rem; letter-spacing: .16em; font-weight: 900; color: var(--accent); border: 1px solid rgba(185,255,102,.18); background: rgba(185,255,102,.05); padding: 5px 8px; border-radius: 999px; }
.hero-panel, .bento-card, .project-card, .proof-card { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.topbar { -webkit-backdrop-filter: blur(18px); }
@media (hover:hover) and (pointer:fine){ body { cursor: default; } .magnetic { will-change: transform; } }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; filter:none; } .cursor-glow { display:none; } }
@media print { .reveal { opacity:1 !important; transform:none !important; filter:none !important; } .skill-track span { width: var(--skill-print,100%) !important; } }
