/* ── Design Tokens ───────────────────────────────────────── */
:root {
  --bg:       #020617;
  --surface:  #0F172A;
  --surface2: #1E293B;
  --accent:   #EF4444;
  --accent-d: #DC2626;
  --text:     #F8FAFC;
  --para:     #CBD5E1;
  --border:   #334155;
}

*  { box-sizing: border-box; margin: 0; padding: 0; scroll-behavior: smooth; }
a  { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

/* ── Layout ──────────────────────────────────────────────── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
.section    { padding: 5.5rem 0; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(2,6,23,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 1.1rem 1.5rem;
}
.nav-logo { font-size: 1.3rem; font-weight: 900; letter-spacing: -.5px; display: flex; align-items: center; }
.nav-logo span { color: var(--accent); }
.nav-logo-img { height: 38px; width: auto; display: block; object-fit: contain; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--para); font-size: .9rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--para); padding: .25rem; }
.nav-shop {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1.1rem; border-radius: .3rem; font-size: .82rem; font-weight: 700;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  transition: background .2s, transform .2s; white-space: nowrap;
}
.nav-shop:hover { background: var(--accent-d); border-color: var(--accent-d); transform: translateY(-1px); color: #fff; }
/* Mobile nav dropdown */
.nav-mobile-menu {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 1.1rem 1.5rem;
  display: flex; flex-direction: column; gap: 0;
}
.nav-mobile-menu a {
  display: block; padding: .75rem 0;
  color: var(--para); font-weight: 500; font-size: .95rem;
  border-bottom: 1px solid var(--border); transition: color .15s;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--text); }
.nav-mobile-menu .nav-shop-mobile {
  display: block; margin-top: .75rem; padding: .7rem 0; text-align: center;
  background: var(--accent); color: #fff !important; border-radius: .35rem;
  font-weight: 700; font-size: .9rem; border-bottom: none !important;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-red {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.6rem; border-radius: .35rem; font-weight: 700; font-size: .9rem;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  transition: all .2s; cursor: pointer;
}
.btn-red:hover { background: var(--accent-d); border-color: var(--accent-d); transform: translateY(-2px); color: #fff; }

.btn-outline {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.6rem; border-radius: .35rem; font-weight: 700; font-size: .9rem;
  background: transparent; color: var(--text); border: 2px solid var(--border);
  transition: all .2s; cursor: pointer;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

/* ── Input ───────────────────────────────────────────────── */
.input-field {
  width: 100%; padding: .75rem 1rem;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: .375rem; font-size: .9rem;
  outline: none; transition: border-color .2s; font-family: inherit;
}
.input-field:focus { border-color: var(--accent); }
.input-field::placeholder { color: #475569; }
textarea.input-field { resize: vertical; min-height: 120px; }

/* ── Tag ─────────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: .2rem .65rem; border-radius: .25rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .03em;
  background: var(--surface2); border: 1px solid var(--border); color: var(--para);
}

/* ════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero {
  min-height: 100vh; padding: 8rem 0 3rem;
  display: flex; align-items: center;
}
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center;
}
.hero-hello { font-size: 1.05rem; color: var(--para); margin-bottom: .4rem; }
.hero-intro {
  display: flex; align-items: center; gap: .75rem;
  font-size: 1.15rem; color: var(--para); margin-bottom: .25rem; font-weight: 500;
}
.hero-intro::before {
  content: ''; display: block; width: 40px; height: 2px;
  background: var(--accent); flex-shrink: 0;
}
.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.75rem); font-weight: 900;
  line-height: 1.08; letter-spacing: -1.5px; margin-bottom: .6rem;
}
.hero-title { font-size: 1rem; color: var(--accent); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.1rem; }
.hero-bio   { color: var(--para); max-width: 480px; margin-bottom: 2rem; font-size: .95rem; line-height: 1.75; }
.hero-btns  { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero photo */
.hero-photo-wrap { display: flex; align-items: center; justify-content: center; position: relative; }
.hero-photo-frame { position: relative; width: 340px; height: 340px; }
.hero-photo-ring {
  width: 100%; height: 100%; border-radius: 50%;
  border: 3px solid var(--accent);
  box-shadow: 0 0 80px rgba(239,68,68,0.18);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.hero-photo-ring img {
  width: 88%; height: 88%; border-radius: 50%; object-fit: cover; object-position: top;
}
.hero-photo-placeholder {
  width: 88%; height: 88%; border-radius: 50%;
  background: var(--surface2); display: flex; align-items: center;
  justify-content: center; color: var(--border);
}
.hero-arrow {
  position: absolute; font-size: 7rem; font-weight: 900;
  color: rgba(239,68,68,0.1); user-select: none; line-height: 1;
  top: 50%; transform: translateY(-50%);
}
.hero-arrow.l { left: -75px; }
.hero-arrow.r { right: -75px; }

/* ── Skills strip ────────────────────────────────────────── */
.skills-strip {
  background: var(--surface); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 1.1rem 0; overflow: hidden;
}
.skills-track {
  display: flex; gap: 2.5rem; align-items: center;
  width: max-content; animation: marquee 24s linear infinite;
}
.skills-track span {
  color: var(--para); font-size: .82rem; font-weight: 600;
  white-space: nowrap; display: flex; align-items: center; gap: .5rem;
}
.skills-track span::before { content: '◆'; color: var(--accent); font-size: .55rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ════════════════════════════════════════════════════════════
   ABOUT
══════════════════════════════════════════════════════════════ */
.about-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 4rem; align-items: start; }

.services-list { display: flex; flex-direction: column; gap: .85rem; }
.service-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; border-radius: .5rem;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); transition: transform .2s;
}
.service-item:hover { transform: translateX(5px); }
.service-icon {
  width: 38px; height: 38px; border-radius: .35rem; flex-shrink: 0;
  background: rgba(239,68,68,0.12); display: flex; align-items: center;
  justify-content: center; color: var(--accent);
}
.service-name { font-weight: 700; font-size: .9rem; }
.service-desc { font-size: .8rem; color: var(--para); margin-top: .1rem; }

.section-label {
  font-size: .75rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .6rem;
}
.section-heading { font-size: 2.25rem; font-weight: 900; margin-bottom: 1.25rem; letter-spacing: -.5px; }
.about-bio  { color: var(--para); line-height: 1.8; margin-bottom: 2rem; font-size: .95rem; }
.stats-row  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.stat-num   { font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat-label { font-size: .78rem; color: var(--para); margin-top: .2rem; }

/* ════════════════════════════════════════════════════════════
   PROJECTS
══════════════════════════════════════════════════════════════ */
.projects-title-wrap { text-align: center; margin-bottom: 3.5rem; }
.projects-title { font-size: 2.25rem; font-weight: 900; }
.projects-title-bar { width: 3px; height: 44px; background: var(--accent); margin: .9rem auto 0; border-radius: 2px; }

.project-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center; margin-bottom: 5rem;
}
.project-row.flip { direction: rtl; }
.project-row.flip > * { direction: ltr; }

.project-img-box {
  border-radius: .75rem; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  aspect-ratio: 16/10; position: relative;
}
.project-img-box img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.project-img-box:hover img { transform: scale(1.04); }
.project-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center;
  justify-content: center; color: var(--border); background: var(--surface);
}

.project-tags  { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .85rem; }
.project-title { font-size: 1.4rem; font-weight: 800; margin-bottom: .65rem; }
.project-desc  { color: var(--para); font-size: .9rem; line-height: 1.75; margin-bottom: 1.4rem; }
.project-actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.project-link-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--para); font-size: .88rem; font-weight: 600; transition: color .2s;
}
.project-link-btn:hover { color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   CONTACT
══════════════════════════════════════════════════════════════ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-heading { font-size: 2.25rem; font-weight: 900; line-height: 1.2; margin-bottom: 1.25rem; }
.contact-heading span { color: var(--accent); }
.contact-sub  { color: var(--para); font-size: .95rem; line-height: 1.7; margin-bottom: 1.5rem; }
.contact-info { display: flex; flex-direction: column; gap: .85rem; }
.contact-info-row {
  display: flex; align-items: center; gap: .85rem;
  font-size: .9rem; color: var(--para);
}
.contact-info-icon {
  width: 36px; height: 36px; border-radius: .35rem; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.contact-form { display: flex; flex-direction: column; gap: 1rem; }

/* ════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
footer {
  border-top: 1px solid var(--border); padding: 2.5rem 0; text-align: center;
}
.footer-name { font-size: 1.05rem; font-weight: 900; margin-bottom: .3rem; }
.footer-name span { color: var(--accent); }
.footer-copy { color: var(--para); font-size: .8rem; margin-bottom: .75rem; }
.footer-pages {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.25rem;
  margin-bottom: 1.25rem;
}
.footer-pages a {
  font-size: .78rem; color: var(--para); transition: color .2s;
}
.footer-pages a:hover { color: var(--accent); }
.footer-socials { display: flex; justify-content: center; gap: .75rem; }
.footer-social {
  width: 38px; height: 38px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--para);
  transition: border-color .2s, color .2s;
}
.footer-social:hover { border-color: var(--accent); color: var(--accent); }

/* ════════════════════════════════════════════════════════════
   PROJECT DETAIL PAGE
══════════════════════════════════════════════════════════════ */
.detail-hero { padding: 8rem 0 2rem; border-bottom: 1px solid var(--border); margin-bottom: 3rem; }
.detail-back {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--para); font-size: .88rem; font-weight: 600;
  margin-bottom: 2rem; transition: color .2s;
}
.detail-back:hover { color: var(--accent); }
.detail-category { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.detail-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; letter-spacing: -1px; margin-bottom: 1rem; }
.detail-tags  { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; }
.detail-desc  { color: var(--para); font-size: 1rem; line-height: 1.8; max-width: 700px; margin-bottom: 2rem; }
.detail-links { display: flex; gap: 1rem; flex-wrap: wrap; }

.screenshots-section { margin-bottom: 5rem; }
.screenshots-section h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.5rem; }
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.screenshot-thumb {
  border-radius: .5rem; overflow: hidden; border: 1px solid var(--border);
  aspect-ratio: 16/10; cursor: pointer; transition: border-color .2s, transform .2s;
  background: var(--surface);
}
.screenshot-thumb img { width: 100%; height: 100%; object-fit: cover; }
.screenshot-thumb:hover { border-color: var(--accent); transform: translateY(-3px); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.93); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 2rem;
}
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: .5rem; }
.lightbox-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 40px; height: 40px; border-radius: 50%; background: var(--surface2);
  border: 1px solid var(--border); color: var(--text); font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ── Shop Banner ─────────────────────────────────────────── */
.shop-banner {
  background: linear-gradient(135deg, #1a0505 0%, #2d0a0a 50%, #0f172a 100%);
  border-top: 1px solid rgba(239,68,68,.25);
  border-bottom: 1px solid rgba(239,68,68,.25);
  padding: 3rem 0;
}
.shop-banner-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.shop-banner-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .4rem;
}
.shop-banner-heading {
  font-size: 1.5rem; font-weight: 900; margin-bottom: .5rem; line-height: 1.25;
}
.shop-banner-sub { color: var(--para); font-size: .88rem; max-width: 520px; }
.shop-banner-btn {
  display: inline-flex; align-items: center; gap: .55rem; flex-shrink: 0;
  padding: .85rem 1.75rem; border-radius: .4rem; font-weight: 800; font-size: .95rem;
  background: var(--accent); color: #fff; border: 2px solid var(--accent);
  transition: all .2s; white-space: nowrap;
}
.shop-banner-btn:hover { background: var(--accent-d); border-color: var(--accent-d); transform: translateY(-2px); color: #fff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  /* Nav */
  .nav-links     { display: none; }
  .nav-hamburger { display: block; }

  /* Hero */
  .hero-grid    { grid-template-columns: 1fr; text-align: center; }
  .hero-intro   { justify-content: center; }
  .hero-intro::before { display: none; }
  .hero-bio     { margin: 0 auto 2rem; }
  .hero-btns    { justify-content: center; }
  .hero-photo-wrap { order: -1; }
  .hero-photo-frame { width: 250px; height: 250px; }
  .hero-arrow   { display: none; }

  /* Sections */
  .about-grid   { grid-template-columns: 1fr; }
  .project-row  { grid-template-columns: 1fr; }
  .project-row.flip { direction: ltr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-row    { grid-template-columns: repeat(3, 1fr); }

  /* Contact form: name+email stacked instead of side-by-side */
  .form-row-2col { grid-template-columns: 1fr !important; }

  /* Shop banner */
  .shop-banner-inner { flex-direction: column; text-align: center; }
  .shop-banner-sub   { margin: 0 auto; }
  .shop-banner-btn   { width: 100%; justify-content: center; }
}

@media (max-width: 480px) {
  .section { padding: 3.5rem 0; }
  .hero    { padding: 6rem 0 2rem; }
  .hero-photo-frame { width: 210px; height: 210px; }
  .stats-row { grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
  .screenshots-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
.d1 { animation-delay: .1s; }
.d2 { animation-delay: .2s; }
.d3 { animation-delay: .3s; }
.d4 { animation-delay: .4s; }
.d5 { animation-delay: .5s; }
.d6 { animation-delay: .6s; }

/* Admin dashboard preserved styles */
[x-cloak] { display: none !important; }

/* ════════════════════════════════════════════════════════════
   BLOG
══════════════════════════════════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.blog-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.blog-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(239,68,68,.12);
}
.blog-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--border);
}
.blog-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.blog-card-cat {
  display: inline-block;
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 9999px;
  padding: .2rem .7rem;
  margin-bottom: .75rem;
}
.blog-card-title {
  font-size: 1.05rem; font-weight: 800; line-height: 1.35;
  margin-bottom: .5rem; color: var(--text);
}
.blog-card-excerpt {
  font-size: .875rem; color: var(--para); line-height: 1.65;
  margin-bottom: 1rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: var(--para);
}
.blog-read-more { color: var(--accent); font-weight: 600; }

/* Individual post */
.blog-post-hero { background: var(--surface); border-bottom: 1px solid var(--border); }
.blog-post-hero img { width: 100%; max-height: 480px; object-fit: cover; display: block; }

.blog-post-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--para);
}
.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3 {
  color: var(--text);
  font-weight: 800;
  margin: 2rem 0 .75rem;
  line-height: 1.25;
}
.blog-post-content h2 { font-size: 1.4rem; }
.blog-post-content h3 { font-size: 1.15rem; }
.blog-post-content p  { margin-bottom: 1.25rem; }
.blog-post-content ul,
.blog-post-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.blog-post-content li { margin-bottom: .4rem; }
.blog-post-content a  { color: var(--accent); text-decoration: underline; }
.blog-post-content strong { color: var(--text); }
.blog-post-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--para);
  font-style: italic;
  margin: 1.5rem 0;
}
.blog-post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .5rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-size: .88rem;
  margin-bottom: 1.25rem;
}
.blog-post-content code {
  background: var(--surface2);
  border-radius: .25rem;
  padding: .1em .4em;
  font-size: .88em;
}
.blog-post-content pre code { background: none; padding: 0; }
.blog-post-content img {
  max-width: 100%;
  border-radius: .5rem;
  margin: 1rem 0;
}

/* Skill / tag pill (reused on blog post) */
.skill-tag {
  display: inline-block;
  font-size: .75rem; font-weight: 600;
  padding: .2rem .65rem;
  border-radius: 9999px;
  background: rgba(239,68,68,.1);
  border: 1px solid rgba(239,68,68,.2);
  color: var(--accent);
}
