:root {
  --bg: #0b1018;
  --bg-soft: #101722;
  --surface: #151e2b;
  --surface-2: #1b2737;
  --line: rgba(219, 232, 255, .13);
  --text: #f4f7fb;
  --muted: #8e9bad;
  --accent: #5b9dff;
  --accent-strong: #2f7df0;
  --accent-soft: rgba(91, 157, 255, .12);
  --light: #f4f6f8;
  --light-surface: #fff;
  --light-line: #dce2e9;
  --light-text: #17202d;
  --light-muted: #667180;
  --radius: 18px;
  --container: 1180px;
  --font-sans: "Inter", "Segoe UI", sans-serif;
  --font-fa: "Vazirmatn", Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.7; overflow-x: hidden; }
body.rtl { font-family: var(--font-fa); }
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4, body.rtl .brand-copy strong { letter-spacing: 0; }
body.rtl .hero-copy, body.rtl .section-heading, body.rtl .about-statement, body.rtl .info-panel, body.rtl .skill-group, body.rtl .contact-grid { text-align: right; }
body.rtl .hero-meta, body.rtl .social-row, body.rtl .tag-list { direction: rtl; }
body.rtl .hero-visual { transform: scaleX(-1); }
body.rtl .hero-visual > * { transform: scaleX(-1); }
body.rtl .hero-visual .orbit-one, body.rtl .hero-visual .orbit-two { transform: scaleX(-1); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
.container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; }
.section { padding: 118px 0; position: relative; }
.section-light { background: var(--light); color: var(--light-text); }
.section-dark { background: var(--bg); color: var(--text); }
.skip-link { position: fixed; z-index: 100; top: -100px; left: 16px; padding: 10px 14px; background: var(--accent); color: #fff; }
.skip-link:focus { top: 16px; }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 20; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
.site-header.is-scrolled { background: rgba(11, 16, 24, .78); border-color: var(--line); backdrop-filter: blur(18px); }
.nav-wrap { min-height: 82px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(91,157,255,.65); color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 14px; letter-spacing: .02em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.desktop-nav { display: flex; justify-content: center; align-items: center; gap: 22px; margin-inline: auto; }
.desktop-nav a, .mobile-nav a { color: var(--muted); font-size: 12px; transition: color .2s ease; }
.desktop-nav a:hover, .desktop-nav a.is-active, .mobile-nav a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.text-button, .icon-button, .menu-toggle { border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: .2s ease; }
.text-button { width: 34px; height: 30px; font-size: 11px; }
.icon-button, .menu-toggle { width: 30px; height: 30px; font-size: 15px; }
.text-button:hover, .icon-button:hover, .menu-toggle:hover { border-color: var(--accent); color: var(--accent); }
.menu-toggle { display: none; }
.mobile-nav { display: none; padding: 6px 0 20px; grid-template-columns: 1fr 1fr; gap: 14px; }
.site-header.menu-open { background: var(--bg); border-color: var(--line); }
.mobile-nav.is-open { background: var(--bg); }

/* Hero */
.hero { min-height: 760px; padding-top: 180px; overflow: hidden; background: radial-gradient(circle at 75% 18%, rgba(55, 105, 173, .16), transparent 28%), var(--bg); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(400px, .98fr); gap: 80px; align-items: center; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow, .section-kicker, .project-category, .publication-type { color: var(--accent); font-size: 10px; letter-spacing: .16em; font-weight: 700; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 22px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(91,157,255,.12); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(62px, 8vw, 116px); line-height: .86; letter-spacing: -.075em; font-weight: 800; }
h1 span { color: var(--accent); }
.hero-role { margin-bottom: 22px; color: var(--text); font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.03em; }
.hero-lead { max-width: 560px; margin-bottom: 30px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 46px; padding: 0 19px; border: 1px solid transparent; font-size: 12px; font-weight: 700; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button span, .text-link span, .email-link span { font-size: 17px; line-height: 0; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #07101c; }
.button-primary:hover { background: #79b0ff; }
.button-ghost { border-color: var(--line); color: var(--text); }
.button-ghost:hover { border-color: var(--accent); color: var(--accent); }
.text-link { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12px; font-weight: 700; }
.text-link:hover { color: var(--accent); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 52px; color: #677487; font-size: 10px; letter-spacing: .04em; }
.meta-separator { color: var(--accent); }
.hero-visual { position: relative; min-height: 520px; display: grid; place-items: center; }
.image-frame { position: relative; z-index: 2; width: min(390px, 80%); border: 1px solid rgba(219,232,255,.25); padding: 12px; background: rgba(255,255,255,.025); box-shadow: 28px 28px 0 rgba(91,157,255,.05); }
.image-frame::before { content: ""; position: absolute; inset: -8px 8px 8px -8px; border: 1px solid rgba(91,157,255,.25); z-index: -1; }
.image-frame img { width: 100%; aspect-ratio: .86; object-fit: cover; filter: saturate(.82); }
.image-label, .image-caption { position: absolute; left: 26px; right: 26px; display: flex; justify-content: space-between; font-size: 9px; letter-spacing: .12em; color: #dbe8ff; }
.image-label { top: 23px; }
.image-caption { bottom: 24px; }
.hero-orbit { position: absolute; border: 1px solid rgba(91,157,255,.12); border-radius: 50%; }
.orbit-one { width: 510px; height: 250px; transform: rotate(-30deg); }.orbit-two { width: 390px; height: 390px; border-style: dashed; opacity: .7; }

/* Shared sections */
.signal-strip { border-block: 1px solid var(--line); background: #0d141e; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.signal-grid > div { min-height: 90px; padding: 22px 25px; border-inline-start: 1px solid var(--line); }
.signal-grid > div:first-child { border-inline-start: 0; }
.signal-grid small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .13em; }
.signal-grid strong { font-size: 13px; font-weight: 600; }
.split-heading { display: grid; grid-template-columns: minmax(240px, .7fr) 1fr; gap: 80px; align-items: end; margin-bottom: 58px; }
.section-kicker { margin-bottom: 13px; }
h2 { margin-bottom: 15px; font-size: clamp(38px, 5vw, 68px); line-height: .98; letter-spacing: -.055em; }
.section-intro, .section-heading > p:not(.section-kicker), .research-banner > div > p:not(.section-kicker) { max-width: 560px; color: var(--light-muted); font-size: 16px; }
.section-dark .section-heading > p:not(.section-kicker), .section-dark .section-intro { color: var(--muted); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 90px; align-items: start; }
.large-copy { max-width: 650px; margin-bottom: 25px; font-size: 25px; line-height: 1.45; letter-spacing: -.03em; }
.muted-copy { max-width: 610px; color: var(--light-muted); font-size: 13px; }
.info-panel { border-top: 1px solid var(--light-line); }
.info-row { display: grid; grid-template-columns: .75fr 1.25fr; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--light-line); font-size: 12px; }
.info-row span { color: var(--light-muted); }.info-row strong { font-weight: 600; }.info-row a { color: var(--accent-strong); overflow-wrap: anywhere; }
.section-heading { margin-bottom: 50px; }
.section-heading > p:last-child { margin-bottom: 0; }

/* Research */
.research-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.research-card { position: relative; min-height: 220px; padding: 27px; background: var(--bg); transition: background .2s ease, transform .2s ease; }
.research-card:hover { background: var(--surface); transform: translateY(-3px); }
.card-index { color: var(--accent); font-size: 10px; letter-spacing: .12em; }.research-card h3 { max-width: 230px; margin: 42px 0 12px; font-size: 20px; line-height: 1.2; letter-spacing: -.035em; }.research-card p { max-width: 250px; margin: 0; color: var(--muted); font-size: 13px; }.card-arrow { position: absolute; right: 27px; bottom: 25px; color: var(--accent); font-size: 21px; }

/* Projects */
.projects-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.projects-heading > p { margin: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-button { padding: 8px 13px; border: 1px solid var(--light-line); background: transparent; color: var(--light-muted); font-size: 11px; cursor: pointer; transition: .2s ease; }
.filter-button:hover, .filter-button.is-active { border-color: var(--accent-strong); background: var(--accent-strong); color: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 22px; }
.project-card { grid-column: span 4; min-width: 0; border: 1px solid var(--light-line); background: var(--light-surface); transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.project-card-featured { grid-column: span 6; }
.project-card:hover { border-color: var(--accent-strong); box-shadow: 0 14px 30px rgba(18, 37, 67, .1); transform: translateY(-4px); }
.project-card.is-hidden { display: none; }
.project-media { position: relative; display: block; overflow: hidden; aspect-ratio: 1.55; background: #dfe6ee; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.project-card:hover .project-media img { transform: scale(1.04); }
.project-open { position: absolute; right: 14px; bottom: 14px; padding: 7px 10px; background: var(--accent); color: #08111e; opacity: 0; font-size: 10px; font-weight: 700; transform: translateY(5px); transition: .25s ease; }
.project-card:hover .project-open, .project-media:focus .project-open { opacity: 1; transform: translateY(0); }
.project-media-placeholder { display: grid; place-items: center; background: linear-gradient(135deg, #172a44, #0c1727); color: #9fc5ff; font-size: 22px; letter-spacing: .08em; }
.project-body { padding: 23px; }.project-category { margin-bottom: 10px; color: var(--accent-strong); font-size: 9px; }.project-body h3 { margin-bottom: 11px; font-size: 22px; line-height: 1.1; letter-spacing: -.04em; }.project-body > p:not(.project-category) { min-height: 62px; margin-bottom: 17px; color: var(--light-muted); font-size: 13px; }.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }.tag-list span { padding: 4px 8px; border: 1px solid var(--light-line); color: var(--light-muted); font-size: 10px; }.tag-list.large span { padding: 7px 10px; border-color: var(--line); color: #c8d4e3; }.tag-list em { color: var(--accent); font-size: 9px; font-style: normal; }

/* Skills / timeline / awards */
.skills-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }.skill-group { min-height: 170px; padding: 25px; border: 1px solid var(--line); background: rgba(255,255,255,.018); }.skill-group h3 { margin-bottom: 22px; font-size: 17px; }.skill-note { margin-top: 27px; color: var(--muted); font-size: 11px; }.skill-note em { color: var(--accent); }
.timeline { position: relative; max-width: 900px; }.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 86px; width: 1px; background: var(--light-line); }.timeline-item { position: relative; display: grid; grid-template-columns: 125px 1fr; gap: 42px; padding: 0 0 48px; }.timeline-item:last-child { padding-bottom: 0; }.timeline-marker { position: absolute; left: 81px; top: 3px; width: 11px; height: 11px; border: 2px solid var(--accent-strong); background: var(--light); border-radius: 50%; }.timeline-date { color: var(--accent-strong); font-size: 10px; font-weight: 700; letter-spacing: .1em; }.timeline-item h3 { margin-bottom: 5px; font-size: 20px; }.timeline-org { margin-bottom: 10px; color: var(--accent-strong); font-size: 12px; }.timeline-item p:last-child { max-width: 640px; margin: 0; color: var(--light-muted); font-size: 13px; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }.achievement-grid article { min-height: 150px; padding: 22px; background: var(--bg); }.achievement-grid article:hover { background: var(--surface); }.achievement-grid span { color: var(--accent); font-size: 10px; }.achievement-grid h3 { margin: 26px 0 5px; font-size: 17px; line-height: 1.2; }.achievement-grid p { margin: 0; color: var(--muted); font-size: 11px; }

/* Research output / CV */
.research-banner { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding-bottom: 47px; border-bottom: 1px solid var(--light-line); }.research-banner h2 { max-width: 540px; }.research-banner p { margin-bottom: 0; }.dark-button { border-color: var(--light-line); color: var(--light-text); white-space: nowrap; }.dark-button:hover { border-color: var(--accent-strong); color: var(--accent-strong); }.publication-list article { display: grid; grid-template-columns: 130px 1fr 30px; gap: 30px; align-items: start; padding: 25px 0; border-bottom: 1px solid var(--light-line); }.publication-type { color: var(--accent-strong); font-size: 9px; }.publication-list h3 { max-width: 700px; margin-bottom: 7px; font-size: 18px; }.publication-list p { margin: 0; color: var(--light-muted); font-size: 12px; }.publication-list article > a, .publication-lock { color: var(--accent-strong); font-size: 19px; text-align: right; }
.cv-section { background: var(--accent); color: #07101c; }.cv-card { display: flex; align-items: center; justify-content: space-between; gap: 50px; }.cv-card .section-kicker { color: #163b78; }.cv-card h2 { margin-bottom: 12px; }.cv-card p:not(.section-kicker) { max-width: 650px; margin: 0; color: rgba(7,16,28,.7); font-size: 13px; }.cv-actions { display: flex; flex-wrap: wrap; gap: 10px; }.cv-section .button-primary { background: #07101c; color: #fff; }.cv-section .button-primary:hover { background: #1c2c42; }.cv-section .button-ghost { border-color: rgba(7,16,28,.3); color: #07101c; }.cv-section .button-ghost:hover { border-color: #07101c; }

/* Contact / Footer */
.contact-section { background: #101a27; }.contact-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 110px; align-items: start; }.contact-section h2 { max-width: 520px; }.contact-lead { max-width: 550px; color: var(--muted); font-size: 17px; }.email-link { display: inline-flex; align-items: center; gap: 14px; margin: 21px 0 28px; color: var(--accent); font-size: clamp(18px, 2.5vw, 27px); font-weight: 600; letter-spacing: -.04em; }.social-row { display: flex; flex-wrap: wrap; gap: 7px; }.social-row a { padding: 7px 10px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }.social-row a:hover { border-color: var(--accent); color: var(--accent); }.social-row .profile-placeholder { opacity: .65; border-style: dashed; }.contact-form { display: grid; gap: 8px; padding: 29px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }.contact-form label { margin-top: 6px; color: var(--muted); font-size: 11px; }.contact-form input, .contact-form textarea { width: 100%; padding: 11px 0; border: 0; border-bottom: 1px solid var(--line); outline: 0; background: transparent; color: var(--text); resize: vertical; }.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }.contact-form .button { margin-top: 14px; justify-self: start; }.form-note { margin: 5px 0 0; color: #758397; font-size: 10px; }.site-footer { padding: 44px 0 34px; border-top: 1px solid var(--line); background: #090e15; }.footer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 40px; align-items: end; }.footer-grid p { margin: 20px 0 0; color: var(--muted); font-size: 11px; }.footer-links { display: flex; flex-wrap: wrap; gap: 17px; }.footer-links a, .footer-meta { color: var(--muted); font-size: 10px; }.footer-links a:hover { color: var(--accent); }.footer-meta { display: grid; gap: 5px; text-align: right; }.toast { position: fixed; z-index: 50; right: 22px; bottom: 22px; max-width: 320px; padding: 12px 15px; border: 1px solid var(--accent); background: #132237; color: #e3efff; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s ease; }.toast.is-visible { opacity: 1; transform: translateY(0); }

/* Light theme */
html[data-theme="light"] body { --bg: #f4f6f8; --bg-soft: #fff; --surface: #fff; --surface-2: #eef2f7; --line: rgba(23,32,45,.13); --text: #17202d; --muted: #667180; --accent-soft: rgba(47,125,240,.1); }
html[data-theme="light"] .site-header.is-scrolled { background: rgba(244,246,248,.86); }
html[data-theme="light"] .hero, html[data-theme="light"] .section-dark { background: #f4f6f8; color: #17202d; }
html[data-theme="light"] .hero { background: radial-gradient(circle at 75% 18%, rgba(91,157,255,.13), transparent 28%), #f4f6f8; }
html[data-theme="light"] .signal-strip, html[data-theme="light"] .site-footer { background: #eaf0f6; color: #17202d; }
html[data-theme="light"] .research-card, html[data-theme="light"] .achievement-grid article { background: #f4f6f8; }
html[data-theme="light"] .research-card:hover, html[data-theme="light"] .achievement-grid article:hover { background: #fff; }
html[data-theme="light"] .contact-section { background: #eaf0f6; color: #17202d; }
html[data-theme="light"] .contact-form { background: rgba(255,255,255,.55); }
html[data-theme="light"] .contact-form input, html[data-theme="light"] .contact-form textarea { color: #17202d; }
html[data-theme="light"] .desktop-nav a:hover, html[data-theme="light"] .desktop-nav a.is-active, html[data-theme="light"] .mobile-nav a:hover { color: #17202d; }

@media (max-width: 1040px) {
  .desktop-nav { gap: 13px; }.desktop-nav a { font-size: 11px; }.hero-grid { gap: 40px; }.contact-grid { gap: 55px; }
}
@media (max-width: 820px) {
  .desktop-nav { display: none; }.menu-toggle { display: block; }.mobile-nav.is-open { display: grid; }.nav-wrap { min-height: 70px; }.hero { padding-top: 130px; }.hero-grid { grid-template-columns: 1fr; }.hero-copy { max-width: 650px; }.hero-visual { min-height: 470px; margin-top: 15px; }.signal-grid { grid-template-columns: repeat(2, 1fr); }.signal-grid > div:nth-child(3) { border-inline-start: 0; border-top: 1px solid var(--line); }.signal-grid > div:nth-child(4) { border-top: 1px solid var(--line); }.about-grid, .contact-grid { grid-template-columns: 1fr; gap: 50px; }.research-grid { grid-template-columns: repeat(2, 1fr); }.project-card, .project-card-featured { grid-column: span 6; }.skills-grid { grid-template-columns: 1fr; }.achievement-grid { grid-template-columns: repeat(2, 1fr); }.cv-card { align-items: start; flex-direction: column; }.footer-grid { grid-template-columns: 1fr 1fr; }.footer-meta { text-align: left; }
}
@media (max-width: 560px) {
  .container { width: min(var(--container), calc(100% - 32px)); }.section { padding: 82px 0; }.nav-wrap { gap: 14px; }.brand-copy small { display: none; }.brand { margin-right: auto; }.hero { min-height: 0; padding-top: 112px; }.hero h1 { font-size: clamp(56px, 18vw, 90px); }.hero-lead { font-size: 15px; }.hero-meta { margin-top: 35px; line-height: 1.5; }.hero-visual { min-height: 390px; }.image-frame { width: min(290px, 78%); }.orbit-one { width: 390px; height: 190px; }.orbit-two { width: 300px; height: 300px; }.signal-grid > div { padding: 17px 13px; }.signal-grid strong { font-size: 11px; }.split-heading, .projects-heading { display: block; }.split-heading .section-intro, .projects-heading > p { margin-top: 22px; }.large-copy { font-size: 21px; }.research-grid { grid-template-columns: 1fr; }.research-card { min-height: 190px; }.project-card, .project-card-featured { grid-column: span 12; }.project-body > p:not(.project-category) { min-height: 0; }.timeline::before { left: 6px; }.timeline-item { display: block; padding-left: 33px; }.timeline-marker { left: 1px; }.timeline-date { margin-bottom: 12px; }.achievement-grid { grid-template-columns: 1fr; }.research-banner { display: block; }.research-banner .button { margin-top: 24px; }.publication-list article { grid-template-columns: 1fr 28px; gap: 9px; }.publication-type { grid-column: span 2; }.publication-list h3 { font-size: 16px; }.contact-grid { gap: 35px; }.contact-form { padding: 20px; }.email-link { font-size: 18px; }.footer-grid { grid-template-columns: 1fr; gap: 25px; }.footer-meta { text-align: left; }.footer-links { order: 3; }.site-footer { padding-bottom: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
