/* =========================================================
   Portfolio Landing Page
   RTL / Responsive / Vanilla CSS
   ========================================================= */

:root {
  --navy: #071735;
  --navy-2: #0d2348;
  --blue: #1268ff;
  --blue-light: #eaf2ff;
  --text: #111b32;
  --muted: #667085;
  --line: #e8ecf3;
  --bg: #f6f8fc;
  --white: #ffffff;
  --shadow: 0 20px 55px rgba(22, 44, 86, .10);
  --radius: 14px;
  --font-fa: "Vazirmatn", sans-serif;
  --font-en: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-fa);
  line-height: 1.8;
}

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

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

img {
  display: block;
  width: 100%;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 18px auto;
  background: var(--white);
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 10px 45px rgba(16, 35, 68, .08);
}

/* Header */
.site-header {
  width: calc(100% - 48px);
  height: 68px;
  margin: 8px auto 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.90);
  border: 1px solid #edf0f5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(30, 50, 90, .06);
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

.brand-mark {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -3px;
  color: var(--navy);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 800;
}

.brand-text small {
  margin-top: 4px;
  font-family: var(--font-en);
  font-size: 5px;
  color: #60708d;
  letter-spacing: .2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  font-size: 12px;
  font-weight: 600;
}

.main-nav > a:not(.nav-cta) {
  transition: color .2s ease;
}

.main-nav > a:not(.nav-cta):hover {
  color: var(--blue);
}

.nav-cta {
  direction: ltr;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: white;
  background: var(--navy);
  border-radius: 7px;
  font-family: var(--font-en);
  font-size: 11px;
  box-shadow: 0 8px 20px rgba(7,23,53,.16);
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 20px;
  color: var(--navy);
  cursor: pointer;
}

/* General */
.section {
  padding-left: 54px;
  padding-right: 54px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--blue);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .6px;
}

h1,
h2,
h3 {
  line-height: 1.35;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

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

.btn-primary {
  padding: 12px 18px;
  color: white;
  background: var(--navy);
  box-shadow: 0 10px 22px rgba(7,23,53,.15);
}

.btn-outline {
  padding: 11px 18px;
  border: 1px solid #dce1ea;
  color: var(--navy);
  background: white;
}

.btn.small {
  padding: 9px 17px;
}

/* Hero */
.hero {
  min-height: 570px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  direction: ltr;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 75% 48%, rgba(18,104,255,.08), transparent 27%),
    linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.hero-content {
  direction: rtl;
  padding: 70px 20px 65px 0;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(42px, 4vw, 58px);
  letter-spacing: -1.5px;
  margin-bottom: 0;
}

.blue-dot {
  color: var(--blue);
}

.hero h2 {
  direction: ltr;
  text-align: right;
  font-family: var(--font-en);
  font-size: 22px;
  margin: 1px 0 18px;
}

.hero p {
  max-width: 420px;
  font-size: 12px;
  color: #4d5b75;
  line-height: 2.2;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.socials {
  display: flex;
  direction: ltr;
  gap: 9px;
  margin-top: 22px;
}

.socials a {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe4ec;
  border-radius: 7px;
  color: #243653;
  background: #fff;
  transition: .2s ease;
}

.socials a:hover {
  color: var(--blue);
  border-color: #9dbdff;
  transform: translateY(-2px);
}

.hero-visual {
  height: 100%;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  direction: ltr;
}

.tech-grid {
  position: absolute;
  inset: 10% -15% 4% 0;
  opacity: .65;
  background-image:
    linear-gradient(rgba(80,120,180,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80,120,180,.09) 1px, transparent 1px);
  background-size: 38px 38px;
  transform: perspective(500px) rotateX(58deg) rotateZ(-10deg);
  transform-origin: center bottom;
  mask-image: linear-gradient(to bottom, transparent, black 35%, transparent 90%);
}

.logo-platform {
  position: absolute;
  width: 330px;
  height: 290px;
  left: 50%;
  top: 53%;
  transform: translate(-50%, -50%);
}

.platform-glow {
  position: absolute;
  width: 240px;
  height: 90px;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  background: rgba(18,104,255,.24);
  filter: blur(28px);
  border-radius: 50%;
}

.platform-ring {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #dce4f1);
  box-shadow: 0 20px 35px rgba(25,48,89,.13);
}

.ring-one {
  width: 300px;
  height: 65px;
  bottom: 20px;
}

.ring-two {
  width: 245px;
  height: 64px;
  bottom: 61px;
  border: 2px solid rgba(18,104,255,.8);
  box-shadow: 0 0 22px rgba(18,104,255,.35);
}

.ir-logo {
  position: absolute;
  left: 50%;
  bottom: 90px;
  transform: translateX(-50%) perspective(300px) rotateY(-5deg);
  color: #0c1e41;
  font-family: var(--font-en);
  font-size: 102px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -17px;
  text-shadow:
    5px 5px 0 #f5f8fd,
    10px 10px 18px rgba(14,35,71,.22);
}

.card-float {
  position: absolute;
  z-index: 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #edf1f6;
  background: rgba(255,255,255,.75);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(36,60,100,.08);
  color: var(--blue);
  font-size: 21px;
  backdrop-filter: blur(5px);
}

.floating-code { left: 26%; top: 30%; }
.floating-lock { right: 11%; top: 46%; }

.cube {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 1px solid #e2e8f1;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(225,232,242,.55));
  transform: rotate(30deg) skew(-8deg);
  box-shadow: 8px 10px 20px rgba(50,75,115,.08);
}

.cube-one { left: 15%; top: 61%; }
.cube-two { right: 2%; bottom: 20%; width: 22px; height: 22px; }

/* About */
.about {
  min-height: 340px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 45px;
  align-items: center;
  padding-top: 45px;
  padding-bottom: 45px;
  background: #fff;
}

.about-copy h2,
.section-heading h2 {
  font-size: 25px;
  font-weight: 800;
}

.heading-line {
  width: 34px;
  height: 3px;
  margin: 8px 0 13px;
  background: var(--blue);
  border-radius: 10px;
}

.about-copy p {
  max-width: 470px;
  color: #526079;
  font-size: 11px;
  line-height: 2.2;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 17px 0;
  max-width: 500px;
}

.stat {
  min-height: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #edf0f5;
  border-radius: 8px;
  background: #fff;
}

.stat strong {
  color: var(--navy);
  font-family: var(--font-en);
  font-size: 14px;
}

.stat span {
  color: #728097;
  font-size: 7px;
}

.about-video {
  height: 260px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 35px rgba(22,47,90,.18);
}

.about-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.15), transparent 50%, rgba(18,104,255,.08));
}

.about-video img {
  height: 100%;
  object-fit: cover;
}

.play-button {
  position: absolute;
  z-index: 2;
  inset: 50% auto auto 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(3px);
}

.video-shine {
  position: absolute;
  z-index: 2;
  width: 170px;
  height: 170px;
  right: -65px;
  top: -65px;
  border-radius: 50%;
  background: rgba(18,104,255,.14);
  filter: blur(5px);
}

/* Sections */
.content-section {
  padding-top: 24px;
  padding-bottom: 28px;
  background: #fff;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.view-all {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid #dfe4ec;
  border-radius: 7px;
  color: #4c5a71;
  font-size: 9px;
  font-weight: 600;
}

.course-grid,
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.course-card,
.work-card {
  overflow: hidden;
  border: 1px solid #e9edf3;
  border-radius: 10px;
  background: white;
  box-shadow: 0 6px 18px rgba(28,50,86,.04);
  transition: transform .25s ease, box-shadow .25s ease;
}

.course-card:hover,
.work-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 32px rgba(28,50,86,.11);
}

.course-card img {
  height: 118px;
  object-fit: cover;
}

.card-body {
  padding: 11px;
}

.card-body h3 {
  min-height: 42px;
  font-size: 10px;
  line-height: 1.9;
}

.meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid #f0f2f5;
  color: #738096;
  font-family: var(--font-en);
  font-size: 7px;
}

.meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Works */
.works-grid {
  grid-template-columns: repeat(4, 1fr);
}

.work-card img {
  height: 120px;
  object-fit: cover;
}

.work-content {
  padding: 11px;
}

.work-content h3 {
  font-size: 11px;
  margin-bottom: 4px;
}

.work-content p {
  min-height: 44px;
  color: #6c778b;
  font-size: 8px;
  line-height: 1.8;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.tags span {
  padding: 3px 6px;
  border-radius: 20px;
  color: #52617a;
  background: #f2f5f9;
  font-family: var(--font-en);
  font-size: 6px;
}

/* CTA */
.contact-cta {
  margin: 8px 54px 28px;
  padding: 25px 35px;
  display: grid;
  grid-template-columns: 95px 1fr auto;
  gap: 22px;
  align-items: center;
  border-radius: 11px;
  color: white;
  background:
    radial-gradient(circle at 20% 50%, rgba(20,106,255,.22), transparent 30%),
    linear-gradient(110deg, #06132e, #071b3e 55%, #0a2450);
  overflow: hidden;
  position: relative;
}

.contact-cta::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  left: -70px;
  top: -90px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 50%;
}

.cta-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(69,145,255,.7);
  border-radius: 10px;
  color: #3184ff;
  font-size: 27px;
}

.cta-copy h2 {
  font-size: 17px;
  margin-bottom: 5px;
}

.cta-copy p {
  color: #b9c4d7;
  font-size: 9px;
}

.cta-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.btn-cta {
  min-width: 130px;
  padding: 10px 16px;
  color: white;
  border: 1px solid #2376f7;
  background: transparent;
}

.cta-action small {
  color: #aebbd0;
  direction: ltr;
  font-family: var(--font-en);
  font-size: 7px;
}

/* Footer */
.footer {
  padding: 34px 54px 0;
  color: #fff;
  background: #06142f;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, 1fr);
  gap: 28px;
  padding-bottom: 28px;
}

.footer-brand p {
  max-width: 235px;
  margin-top: 15px;
  color: #9aa9c1;
  font-size: 8px;
  line-height: 2.1;
}

.footer .brand-mark,
.footer .brand-text strong {
  color: white;
}

.footer .brand-text small {
  color: #8fa0bc;
}

.footer-socials {
  margin-top: 14px;
}

.footer-socials a {
  width: 28px;
  height: 28px;
  color: white;
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.03);
  font-size: 11px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.footer-col h3 {
  margin-bottom: 7px;
  font-size: 10px;
}

.footer-col a,
.footer-col span {
  color: #9aa9c1;
  font-size: 8px;
  transition: color .2s ease;
}

.footer-col a:hover {
  color: white;
}

.contact-col a {
  direction: ltr;
  text-align: right;
  font-family: var(--font-en);
}

.footer-bottom {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #73839e;
  font-family: var(--font-en);
  font-size: 7px;
}

.back-top {
  position: absolute;
  right: 0;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  color: #9aa9c1;
  background: transparent;
  cursor: pointer;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 1050px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding-left: 35px;
    padding-right: 35px;
  }

  .main-nav {
    gap: 18px;
  }

  .course-grid,
  .works-grid {
    gap: 10px;
  }

  .contact-cta {
    margin-left: 35px;
    margin-right: 35px;
  }

  .footer {
    padding-left: 35px;
    padding-right: 35px;
  }
}

@media (max-width: 820px) {
  .site-header {
    width: calc(100% - 28px);
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: white;
    box-shadow: 0 18px 40px rgba(20,40,80,.12);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav > a {
    padding: 10px 12px;
  }

  .nav-cta {
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-content {
    padding: 65px 20px 25px;
  }

  .hero-visual {
    min-height: 390px;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-video {
    height: 300px;
  }

  .course-grid,
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .contact-cta {
    grid-template-columns: 75px 1fr;
  }

  .cta-action {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: row;
  }

  .footer-main {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }

  .site-header {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  .section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero h1 {
    font-size: 39px;
  }

  .hero h2 {
    font-size: 18px;
  }

  .hero p {
    font-size: 10px;
  }

  .hero-visual {
    min-height: 330px;
  }

  .logo-platform {
    transform: translate(-50%, -50%) scale(.82);
  }

  .floating-code {
    left: 11%;
  }

  .floating-lock {
    right: 6%;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .course-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .course-card img,
  .work-card img {
    height: 190px;
  }

  .contact-cta {
    margin: 5px 20px 22px;
    padding: 24px;
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-icon {
    margin: auto;
  }

  .cta-action {
    justify-content: center;
    align-items: center;
  }

  .footer {
    padding: 30px 20px 0;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    font-size: 6px;
  }
}

/* The portfolio stays at viewport origin until the intro releases it. */
html { scroll-behavior: auto; }
body { overflow-x: clip; }
#hero-scroll { height: 0; }
#site-content { position: relative; display: flow-root; background: var(--bg); }
.intro-active #hero-scroll { height: var(--intro-distance); }
.intro-active #site-content { transform: translateY(var(--portfolio-offset, 0px)); }
#scene-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 30; pointer-events: none; background: #05070f; }
#intro-ui { position: fixed; inset: 0; z-index: 31; pointer-events: none; color: #d8dfee; }
#intro-ui[hidden] { display: none; }
#skip-intro { position: absolute; top: 24px; left: 24px; pointer-events: auto; border: 1px solid #ffffff30; border-radius: 30px; background: #11182799; color: inherit; padding: 10px 20px; font: inherit; font-size: 12px; cursor: pointer; }
#hero-hint { position: absolute; bottom: 28px; width: 100%; text-align: center; font-size: 13px; }
#hero-hint span { display: block; font-size: 24px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } .reveal { opacity: 1; transform: none; } }
