/*
Theme Name: Ali Karimiafkham - Personal Brand
Theme URI: https://alikarimiafkham.ir
Author: Ali Karimiafkham
Author URI: https://alikarimiafkham.ir
Description: Dark & Mysterious personal branding theme. Custom-built for Ali Karimiafkham.
Version: 1.0.0
License: Private
Text Domain: alikarimiafkham
*/

:root {
  --bg-deep: #050505;
  --bg-primary: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #161616;
  --bg-card-hover: #1c1c1c;
  --text-primary: #e8e6e3;
  --text-secondary: #8a8a8a;
  --text-muted: #4a4a4a;
  --accent: #c9a84c;
  --accent-dim: rgba(201, 168, 76, 0.15);
  --accent-glow: rgba(201, 168, 76, 0.08);
  --border: rgba(255,255,255, 0.04);
  --border-hover: rgba(255,255,255, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) var(--bg-primary);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: var(--bg-deep);
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  pointer-events: none;
  z-index: 9999;
}

/* ═══ NAVIGATION ═══ */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(5,5,5,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 400;
}

.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px; height: 1px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem 8vw 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 70vw; height: 70vw;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 65%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--bg-deep), transparent);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  position: relative;
  z-index: 1;
}

.hero-text {
  flex: 1;
  max-width: 620px;
}

.hero-micro {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.15s;
}

.hero-image {
  flex: 0 0 auto;
  position: relative;
  opacity: 0;
  animation: fadeSlideUp 1s ease forwards 0.6s;
}

.hero-image-wrapper {
  position: relative;
  width: 340px;
  height: 440px;
  overflow: hidden;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(30%) contrast(1.1) brightness(0.9);
  transition: all 0.6s ease;
}

.hero-image-wrapper:hover img {
  filter: grayscale(0%) contrast(1) brightness(1);
  transform: scale(1.03);
}

.hero-image-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 60%,
    var(--bg-deep) 100%
  );
  pointer-events: none;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  top: -8px; left: -8px;
  right: 8px; bottom: 8px;
  border: 1px solid var(--accent);
  opacity: 0.3;
  z-index: -1;
  transition: all 0.4s ease;
}

.hero-image-wrapper:hover::before {
  top: -12px; left: -12px;
  opacity: 0.5;
}

.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.3s;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeSlideUp 1s ease forwards 0.5s;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 0.8s;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2.2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeSlideUp 0.8s ease forwards 1.1s;
}

.hero-cta:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

.hero-cta svg { width: 16px; height: 16px; transition: transform 0.3s ease; }
.hero-cta:hover svg { transform: translateX(4px); }

.hero-scroll-indicator {
  position: absolute;
  bottom: 3rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards 2s;
  z-index: 1;
}

.hero-scroll-indicator span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* ═══ CREDIBILITY STRIP ═══ */
.credibility-strip {
  padding: 1.8rem 8vw;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.credibility-inner {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.credibility-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.credibility-items {
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.credibility-items::-webkit-scrollbar { display: none; }

.credibility-items span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.credibility-items span:hover {
  opacity: 1;
  color: var(--accent);
}

/* ═══ SECTIONS ═══ */
section { padding: 8rem 8vw; position: relative; }

.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::before {
  content: '';
  width: 30px; height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.section-divider {
  width: 100%; height: 1px;
  background: var(--border);
}

/* ═══ ABOUT ═══ */
.about { background: var(--bg-primary); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  margin-top: 3rem;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.02rem;
}

.about-text p:first-child::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 3.5rem;
  float: left;
  line-height: 1;
  margin-right: 0.5rem;
  margin-top: 0.1rem;
  color: var(--accent);
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 1rem;
}

.stat-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-number span { color: var(--accent); font-size: 1.5rem; }

.stat-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══ EXPERTISE TAGS ═══ */
.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 2rem;
}

.tag {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* ═══ AUTOMATION ARCHITECTURE ═══ */
.architecture {
  background: var(--bg-primary);
  padding: 8rem 8vw;
}

.architecture-intro {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 680px;
  margin-bottom: 4rem;
}

.architecture-layers {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.arch-layer {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2.2rem 0;
  position: relative;
}

.arch-layer-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 0.3rem;
  flex-shrink: 0;
  width: 24px;
}

.arch-layer-content {
  flex: 1;
}

.arch-layer-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.arch-layer-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 600px;
}

.arch-layer-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-dim), var(--border) 30%, transparent);
}

.arch-layer:hover .arch-layer-name {
  color: var(--accent);
  transition: color 0.3s ease;
}

.arch-layer:hover .arch-layer-number {
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* ═══ VENTURES ═══ */
.ventures { background: var(--bg-deep); }

.ventures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

.venture-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: block;
  cursor: pointer;
  color: inherit;
}

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

.venture-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.venture-card:hover::before { opacity: 1; }

.venture-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.venture-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.venture-type {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.venture-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.venture-arrow {
  position: absolute;
  bottom: 2rem; right: 2rem;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.venture-card:hover .venture-arrow {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.venture-arrow svg {
  width: 14px; height: 14px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.venture-card:hover .venture-arrow svg {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* ═══ CURRENTLY BUILDING ═══ */
.currently-building {
  background: var(--bg-primary);
  padding: 8rem 8vw;
}

.building-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 3rem;
}

.building-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.building-item:last-child {
  border-bottom: none;
}

.building-item:hover {
  padding-left: 0.5rem;
}

.building-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: all 0.3s ease;
}

.building-status.active {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.2);
  background: rgba(74, 222, 128, 0.05);
}

.building-status.research {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.2);
  background: rgba(167, 139, 250, 0.05);
}

.building-status.ongoing {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: var(--accent-glow);
}

.building-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.building-item:hover .building-text {
  color: var(--text-primary);
}

/* ═══ PHILOSOPHY ═══ */
.philosophy {
  background: var(--bg-primary);
  text-align: center;
  padding: 10rem 8vw;
}

.philosophy-quote {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto 2rem;
  font-style: italic;
  color: var(--text-primary);
}

.philosophy-quote::before {
  content: '\201C';
  display: block;
  font-size: 4rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
  font-style: normal;
}

.philosophy-attribution {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ═══ CONTACT ═══ */
.contact {
  background: var(--bg-deep);
  padding: 10rem 8vw;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  margin-top: 3rem;
}

.contact-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.contact-email {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.3rem;
}

.contact-email:hover { border-bottom-color: var(--accent); }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form input:focus,
.contact-form textarea:focus { border-bottom-color: var(--accent); }

.contact-form textarea { resize: vertical; min-height: 100px; }

.submit-btn {
  align-self: flex-start;
  padding: 1rem 2.5rem;
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.4s ease;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

/* ═══ FOOTER ═══ */
footer.site-footer {
  padding: 3rem 8vw;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-deep);
}

.footer-copy {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

.footer-links a:hover { color: var(--accent); }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ═══ WORDPRESS OVERRIDES ═══ */
#wpadminbar ~ nav.site-nav { top: 32px; }
@media (max-width: 782px) { #wpadminbar ~ nav.site-nav { top: 46px; } }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  nav.site-nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.2rem; }
  .nav-links a { font-size: 0.7rem; }
  section { padding: 5rem 6vw; }
  .hero { padding: 5rem 6vw 3rem; }
  .hero-content { flex-direction: column; text-align: center; gap: 2.5rem; }
  .hero-text { max-width: 100%; }
  .hero-image-wrapper { width: 250px; height: 320px; margin: 0 auto; }
  .hero-cta { margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .ventures-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .credibility-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .credibility-items { gap: 1.2rem; }
  .building-item { flex-direction: column; gap: 0.6rem; }
  footer.site-footer { flex-direction: column; gap: 1rem; text-align: center; }
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 70%; height: 100vh;
    background: var(--bg-elevated);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s ease;
    border-left: 1px solid var(--border);
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1rem; }
}
/* Force hero to be two-column on desktop */
@media (min-width: 1024px) {
  .hero-content,
  .hero-inner {
    display: grid !important;
    grid-template-columns: 1.15fr 0.85fr !important;
    align-items: center !important;
    gap: 64px !important;
  }

  .hero-text,
  .hero-copy {
    max-width: 680px;
  }

  .hero-image,
  .hero-media {
    justify-self: end;
    align-self: center;
  }
}