:root {
  --primary: #00A8FF;
  --primary-dim: rgba(0, 168, 255, 0.1);
  --primary-glow: rgba(0, 168, 255, 0.35);
  --bg: #05070D;
  --bg2: #0E1525;
  --bg3: #12203A;
  --light: #EAF6FF;
  --text: #b8d4e8;
  --text-dim: #4a6a8a;
  --border: rgba(0, 168, 255, 0.14);
  --border-bright: rgba(0, 168, 255, 0.38);
  --font-fa: 'Vazirmatn', sans-serif;
  --font-en: 'Oxanium', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-fa);
  overflow-x: hidden;
  line-height: 1.7;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 168, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(0, 168, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 168, 255, 0.012) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 20px 20px, 20px 20px;
  pointer-events: none;
  z-index: 0;
}

.corner-mark {
  position: fixed;
  width: 22px;
  height: 22px;
  border-color: rgba(0, 168, 255, 0.28);
  border-style: solid;
  z-index: 5;
  pointer-events: none;
}

.corner-mark.tl {
  top: 14px;
  left: 14px;
  border-width: 1px 0 0 1px;
}

.corner-mark.tr {
  top: 14px;
  right: 14px;
  border-width: 1px 1px 0 0;
}

.corner-mark.bl {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 1px 1px;
}

.corner-mark.br {
  bottom: 14px;
  right: 14px;
  border-width: 0 1px 1px 0;
}

#progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, transparent, var(--primary));
  box-shadow: 0 0 10px var(--primary-glow);
  z-index: 1000;
  transition: width 0.1s linear;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 48px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(5, 7, 13, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

header.scrolled {
  border-bottom-color: var(--border-bright);
}

.logo {
  font-family: var(--font-en);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 3px;
  text-decoration: none;
}

.logo::before {
  content: '[';
  color: var(--text-dim);
  margin-left: 3px;
  font-weight: 300;
}

.logo::after {
  content: ']';
  color: var(--text-dim);
  margin-right: 3px;
  font-weight: 300;
}

nav {
  display: flex;
  gap: 4px;
  align-items: center;
}

nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 14px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: all 0.2s;
  font-family: var(--font-fa);
  position: relative;
}

nav a:hover {
  color: var(--primary);
  border-color: var(--border);
  background: var(--primary-dim);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: 1px solid var(--border);
  background: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--primary);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 66px;
  left: 0;
  right: 0;
  background: rgba(5, 7, 13, 0.97);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  flex-direction: column;
  gap: 4px;
  z-index: 99;
  backdrop-filter: blur(20px);
}

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

.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  padding: 11px 16px;
  border: 1px solid transparent;
  font-size: 15px;
  border-radius: 2px;
  transition: all 0.2s;
}

.mobile-nav a:hover {
  border-color: var(--border);
  color: var(--primary);
  background: var(--primary-dim);
}

section {
  position: relative;
  z-index: 1;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
}

.sec-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.65;
}

.required-star {
  color: #ff4444;
  margin-right: 4px;
  font-weight: bold;
}

.sec-label::before {
  content: '// ';
}

.sec-title {
  font-family: var(--font-fa);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: var(--light);
  margin-bottom: 52px;
  display: inline-block;
}

/* HERO */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  letter-spacing: 4px;
  border: 1px solid var(--border-bright);
  padding: 5px 14px;
  display: inline-block;
  margin-bottom: 28px;
  background: var(--primary-dim);
}

.hero-badge::before {
  content: '► ';
}

h1 {
  font-family: var(--font-fa);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 800;
  color: var(--light);
  line-height: 1.25;
  margin-bottom: 12px;
}

h1 .primary {
  color: var(--primary);
}

.hero-sub {
  font-family: var(--font-en);
  font-size: clamp(13px, 1.6vw, 17px);
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  font-family: var(--font-fa);
  font-size: 14px;
  font-weight: 600;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn-primary:hover {
  box-shadow: 0 0 24px var(--primary-glow);
  filter: brightness(1.1);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-bright);
}

.btn-outline:hover {
  background: var(--primary-dim);
  box-shadow: 0 0 16px var(--primary-glow);
}

/* Hero Panel */
.hero-panel {
  position: relative;
  height: 400px;
}

.blueprint-box {
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.blueprint-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(0, 168, 255, 0.05) 0%, transparent 70%);
}

.bp-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--primary);
  border-style: solid;
}

.bp-corner.tl {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.bp-corner.tr {
  top: -1px;
  right: -1px;
  border-width: 2px 2px 0 0;
}

.bp-corner.bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 2px 2px;
}

.bp-corner.br {
  bottom: -1px;
  right: -1px;
  border-width: 0 2px 2px 0;
}

.bp-inner {
  position: absolute;
  inset: 20px;
  border: 1px dashed rgba(0, 168, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.bp-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  box-shadow: 0 0 28px rgba(0, 168, 255, 0.2);
  position: relative;
}

.bp-avatar::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px dashed rgba(0, 168, 255, 0.28);
  animation: spin 20s linear infinite;
}

.bp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  padding: 0 16px;
}

.bp-stat {
  text-align: center;
  border: 1px solid var(--border);
  padding: 12px 8px;
  background: rgba(14, 21, 37, 0.8);
}

.bp-stat-num {
  font-family: var(--font-en);
  font-size: 21px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.bp-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  display: block;
  margin-top: 2px;
}

.bp-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 8px;
}

.bp-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 3px 9px;
  background: var(--primary-dim);
}

.bp-annotation {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(0, 168, 255, 0.35);
}

.bp-annotation.a1 {
  top: 8px;
  right: 8px;
}

.bp-annotation.a2 {
  bottom: 8px;
  left: 8px;
}

/* SERVICES */
#services {
  padding: 96px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.service-card {
  border: 1px solid var(--border);
  background: var(--bg2);
  padding: 28px 22px;
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: scaleX(0);
  transition: transform 0.4s;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  border-color: var(--border-bright);
  background: var(--bg3);
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.service-card .bp-corner {
  width: 10px;
  height: 10px;
}

.service-index {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  opacity: 0.45;
  margin-bottom: 16px;
}

.service-icon {
  width: 46px;
  height: 46px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: var(--primary-dim);
  font-size: 20px;
}

.service-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 10px;
}

.service-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}

/* PROJECTS */
#projects {
  padding: 96px 0;
  background: linear-gradient(180deg, transparent, rgba(14, 21, 37, 0.4), transparent);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.project-card {
  border: 1px solid var(--border);
  background: var(--bg2);
  overflow: hidden;
  position: relative;
  transition: all 0.3s;
}

.project-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-6px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
}

.project-img {
  height: 190px;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-img-placeholder {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.8;
}

.project-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--bg2));
}

.project-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 168, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}

.project-card:hover .project-img-overlay {
  opacity: 1;
}

.project-body {
  padding: 22px;
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.project-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 8px;
}

.project-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 18px;
}

.project-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.project-link:hover {
  border-color: var(--primary);
}

/* PROCESS */
#process {
  padding: 96px 0;
}

.process-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 0 auto;
}

.process-line {
  position: absolute;
  right: 27px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--primary), rgba(0, 168, 255, 0.05));
}

.process-step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  padding: 0 0 44px;
  position: relative;
}

.process-step:last-child {
  padding-bottom: 0;
}

.process-dot {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border-bright);
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  position: relative;
  z-index: 1;
  transition: all 0.3s;
}

.process-step:hover .process-dot {
  background: var(--primary-dim);
  box-shadow: 0 0 18px var(--primary-glow);
  border-color: var(--primary);
}

.process-content {
  padding-top: 10px;
}

.process-num {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.process-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 7px;
}

.process-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.8;
}

/* ABOUT */
#about {
  padding: 96px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 72px;
  align-items: center;
}

.about-panel {
  position: relative;
  border: 1px solid var(--border);
  padding: 44px 28px;
  background: var(--bg2);
}

.about-panel::before {
  content: 'PROFILE.JSON';
  position: absolute;
  top: -10px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  background: var(--bg2);
  padding: 0 8px;
}

.about-avatar {
  width: 84px;
  height: 84px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-en);
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 auto 22px;
}

.about-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--light);
  text-align: center;
  margin-bottom: 4px;
}

.about-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  text-align: center;
  margin-bottom: 28px;
  opacity: 0.65;
}

.about-skills {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.skill-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.skill-bar {
  height: 2px;
  background: var(--bg3);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), rgba(0, 168, 255, 0.4));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 1s ease;
}

.skill-fill.animated {
  transform: scaleX(1);
}

.about-text h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 18px;
}

.about-text p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 2;
  margin-bottom: 14px;
}

.about-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.about-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 4px 13px;
  background: var(--primary-dim);
}

/* CONTACT */
#contact {
  padding: 96px 0 72px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-intro h3 {
  font-size: 26px;
  font-weight: 700;
  color: var(--light);
  margin-bottom: 14px;
}

.contact-intro p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 32px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  background: var(--bg2);
  text-decoration: none;
  transition: all 0.25s;
  color: var(--text);
}

.contact-link:hover {
  border-color: var(--border-bright);
  background: var(--bg3);
  color: var(--primary);
  transform: translateX(-4px);
}

.contact-link-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  background: var(--primary-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

.contact-link-platform {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--primary);
  opacity: 0.65;
  display: block;
}

.contact-link-handle {
  font-size: 14px;
  font-weight: 600;
}

.contact-form-panel {
  border: 1px solid var(--border);
  padding: 32px;
  background: var(--bg2);
  position: relative;
}

.contact-form-panel::before {
  content: 'SEND_MESSAGE.INIT';
  position: absolute;
  top: -10px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  background: var(--bg2);
  padding: 0 8px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--primary);
  opacity: 0.65;
  display: block;
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--light);
  padding: 11px 14px;
  font-family: var(--font-fa);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
}

.form-input:focus {
  border-color: var(--border-bright);
}

textarea.form-input {
  resize: vertical;
  min-height: 115px;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 48px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--primary);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.45;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
  color: var(--text-dim);
  transition: all 0.2s;
}

.footer-social:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-dim);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

.hero-content>* {
  animation: fadeInUp 0.65s ease both;
}

.hero-content>*:nth-child(1) {
  animation-delay: 0.08s;
}

.hero-content>*:nth-child(2) {
  animation-delay: 0.18s;
}

.hero-content>*:nth-child(3) {
  animation-delay: 0.28s;
}

.hero-content>*:nth-child(4) {
  animation-delay: 0.38s;
}

.hero-content>*:nth-child(5) {
  animation-delay: 0.48s;
}

.hero-panel {
  animation: fadeInUp 0.8s ease 0.25s both;
}

@media (max-width: 900px) {
  header {
    padding: 0 24px;
  }

  nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 44px;
    padding: 0 24px;
  }

  .hero-panel {
    height: 300px;
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .container {
    padding: 0 24px;
  }

  footer {
    padding: 32px 24px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .hero-btns {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .projects-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
}