:root {
  --bg: #0a0c10;
  --panel: #12151b;
  --panel-2: #171b22;
  --text: #edeff4;
  --muted: #8d93a1;
  --accent: #f2a93b;
  --accent-dim: rgba(242, 169, 59, .14);
  --line: rgba(255, 255, 255, .09);
  --mono: 'JetBrains Mono', 'Courier New', monospace;
  --sans: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

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

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--sans); font-weight: 600; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Navbar ---------- */
.navbar {
  height: 78px;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 12, 16, .88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid rgba(242, 169, 59, .35);
  border-radius: 6px;
  padding: 3px 7px;
}
.brand-name { font-size: 19px; font-weight: 600; letter-spacing: .3px; }

nav { display: flex; gap: 34px; align-items: center; margin-inline-start: auto; }
nav a { color: var(--muted); padding: 28px 0 24px; position: relative; font-size: 15px; }
nav a:hover, nav a.active { color: var(--text); }
nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--accent);
}

.cv-btn {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  margin-inline-start: 28px;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}
.cv-btn:hover { border-color: var(--accent); color: var(--accent); }

.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
}
.menu-btn span { width: 22px; height: 2px; background: var(--text); display: block; }

/* ---------- Hero ---------- */
.hero {
  min-height: 640px;
  padding: 80px 6% 60px;
  display: grid;
  grid-template-columns: 44% 56%;
  gap: 40px;
  align-items: center;
}

.prompt {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 18px;
}
.prompt-sign { color: var(--accent); }

h1 {
  font-size: clamp(64px, 9vw, 108px);
  line-height: .95;
  letter-spacing: -2px;
}

.hero h2 {
  font-size: 24px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 14px;
}

.intro {
  color: var(--muted);
  line-height: 1.75;
  max-width: 480px;
  margin: 24px 0 34px;
  font-size: 16px;
}

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

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  background: var(--accent);
  color: #17130a;
  transition: transform .2s, box-shadow .2s;
}
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(242, 169, 59, .25); }

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 26px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  border: 1px solid var(--line);
  transition: border-color .2s;
}
.secondary-btn:hover { border-color: var(--accent); }

/* ---------- Hero visual: editor mockup ---------- */
.visual { position: relative; }

.editor {
  direction: ltr;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
  overflow: hidden;
}

.editor-top {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--panel-2);
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.traffic { display: flex; gap: 7px; }
.traffic span { width: 10px; height: 10px; border-radius: 50%; background: #3b3f49; }

.tabs { display: flex; }
.tab {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}
.tab.active { color: var(--text); background: var(--panel); border-bottom: 2px solid var(--accent); }

.editor-body { display: flex; padding: 22px 0; }
.gutter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 13px;
  color: #3f4552;
  text-align: right;
}

.code {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  color: #9aa4b8;
  white-space: pre;
  padding-right: 20px;
  overflow-x: auto;
}
.code .tag { color: #6bb0ff; }
.code .attr { color: #b48bff; }
.code .str { color: #8fd48a; }
.code .kw { color: var(--accent); font-weight: 600; }
.cursor { color: var(--accent); animation: blink 1s step-start infinite; }

@keyframes blink { 50% { opacity: 0; } }

.preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.preview-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.preview-card strong { display: block; font-size: 15px; }
.preview-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }

/* ---------- Stats ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 6%;
}
.stat {
  padding: 30px 5%;
  border-inline-end: 1px solid var(--line);
}
.stat:last-child { border-inline-end: 0; }
.stat b { display: block; font-size: 28px; color: var(--accent); font-weight: 600; }
.stat small { display: block; color: var(--muted); margin-top: 6px; font-size: 14px; }

/* ---------- Section shared ---------- */
.section-label {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 13px;
}
.skills h2, .projects h2, .contact h2 {
  font-size: 38px;
  margin: 10px 0 44px;
  max-width: 640px;
}

/* ---------- Skills ---------- */
.skills { padding: 100px 6%; }
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.skill-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.skill-mark {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  margin-bottom: 16px;
}
.skill-mark.html { color: #ff8a65; background: rgba(255, 138, 101, .12); }
.skill-mark.css { color: #6bb0ff; background: rgba(107, 176, 255, .12); }
.skill-mark.js { color: #f2d64b; background: rgba(242, 214, 75, .12); }
.skill-mark.wp { color: #cfd4e0; background: rgba(207, 212, 224, .12); }
.skill-mark.php { color: #b48bff; background: rgba(180, 139, 255, .12); }
.skill-mark.code { color: var(--accent); background: var(--accent-dim); }
.skill-card p { color: var(--muted); line-height: 1.7; font-size: 14.5px; }

/* ---------- Projects ---------- */
.projects { padding: 20px 6% 110px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.project-grid article {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  transition: border-color .25s, transform .25s;
}
.project-grid article:hover { transform: translateY(-6px); border-color: rgba(242, 169, 59, .4); }
.project-icon {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 22px;
}
.project-grid h3 { margin-bottom: 12px; font-size: 19px; }
.project-grid p { color: var(--muted); line-height: 1.7; font-size: 14.5px; }

/* ---------- Contact ---------- */
.contact { text-align: center; padding: 110px 6%; border-top: 1px solid var(--line); }
.contact h2 { margin-left: auto; margin-right: auto; }
.contact-sub { color: var(--muted); margin-bottom: 32px; font-size: 16px; }

footer {
  text-align: center;
  padding: 26px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-family: var(--mono);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  nav { gap: 20px; }
  .cv-btn { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 55px; }
  .intro { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .prompt { justify-content: center; display: flex; gap: 6px; }
  .skills-grid, .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .navbar { height: 66px; padding: 0 5%; }
  nav {
    display: none;
    position: absolute; top: 66px; left: 0; right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 10px 0 20px;
    border-bottom: 1px solid var(--line);
  }
  nav.open { display: flex; }
  nav a { padding: 14px; width: 100%; text-align: center; }
  nav a.active::after { display: none; }
  .menu-btn { display: flex; }
  .hero { padding: 45px 6% 30px; }
  h1 { font-size: 58px; }
  .hero h2 { font-size: 19px; }
  .stats { grid-template-columns: 1fr; padding: 0 6%; }
  .stat { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .skills, .projects { padding: 60px 6%; }
  .skills-grid, .project-grid { grid-template-columns: 1fr; }
  .skills h2, .projects h2, .contact h2 { font-size: 28px; }
  .contact { padding: 70px 6%; }
}
