/* ==========================================================================
   Timoumi Houcem — Original Cyber Obsidian Design System
   Colors: #070b12, #0d1421, #111928, #10b981, #34d399, #f59e0b
   Fonts: Space Grotesk, Plus Jakarta Sans, JetBrains Mono (+ Cairo for AR)
   ========================================================================== */

:root {
  --bg: #070b12;
  --bg-elevated: #0d1421;
  --surface: rgba(17, 25, 40, 0.78);
  --surface-solid: #111928;
  --header-bg: rgba(7, 11, 18, 0.8);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(52, 211, 153, 0.35);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #10b981;
  --accent-light: #34d399;
  --amber: #f59e0b;
  --btn-fg: #032219;
  --pill-bg: rgba(16, 185, 129, 0.12);
  --pill-border: rgba(16, 185, 129, 0.3);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: 'Plus Jakarta Sans', 'Cairo', system-ui, sans-serif;
  --font-display: 'Space Grotesk', 'Cairo', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --ease-base: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f4f7fb;
  --bg-elevated: #ffffff;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --header-bg: rgba(244, 247, 251, 0.88);
  --border: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(16, 185, 129, 0.4);
  --text: #0f172a;
  --text-muted: #475569;
  --accent: #059669;
  --accent-light: #10b981;
  --amber: #d97706;
  --btn-fg: #ffffff;
  --pill-bg: rgba(16, 185, 129, 0.1);
  --pill-border: rgba(16, 185, 129, 0.28);
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body {
  font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.heading-2,
.heading-3,
.heading-4,
.heading-5 {
  margin: 0;
  font-family: var(--font-display);
}

.heading-2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.15; }
.heading-3 { font-size: clamp(1.75rem, 3vw, 2.35rem); line-height: 1.2; }
.heading-4 { font-size: 1.6rem; line-height: 1.25; }
.heading-5 { font-size: 1.35rem; line-height: 1.3; }
.title-1 { font-family: var(--font-display); font-size: 1.25rem; margin: 0; }
.title-2 { font-family: var(--font-display); font-size: 1.08rem; margin: 0; }
.title-3 { font-size: 1rem; margin: 0; }
.title-4 { font-size: 0.94rem; }
.caption-1 { font-size: 0.86rem; }
.caption-3 { font-size: 0.8rem; }

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.88rem;
}

.skip-link:focus {
  top: 1rem;
}

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

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.section {
  padding: 4.5rem 0;
  position: relative;
}

/* Original Cyber Obsidian Ambient Background */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 25%, #000 35%, transparent 80%);
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  z-index: -1;
  pointer-events: none;
}

.bg-glow-1 {
  top: -140px;
  left: -120px;
  background: var(--accent);
}

.bg-glow-2 {
  bottom: -180px;
  right: -120px;
  background: var(--amber);
  opacity: 0.12;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--btn-fg);
  background: linear-gradient(135deg, var(--accent-light), var(--amber));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1rem;
}

.brand-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--btn-fg);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }

.menu-toggle {
  display: none;
  position: relative;
  z-index: 90;
}

.hamburger-lines {
  width: 16px;
  height: 12px;
  position: relative;
  display: block;
}

.hamburger-lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.4s var(--ease-base), opacity 0.25s;
}

.hamburger-lines span:nth-child(1) { top: 0; }
.hamburger-lines span:nth-child(2) { top: 5px; }
.hamburger-lines span:nth-child(3) { top: 10px; }

.menu-toggle.is-open .hamburger-lines span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle.is-open .hamburger-lines span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .hamburger-lines span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(7, 11, 18, 0.96);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-base);
}

[data-theme="light"] .mobile-drawer {
  background: rgba(244, 247, 251, 0.96);
}

.mobile-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  padding: 0.4rem 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.35rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background 0.2s;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-sm {
  padding: 0.52rem 0.95rem;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--btn-fg);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: transform 0.6s var(--ease-base), opacity 0.6s var(--ease-base);
}

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

/* Hero */
.hero {
  padding-top: 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 2.5rem;
  align-items: center;
}

.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
  font-size: clamp(2.2rem, 4.6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(120deg, var(--text) 25%, var(--accent-light) 70%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.typing-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: var(--amber);
}

.code-prompt {
  color: var(--accent-light);
  font-weight: 700;
}

.cursor {
  animation: blink 1s step-end infinite;
}

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

.hero-lead {
  margin: 1.25rem 0 1.65rem;
  color: var(--text-muted);
  font-size: 1.04rem;
  max-width: 60ch;
}

.hero-lead strong {
  color: var(--text);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.hero-proof {
  margin: 0 0 1.45rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  font-size: 0.83rem;
  color: var(--text-muted);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  transition: border-color 0.2s, color 0.2s;
}

.social-pill svg {
  width: 15px;
  height: 15px;
  color: var(--accent-light);
}

.social-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* Hero Profile Card */
.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card-banner {
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, #064e3b, #0f172a);
  overflow: hidden;
}

.hero-card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--surface-solid), transparent);
}

.hero-card-body {
  padding: 0 1.5rem 1.5rem;
  position: relative;
}

.avatar-wrap {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  overflow: hidden;
  border: 3px solid var(--accent);
  margin-top: -46px;
  background: var(--surface-solid);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  color: var(--btn-fg);
}

.hero-card-identity {
  margin: 0.9rem 0 1rem;
}

.hero-card-identity h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.hero-card-identity p {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--accent-light);
}

.terminal-box {
  background: #060a10;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.terminal-bar span:nth-child(1) { background: #ef4444; }
.terminal-bar span:nth-child(2) { background: #f59e0b; }
.terminal-bar span:nth-child(3) { background: #10b981; }

.terminal-bar small {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #94a3b8;
}

.terminal-box pre {
  margin: 0;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.55;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.terminal-box .k { color: #38bdf8; }
.terminal-box .s { color: #34d399; }
.terminal-box .n, .terminal-box .b { color: #fbbf24; }

.hero-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  text-align: center;
}

.hero-mini-metrics > div {
  padding: 0.65rem 0.4rem;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid var(--border);
}

.hero-mini-metrics strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent-light);
}

.hero-mini-metrics span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Section Headers */
.section-head {
  margin-bottom: 2rem;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 0.45rem;
}

[dir="rtl"] .skill-subhead,
[dir="rtl"] .section-tag {
  letter-spacing: 0;
  font-family: 'Cairo', sans-serif;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

.section-desc {
  margin: 0.55rem 0 0;
  color: var(--text-muted);
  max-width: 66ch;
}

.subsection-title {
  margin: 2.5rem 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

/* Tagline Reveal Section */
.tagline-section {
  padding: 3.5rem 0;
}

.tagline-reveal-text {
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.35;
}

.tagline-word {
  display: inline-block;
  opacity: 0.28;
  transition: opacity 0.45s var(--ease-base);
}

.tagline-word.active {
  opacity: 1;
}

/* About & Quote */
.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 1.5rem;
}

.bio-card, .quote-card {
  padding: 1.85rem;
}

.bio-card h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
}

.bio-card p {
  color: var(--text-muted);
}

.bio-card strong {
  color: var(--text);
}

.info-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.info-item {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
}

.info-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.status-ok {
  color: var(--accent-light);
}

.quote-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.08), var(--surface));
}

.quote-mark {
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 0.6;
  color: var(--accent);
  opacity: 0.65;
}

.quote-card blockquote {
  margin: 1rem 0 1.5rem;
  font-size: 0.96rem;
  color: var(--text);
}

.quote-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.quote-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.quote-author span {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Services & Process */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.service-card {
  padding: 1.5rem;
  transition: transform 0.22s, border-color 0.22s;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--pill-bg);
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-card h4 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.service-card p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.process-step {
  padding: 1.5rem;
}

.step-num {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.process-step h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.process-step p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-muted);
}

/* Fun Facts */
.facts-strip {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.fact-item {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}

.fact-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  color: var(--amber);
}

.fact-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Projects */
.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-fg);
}

.search-box {
  position: relative;
  min-width: 260px;
  flex: 0 1 320px;
}

.search-box svg {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

[dir="rtl"] .search-box svg {
  left: auto;
  right: 0.85rem;
}

.search-box input {
  width: 100%;
  padding: 0.62rem 0.9rem 0.62rem 2.4rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

[dir="rtl"] .search-box input {
  padding: 0.62rem 2.4rem 0.62rem 0.9rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.project-thumb {
  position: relative;
  height: 150px;
  background: radial-gradient(circle at center, #334155 0%, #1e293b 100%);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

[data-theme="light"] .project-thumb {
  background: radial-gradient(circle at center, #e2e8f0 0%, #cbd5e1 100%);
}

.project-thumb img {
  max-height: 92px;
  max-width: 82%;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.35));
}

.project-monogram {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--btn-fg);
  background: linear-gradient(135deg, var(--accent-light), var(--amber));
}

.cat-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(7, 11, 18, 0.78);
  color: var(--accent-light);
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.cat-badge.security {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}

.nation-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.project-body {
  padding: 1.15rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.project-body h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
}

.project-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.project-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

.text-link {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-light);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.text-link:hover {
  text-decoration: underline;
}

.projects-empty {
  grid-column: 1 / -1;
  padding: 2.5rem;
  text-align: center;
}

.projects-empty p {
  color: var(--text-muted);
  margin: 0.5rem 0 1.2rem;
}

.projects-footer {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.projects-count {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Resume */
.resume-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.timeline-panel {
  padding: 1.65rem;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.25rem;
}

.panel-header h3 {
  margin: 0;
  font-family: var(--font-display);
}

.panel-icon {
  display: inline-grid;
  place-items: center;
  color: var(--accent-light);
}

.panel-icon svg {
  width: 22px;
  height: 22px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  border-inline-start: 2px solid var(--border);
  padding-inline-start: 1.2rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1.2rem - 6px);
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-light);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.timeline-period {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--amber);
  margin-bottom: 0.2rem;
  direction: ltr;
  unicode-bidi: isolate;
}

.ltr-inline {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.timeline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.timeline-head h4 {
  margin: 0;
  font-size: 1rem;
}

.timeline-org {
  margin: 0.1rem 0 0.45rem;
  font-size: 0.88rem;
  color: var(--accent-light);
  font-weight: 600;
}

.timeline-logo {
  height: 28px;
  max-width: 78px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 6px;
  border-radius: 6px;
}

.mini-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mini-tags span {
  font-size: 0.74rem;
  padding: 0.16rem 0.52rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* Skills */
.skills-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.skill-wide {
  grid-column: 1 / -1;
}

.skill-group {
  padding: 1.5rem;
}

.skill-group h4 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  color: var(--accent-light);
}

.mt-lg {
  margin-top: 1.4rem !important;
}

.skill-subhead {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 1.15rem 0 0.6rem;
}

.skill-bar-row {
  margin-bottom: 0.85rem;
}

.skill-bar-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  margin-bottom: 0.3rem;
}

.skill-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.check-list li::before {
  content: "✓";
  color: var(--accent-light);
  font-weight: 800;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-cloud span {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text);
}

.tag-cloud.compact span {
  padding: 0.34rem 0.72rem;
  font-size: 0.8rem;
}

.tag-cloud.amber span {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.skills-dual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* FAQ */
.faq-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.faq-item {
  padding: 1.25rem;
}

.faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.faq-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-light);
  transition: transform 0.25s var(--ease-base);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-panel {
  display: none;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.faq-item.open .faq-panel {
  display: block;
}

/* Blog */
.blog-stack {
  display: grid;
  gap: 1.25rem;
}

.blog-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  overflow: hidden;
}

.blog-media {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.9));
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.blog-media img {
  max-height: 180px;
  object-fit: contain;
}

.blog-body {
  padding: 1.8rem;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--accent-light);
  margin-bottom: 0.5rem;
}

.blog-body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.blog-body p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.blog-actions {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.5rem;
}

.contact-info-card,
.contact-form {
  padding: 1.75rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-row {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.c-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.contact-form h3 {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.38rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.93rem;
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-color: #f87171;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-status {
  margin: 0;
  font-size: 0.86rem;
  color: var(--accent-light);
}

.form-status.error {
  color: #f87171;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

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

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

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(3, 7, 18, 0.76);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: min(640px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 1.75rem;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.modal-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.modal-meta-item {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.05);
}

.modal-meta-item span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* WordPress Single / Page / 404 */
.wp-article-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 2.25rem;
}

.wp-article-shell h1 {
  margin: 0.4rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.2;
}

.wp-article-thumb {
  margin: 1.25rem 0 1.5rem;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.wp-article-content {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.wp-article-content h2,
.wp-article-content h3,
.wp-article-content strong {
  color: var(--text);
}

.wp-article-content a {
  color: var(--accent-light);
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: opacity 0.3s linear; }
  .tagline-word { opacity: 1 !important; transition: none; }
  .cursor { animation: none; }
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .resume-columns,
  .contact-grid,
  .blog-card,
  .faq-list,
  .process-grid {
    grid-template-columns: 1fr;
  }
  .services-grid,
  .facts-strip,
  .projects-grid,
  .skills-bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .menu-toggle { display: grid; }
  .hide-mobile, .nav-links { display: none; }
  .projects-grid,
  .skills-bento,
  .services-grid,
  .facts-strip,
  .form-row,
  .modal-meta-grid,
  .skills-dual-row {
    grid-template-columns: 1fr;
  }
  .search-box {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }
}
