/*
Theme Name: Nezami Portfolio
Theme URI: https://amirsheykhi.ir/nezami
Author: Amirhossein Nezamipour Azari
Author URI: https://amirsheykhi.ir
Description: Minimal personal portfolio theme (Nezami). RTL/Persian-ready and Elementor compatible.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amirsheykhi-dark
Tags: portfolio, dark, rtl, elementor, one-column, custom-logo, custom-menu, featured-images, threaded-comments
*/

:root {
  --bg: #0a0a0b;
  --bg-soft: #121214;
  --bg-card: #161619;
  --border: #26262b;
  --text: #ececf1;
  --muted: #9a9aa6;
  --accent: #f59e0b;
  --accent-2: #ff7a18;
  --radius: 16px;
  --maxw: 1140px;
  --font: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(245,158,11,.10), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255,122,24,.08), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10,10,11,.72);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; color: var(--text); }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 18px var(--accent); }
.nav-menu { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav-menu a { color: var(--muted); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .98rem; }
.nav-menu a:hover, .nav-menu .current-menu-item > a { color: var(--text); background: var(--bg-card); }
.nav-toggle { display: none; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 8px 12px; font-size: 1.1rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 12vw, 140px) 0 clamp(48px, 8vw, 96px); }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 700; font-size: .9rem;
  border: 1px solid var(--border); background: var(--bg-card);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero p.lead { color: var(--muted); font-size: 1.18rem; max-width: 620px; margin: 20px 0 32px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 12px; font-weight: 700; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a1206; box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { color: #1a1206; transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--accent); }
.btn-ghost { background: var(--bg-card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent); }

/* ---------- Sections ---------- */
section.block { padding: clamp(48px, 8vw, 90px) 0; }
.section-head { margin-bottom: 40px; }
.section-head .kicker { color: var(--accent); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .82rem; }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card h3 { margin: 0 0 10px; }
.card p { color: var(--muted); margin: 0; }

/* ---------- Content (posts/pages) ---------- */
.page-wrap { padding: clamp(40px, 7vw, 80px) 0; }
.post { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); margin-bottom: 32px; }
.post-meta { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.entry-content { line-height: 1.9; }
.entry-content a { text-decoration: underline; }
.entry-content img { border-radius: 12px; }
.entry-content blockquote { border-inline-start: 3px solid var(--accent); margin-inline: 0; padding-inline-start: 20px; color: var(--muted); }
.entry-content pre { background: #0d0d10; border: 1px solid var(--border); padding: 16px; border-radius: 12px; overflow: auto; }
.entry-content code { background: #0d0d10; padding: 2px 6px; border-radius: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 48px 0; margin-top: 40px; }
.site-footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--muted); }
.social { display: flex; gap: 14px; }
.social a { color: var(--muted); }
.social a:hover { color: var(--accent); }

/* ---------- WP misc ---------- */
.wp-caption, .gallery-caption { color: var(--muted); }
.alignright { float: right; margin-inline-start: 24px; }
.alignleft  { float: left;  margin-inline-end: 24px; }
.aligncenter { display: block; margin-inline: auto; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }
.pagination { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--muted); }
.pagination .current { background: var(--accent); color: #1a1206; border-color: var(--accent); }

/* ---------- Elementor Canvas / Full Width pages ---------- */
/* Neutralize the dark theme body so Elementor-built pages keep their own colors. */
body.elementor-page,
body.elementor-template-canvas,
body.elementor-template-full-width {
  background: #ffffff;
  color: #1f2937;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .nav-menu { display: none; position: absolute; inset-inline: 16px; top: 70px; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 12px; }
  .nav-menu.open { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-footer .container { flex-direction: column; }
}
