/* ═══════════════════════════════════════════════════════════════
   MOHAMMED GHANNAM — FPI APPLICATION SITE
   Design System: Strict Monochrome · Corporate · Director-Level
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Tokens: Premium Monochrome Contrast System ──
   Rule: Each step must be VISIBLY distinct from adjacent steps.
   Inspired by: Apple dark mode, Monocle editorial, WSJ dark mode.
   Background → Surface → Border → Muted → Secondary → Primary text
   #141414  →  #1E1E1E  →  #333  →  #888  →  #B0B0B0  →  #ECECEC
   ─────────────────────────────────────────────────────────────── */
:root {
  --bg:            #141414;
  --bg-alt:        #0F0F0F;
  --surface:       #1E1E1E;
  --surface-hover: #282828;
  --border:        #333333;
  --border-hover:  #555555;
  --text:          #ECECEC;
  --text-secondary:#C0C0C0;
  --text-muted:    #999999;
  --text-dim:      #555555;
  --green:         #16A34A;
  --max-w:         1140px;
  --section-pad:   100px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ── */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #AAAAAA;
  letter-spacing: 2px;
  text-transform: uppercase;
}

h1 { font-weight: 900; line-height: 0.9; }
h2 { font-weight: 900; font-size: 32px; line-height: 1.1; }
h3 { font-weight: 600; font-size: 18px; }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

section {
  padding: var(--section-pad) 0;
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   HEADER — Fixed, Minimal
   ═══════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.5px;
}

.header-nav {
  display: flex;
  gap: 0;
}

.header-nav a {
  color: #AAAAAA;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 20px 16px;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  border-bottom: 2px solid transparent;
}

.header-nav a:hover {
  color: var(--text);
}

.header-nav a.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.header-downloads {
  display: flex;
  gap: 12px;
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.btn-download {
  font-size: 11px;
  font-weight: 600;
  color: #BBBBBB;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid #555555;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.btn-download:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ═══════════════════════════════════════
   HERO
   ═══════════════════════════════════════ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 64px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero-tag {
  margin-bottom: 32px;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 80px);
  color: var(--text);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 300;
  color: #CCCCCC;
  margin-bottom: 8px;
  line-height: 1.5;
}

.hero-target {
  font-size: 13px;
  font-weight: 500;
  color: #AAAAAA;
  margin-bottom: 64px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 48px;
  max-width: 800px;
}

.metric {
  padding-right: 40px;
}

.metric:not(:last-child) {
  border-right: 1px solid var(--border);
  margin-right: 40px;
}

.metric-value {
  font-size: 36px;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 12px;
  color: #AAAAAA;
  line-height: 1.4;
}

/* ── Hero Chat Bar (ChatGPT-Style) ── */
.hero-chat-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 800px;
  margin-top: 56px;
  padding: 16px 20px;
  background: #1E1E1E;
  border: 1px solid #444444;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-chat-bar:hover {
  border-color: #777777;
  background: #242424;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.04);
}

.hero-chat-icon {
  flex-shrink: 0;
  color: #888888;
  display: flex;
  align-items: center;
}

.hero-chat-input {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 24px;
  overflow: hidden;
}

.typewriter-text {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #BBBBBB;
  white-space: nowrap;
}

.typewriter-cursor {
  font-size: 16px;
  font-weight: 300;
  color: #999999;
  animation: cursorBlink 1s step-end infinite;
  margin-left: 1px;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-chat-send {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-chat-send:hover {
  background: #FFFFFF;
  transform: scale(1.05);
}

/* ═══════════════════════════════════════
   QUALIFICATION FIT
   ═══════════════════════════════════════ */
.qual-row {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  align-items: start;
}

.qual-row:last-child { border-bottom: none; }

.qual-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-dim);
  padding-top: 2px;
}

.qual-need {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.qual-has {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}

.qual-has .check {
  color: var(--green);
  margin-right: 8px;
  font-weight: 700;
}

/* ═══════════════════════════════════════
   CAREER TIMELINE
   ═══════════════════════════════════════ */
.role {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.role:last-child { border-bottom: none; }

.role-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.role-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.role-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  flex-shrink: 0;
}

.role-company {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.role-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 720px;
}

.role-desc strong {
  color: var(--text);
  font-weight: 600;
}

.education-bar {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.edu-item {
  font-size: 13px;
  color: var(--text-secondary);
}

.edu-item strong {
  color: var(--text);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   CAPABILITY CARDS
   ═══════════════════════════════════════ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 48px;
}

.cap-card {
  background: var(--bg);
  padding: 40px 32px;
  transition: background 0.2s;
}

.cap-card:hover {
  background: var(--surface);
}

.cap-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  color: var(--text-dim);
  margin-bottom: 16px;
  font-weight: 400;
}

.cap-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.cap-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.cap-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.cap-desc strong {
  color: var(--text);
  font-weight: 600;
}

/* ═══════════════════════════════════════
   SPEC SALES — Split layout
   ═══════════════════════════════════════ */
.spec-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
}

.spec-context {
  border-left: 3px solid var(--text);
  padding-left: 24px;
}

.spec-context-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.spec-context-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.spec-evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.spec-card {
  background: var(--bg);
  padding: 24px;
}

.spec-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.spec-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.spec-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.spec-footer {
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: normal;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════
   90-DAY PLAN
   ═══════════════════════════════════════ */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-top: 48px;
}

.plan-phase {
  background: var(--bg);
  padding: 32px 28px;
}

.plan-phase:last-child {
  background: var(--surface);
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.plan-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.3;
}

.plan-items {
  list-style: none;
}

.plan-items li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.plan-items li:last-child { border-bottom: none; }

.plan-items li::before {
  content: '→';
  color: var(--text-muted);
  margin-right: 8px;
}

/* ═══════════════════════════════════════
   CONTACT
   ═══════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 48px;
}

.contact-info p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.contact-info a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: border-color 0.2s;
}

.contact-info a:hover {
  border-color: var(--text);
}

.contact-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.download-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  letter-spacing: 0.3px;
}

.btn-dl:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--surface);
}

.btn-dl-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ═══════════════════════════════════════
   CONVERSATION DRAWER — Right-Side Panel
   ═══════════════════════════════════════ */

/* ── Overlay ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ── Drawer Panel ── */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  z-index: 301;
  background: #181818;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer.open {
  transform: translateX(0);
}

/* ── Drawer Header ── */
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.3px;
}

.drawer-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #AAAAAA;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 4px;
}

.drawer-close {
  background: none;
  border: 1px solid #555555;
  color: #AAAAAA;
  width: 36px;
  height: 36px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.drawer-close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ── Drawer Body (Chat History) ── */
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-body::-webkit-scrollbar {
  width: 3px;
}

.drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

.drawer-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ── Empty state ── */
.drawer-body:empty::after {
  content: 'Ask me about my experience, qualifications, or how I can add value to your company.';
  font-size: 14px;
  color: #999999;
  line-height: 1.8;
  margin-top: 40px;
  text-align: center;
  padding: 0 20px;
}

/* ── Chat Messages ── */
.chat-exchange {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  padding-left: 14px;
  border-left: 2px solid var(--text-muted);
  line-height: 1.5;
}

.chat-msg-agent {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.chat-exchange:last-child .chat-msg-agent {
  border-bottom: none;
  padding-bottom: 0;
}

/* ── Drawer Input ── */
.drawer-input {
  flex-shrink: 0;
  padding: 20px 32px 28px;
  border-top: 1px solid var(--border);
  background: #131313;
}

.drawer-input-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: #999999;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.drawer-input-label.thinking {
  color: #CCCCCC;
}

.thinking-dots span {
  animation: thinkingDot 1.4s ease-in-out infinite;
}
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkingDot {
  0%, 70%, 100% { opacity: 0.2; }
  30% { opacity: 1; }
}

.drawer-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.drawer-input-field {
  flex: 1;
  background: #262626;
  border: 1px solid #555555;
  border-radius: 0;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 14px 18px;
  outline: none;
  transition: border-color 0.2s;
}

.drawer-input-field::placeholder {
  color: #999999;
}

.drawer-input-field:focus {
  border-color: var(--text-muted);
}

.drawer-send {
  background: var(--text);
  color: var(--bg);
  border: none;
  width: 48px;
  height: 48px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
  flex-shrink: 0;
  font-weight: 700;
}

.drawer-send:hover { opacity: 0.8; }
.drawer-send:disabled { opacity: 0.3; cursor: not-allowed; }

.drawer-send.loading {
  animation: sendPulse 1.5s ease-in-out infinite;
}

@keyframes sendPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ── Loading dots in chat ── */
.chat-loading {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 8px 0;
}

.chat-loading span {
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: pulse 1.2s ease-in-out infinite;
}

.chat-loading span:nth-child(2) { animation-delay: 0.15s; }
.chat-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* (Chat trigger moved to hero section — old fixed bar removed) */


/* ═══════════════════════════════════════
   SECTION DIVIDER
   ═══════════════════════════════════════ */
.section-divider {
  padding: 80px 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.divider-num {
  font-size: 80px;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1;
  margin-bottom: 8px;
}

.divider-title {
  font-size: 28px;
  font-weight: 900;
}

.divider-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */
.site-footer {
  padding: 32px 0;
  text-align: center;
}

.site-footer p {
  font-size: 11px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 900px) {
  .container { padding: 0 24px; }
  .chat-inner { padding: 0 24px; }
  .header-inner { padding: 0 24px; }

  .hero-metrics { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .metric:not(:last-child) { border-right: none; margin-right: 0; padding-right: 0; }

  .cap-grid { grid-template-columns: 1fr; }
  .spec-layout { grid-template-columns: 1fr; gap: 40px; }
  .spec-evidence { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }

  .header-nav { display: none; }
  .header-downloads { display: none; }

  section { padding: 64px 0; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 40px; }
  .hero-metrics { grid-template-columns: 1fr; gap: 24px; }
  .metric:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 24px; margin-right: 0; }
  .role-header { flex-direction: column; gap: 4px; }
}
