/* ============================================================
   RESET
============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
a { text-decoration: none; color: inherit; }
li { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; background: none; border: none; cursor: pointer; }
input, textarea { display: block; width: 100%; font: inherit; background: none; border: none; }
address { font-style: normal; }
html { scroll-behavior: smooth; }

/* ============================================================
   TOKENS
============================================================ */
:root {
  --bg:          #0a0a0f;
  --bg-2:        #0f0f16;
  --bg-card:     #16161f;
  --bg-hover:    #1c1c28;
  --border:      hsla(250, 30%, 70%, 0.1);
  --border-h:    hsla(250, 50%, 70%, 0.25);

  --text:        #e8e8f0;
  --text-dim:    #8b8ba7;
  --text-muted:  #5a5a72;

  --green:       #3fb950;
  --cyan:        #06b6d4;
  --violet:      #7c3aed;
  --violet-l:    #a78bfa;
  --orange:      #f59e0b;

  --ff:          'Inter', sans-serif;
  --ff-mono:     'JetBrains Mono', monospace;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   16px;
  --t:           0.25s ease;
  --shadow:      0 4px 24px hsla(0,0%,0%,0.35);
  --shadow-lg:   0 8px 48px hsla(0,0%,0%,0.45);
  --glow:        0 0 32px hsla(250,70%,55%,0.2);
}

/* ============================================================
   BASE
============================================================ */
html { font-family: var(--ff); font-size: 16px; }
body { background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 700; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
  background: hsla(240, 20%, 6%, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: transform var(--t);
}
.navbar.hidden { transform: translateY(-100%); }

.nav-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.nav-initials {
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  background: var(--violet);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.nav-status {
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: none;
}
.status-online { color: var(--green); }
.nav-clock {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.05em;
  display: none;
  opacity: 0.85;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 6px;
  transition: color var(--t), background var(--t);
}
.nav-link:hover { color: var(--text); background: hsla(0,0%,100%,0.05); }

.nav-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color var(--t);
  flex-shrink: 0;
  margin-left: auto;
}
.nav-badge:hover { border-color: var(--green); }

.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2.2s ease infinite;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--t);
}

/* Mobile nav open */
.nav-links.open {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  gap: 2px;
  z-index: 99;
  margin-left: 0;
}
.nav-links.open .nav-link { padding: 10px 12px; }

/* ============================================================
   HERO
============================================================ */
.section-hero {
  display: flex;
  align-items: center;
  padding: 140px 24px 80px;
}
.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-bottom: 32px;
}
.hero-title {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.hero-line-1 { display: block; color: var(--text); }
.hero-line-2 {
  display: block;
  background: linear-gradient(90deg, var(--text-dim), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  max-width: 540px;
  margin: 0 auto 40px;
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.75;
}
.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--t);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary { background: var(--cyan); color: #000; }
.btn-primary:hover { background: #0ea5e9; transform: translateY(-1px); box-shadow: 0 4px 16px hsla(192,91%,42%,0.35); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--border-h); background: hsla(0,0%,100%,0.04); }

/* ============================================================
   HIGHLIGHTS
============================================================ */
.highlights {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.highlight-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 40px;
  flex: 1;
  min-width: 180px;
}
.highlight-divider { width: 1px; height: 44px; background: var(--border); flex-shrink: 0; }
.highlight-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 3px; }
.highlight-card p { font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--text-muted); }
.hi-icon { font-size: 22px; flex-shrink: 0; }
.hi-icon.green  { color: var(--green); }
.hi-icon.cyan   { color: var(--cyan); }
.hi-icon.violet { color: var(--violet-l); }

/* ============================================================
   SECTIONS
============================================================ */
.section { max-width: 1100px; margin: 0 auto; padding: 80px 24px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.section-title { font-size: clamp(22px, 4vw, 30px); font-weight: 800; letter-spacing: -0.01em; }
.section-tag { font-family: var(--ff-mono); font-size: 11px; color: var(--text-muted); letter-spacing: 0.06em; }

/* ============================================================
   ABOUT
============================================================ */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.about-photo { display: flex; justify-content: center; }
.about-photo img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 50%;
  border: 3px solid var(--violet-l);
  box-shadow: 0 0 0 6px rgba(124, 58, 237, 0.12), 0 16px 40px rgba(0,0,0,0.4);
  filter: grayscale(10%);
}
.about-text p { color: var(--text-dim); line-height: 1.8; margin-bottom: 16px; font-size: 15px; }
.about-links { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 24px; }
.about-link { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-dim); transition: color var(--t); }
.about-link:hover { color: var(--text); }
.about-link ion-icon { color: var(--violet-l); font-size: 16px; }

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.service-card {
  padding: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t), box-shadow var(--t);
}
.service-card:hover { border-color: var(--border-h); box-shadow: var(--shadow); }
.service-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 20px;
  margin-bottom: 14px;
}
.service-icon.violet { background: hsla(262,80%,50%,0.15); color: var(--violet-l); }
.service-icon.cyan   { background: hsla(192,91%,42%,0.15); color: var(--cyan); }
.service-icon.green  { background: hsla(137,55%,56%,0.15); color: var(--green); }
.service-card h4 { font-size: 14px; margin-bottom: 8px; }
.service-card p  { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ============================================================
   ARSENAL
============================================================ */
.arsenal-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.arsenal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--t), box-shadow var(--t);
}
.arsenal-card:hover { border-color: var(--border-h); box-shadow: var(--glow); }
.arsenal-card h3   { font-size: 17px; margin-bottom: 8px; }
.arsenal-card > p  { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }

.arsenal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.arsenal-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-size: 20px;
}
.arsenal-icon.violet { background: hsla(262,80%,50%,0.15); color: var(--violet-l); }
.arsenal-icon.cyan   { background: hsla(192,91%,42%,0.15); color: var(--cyan); }
.arsenal-icon.green  { background: hsla(137,55%,56%,0.15); color: var(--green); }
.arsenal-icon.orange { background: hsla(38,92%,50%,0.15);  color: var(--orange); }

.arsenal-badge {
  font-family: var(--ff-mono);
  font-size: 10px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}
.arsenal-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.arsenal-checklist li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.arsenal-checklist ion-icon { color: var(--green); font-size: 14px; flex-shrink: 0; }

.arsenal-levels { display: flex; flex-direction: column; gap: 10px; }
.arsenal-levels li { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--text-dim); }
.level { font-family: var(--ff-mono); font-size: 10px; padding: 2px 7px; border-radius: 4px; font-weight: 500; }
.level.pro { background: hsla(192,91%,42%,0.15); color: var(--cyan); }
.level.adv { background: hsla(262,80%,50%,0.15); color: var(--violet-l); }
.level.mid { background: hsla(38,92%,50%,0.15);  color: var(--orange); }

.arsenal-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill { padding: 4px 12px; background: hsla(0,0%,100%,0.05); border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text-dim); }

.arsenal-wide-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.arsenal-wide-head h3 { margin-bottom: 4px; }
.arsenal-wide-head p  { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin: 0; }

.arsenal-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 24px; }
.col-label { display: block; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 10px; }
.arsenal-col ul { display: flex; flex-direction: column; gap: 7px; }
.arsenal-col li { font-size: 13px; color: var(--text-dim); }

/* ============================================================
   CV / PARCOURS
============================================================ */
.cv-grid { display: grid; grid-template-columns: 1fr; gap: 48px; margin-bottom: 32px; }
.cv-col-title { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text-dim); margin-bottom: 24px; padding-bottom: 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.cv-col-title ion-icon { color: var(--violet-l); font-size: 18px; }

.timeline { display: flex; flex-direction: column; gap: 16px; }
.tl-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: start; }
.tl-date { font-family: var(--ff-mono); font-size: 11px; color: var(--text-muted); padding-top: 5px; line-height: 1.4; }
.tl-card { padding: 18px 20px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color var(--t); }
.tl-card:hover { border-color: var(--border-h); }
.tl-card h4   { font-size: 14px; margin-bottom: 4px; }
.tl-org  { font-size: 12px; color: var(--violet-l); margin-bottom: 6px; }
.tl-desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* CV docs buttons */
.cv-docs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* PDF Drawer */
.pdf-drawer { margin-top: 8px; }
.pdf-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 14px;
  width: 100%;
  transition: border-color var(--t), color var(--t);
}
.pdf-toggle:hover { border-color: var(--border-h); color: var(--text); }
.pdf-toggle ion-icon:first-child { color: var(--violet-l); font-size: 18px; }
.pdf-chevron { margin-left: auto; transition: transform var(--t); }
.pdf-drawer.open .pdf-chevron { transform: rotate(180deg); }
.pdf-frame { margin-top: 6px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.pdf-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.pdf-close { color: var(--text-dim); font-size: 18px; padding: 4px; line-height: 1; }
.pdf-dl { padding: 10px 16px; font-size: 13px; color: var(--text-dim); }
.pdf-dl a { color: var(--cyan); }

/* ============================================================
   PORTFOLIO
============================================================ */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--text-dim); transition: var(--t); }
.filter-btn:hover, .filter-btn.active { background: var(--violet); border-color: var(--violet); color: #fff; }

/* Featured */
.featured-project {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 28px;
  transition: border-color var(--t);
}
.featured-project:hover { border-color: var(--border-h); }
.featured-project.hidden { display: none; }

.feat-badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--green); margin-bottom: 14px; }
.feat-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.2s ease infinite; }
.featured-left h3 { font-size: 22px; margin-bottom: 12px; }
.featured-left > p { color: var(--text-dim); line-height: 1.7; margin-bottom: 22px; font-size: 15px; }

.feat-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.feat-item { display: flex; align-items: flex-start; gap: 14px; }
.feat-item-icon { width: 36px; height: 36px; display: grid; place-items: center; background: hsla(0,0%,100%,0.05); border-radius: 8px; font-size: 16px; flex-shrink: 0; }
.feat-item strong { display: block; font-size: 14px; margin-bottom: 2px; }
.feat-item span { font-size: 12px; color: var(--text-muted); font-family: var(--ff-mono); }

/* Terminal */
.terminal { background: #0d0d14; border: 1px solid hsla(250,30%,70%,0.15); border-radius: var(--radius); overflow: hidden; font-family: var(--ff-mono); font-size: 12.5px; }
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: #111119; border-bottom: 1px solid hsla(250,30%,70%,0.1); }
.t-dot { width: 12px; height: 12px; border-radius: 50%; }
.t-dot.red    { background: #ff5f57; }
.t-dot.yellow { background: #febc2e; }
.t-dot.tgreen { background: #28c840; }
.t-title { margin-left: 8px; font-size: 11px; color: var(--text-muted); }
.terminal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 3px; }
.terminal-body p { color: var(--text-dim); line-height: 1.6; }
.t-prompt { color: var(--cyan); margin-right: 8px; }
.t-dim  { color: #4a4a60; }
.t-host { color: #5a5a72; }
.t-ok   { color: var(--green); }
.t-success { color: var(--green); font-weight: 500; }

/* Projects grid */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.project-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: border-color var(--t), transform var(--t), box-shadow var(--t); }
.project-card:hover { border-color: var(--border-h); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.project-card.hidden { display: none; }
.project-card-img { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-2); }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-card-img img { transform: scale(1.04); }
.project-card-body { padding: 18px 20px; }
.project-tag { display: inline-block; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--violet-l); margin-bottom: 8px; }
.project-card-body h3 { font-size: 15px; margin-bottom: 6px; }
.project-card-body p  { font-size: 13px; color: var(--text-dim); line-height: 1.5; }

/* ============================================================
   VEILLE
============================================================ */
.veille-intro { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 40px; }
.veille-intro h3 { font-size: 18px; margin-bottom: 10px; }
.veille-intro p  { color: var(--text-dim); font-style: italic; font-size: 14px; }

.veille-text { margin-bottom: 40px; }
.veille-text h4 { font-size: 15px; margin-bottom: 10px; }
.veille-text p  { color: var(--text-dim); line-height: 1.8; font-size: 14px; }

.veille-timeline { display: flex; flex-direction: column; gap: 12px; margin-bottom: 40px; }
.vt-item { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: start; }
.vt-year { font-family: var(--ff-mono); font-size: 12px; color: var(--cyan); font-weight: 500; padding-top: 5px; }
.vt-card { padding: 16px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.vt-card h4 { font-size: 13px; margin-bottom: 4px; }
.vt-card p  { font-size: 12px; color: var(--text-dim); line-height: 1.6; }

.veille-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.vp-card { padding: 22px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.vp-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; font-size: 18px; margin-bottom: 12px; }
.vp-icon.violet { background: hsla(262,80%,50%,0.15); color: var(--violet-l); }
.vp-icon.cyan   { background: hsla(192,91%,42%,0.15); color: var(--cyan); }
.vp-icon.green  { background: hsla(137,55%,56%,0.15); color: var(--green); }
.vp-icon.orange { background: hsla(38,92%,50%,0.15);  color: var(--orange); }
.vp-card h4 { font-size: 13px; margin-bottom: 6px; }
.vp-card p  { font-size: 12px; color: var(--text-dim); line-height: 1.55; }

/* ============================================================
   CONTACT
============================================================ */
.contact-cta { text-align: center; padding: 56px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-card); margin-bottom: 48px; }
.contact-cta h2 { font-size: clamp(20px, 4vw, 26px); margin-bottom: 12px; }
.contact-cta p  { color: var(--text-dim); margin-bottom: 28px; font-size: 15px; }
.contact-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.contact-form { max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field label { font-size: 13px; font-weight: 500; color: var(--text-dim); }
.form-field input,
.form-field textarea { padding: 11px 15px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font-size: 14px; transition: border-color var(--t); }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--violet); outline: none; }
.form-submit { align-self: flex-start; }
.form-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.contact-success { text-align: center; padding: 24px; color: var(--green); font-size: 15px; }
.hidden { display: none !important; }

/* ============================================================
   FOOTER
============================================================ */
.footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-initials { display: grid; place-items: center; width: 30px; height: 30px; background: var(--violet); border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.footer p { font-size: 13px; color: var(--text-muted); flex: 1; }
.footer-links { display: flex; gap: 14px; }
.footer-links a { font-size: 17px; color: var(--text-muted); transition: color var(--t); }
.footer-links a:hover { color: var(--text); }

/* ============================================================
   MODAL
============================================================ */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; opacity: 0; transition: opacity 0.3s ease; }
.modal.open { pointer-events: all; opacity: 1; }
.modal-backdrop { position: absolute; inset: 0; background: hsla(0,0%,0%,0.72); backdrop-filter: blur(4px); }
.modal-box {
  position: relative;
  width: 100%; max-width: 720px;
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  transform: translateY(40px);
  transition: transform 0.35s ease;
  z-index: 1;
}
.modal.open .modal-box { transform: translateY(0); }
.modal-close-btn { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; display: grid; place-items: center; background: hsla(0,0%,100%,0.08); border-radius: 50%; font-size: 18px; color: var(--text-dim); z-index: 2; transition: background var(--t), color var(--t); }
.modal-close-btn:hover { background: hsla(0,0%,100%,0.15); color: var(--text); }
.modal-scroll { padding: 28px 32px; overflow-y: auto; max-height: 90vh; }
.modal-head { margin-bottom: 14px; }
.modal-head h2 { font-size: 20px; margin-bottom: 8px; }
.pd-badge { display: inline-block; font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.06em; color: var(--violet-l); padding: 3px 10px; border: 1px solid hsla(262,80%,60%,0.3); border-radius: 4px; }
.modal-meta { display: flex; gap: 16px; margin-bottom: 22px; }
.modal-meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.modal-meta-item ion-icon { color: var(--violet-l); }
.modal-section { margin-bottom: 20px; }
.modal-section h4 { font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.modal-section p  { font-size: 14px; color: var(--text-dim); line-height: 1.7; }
.modal-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-skills .skill-tag { padding: 4px 12px; background: hsla(262,80%,50%,0.1); border: 1px solid hsla(262,80%,60%,0.2); border-radius: 999px; font-size: 12px; color: var(--violet-l); }
.modal-gantt { margin-bottom: 22px; }
.modal-gantt img { width: 100%; border-radius: var(--radius-sm); }
.modal-link { margin-top: 4px; }

/* ============================================================
   BOOT SCREEN
============================================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease;
}
.boot-screen.fade-out { opacity: 0; pointer-events: none; }

.boot-inner {
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 300px;
}
.boot-line { opacity: 0; transition: opacity 0.25s ease; }
.boot-line.visible { opacity: 1; }
.boot-user   { color: var(--text); }
.boot-status { color: var(--text-dim); }
.boot-status .status-online { color: var(--green); }

.boot-bar {
  margin-top: 12px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.boot-progress {
  height: 100%;
  width: 0%;
  background: var(--cyan);
  border-radius: 2px;
  transition: width 2.2s ease;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   RESPONSIVE
============================================================ */
@media (min-width: 580px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .nav-status { display: block; }
  .nav-clock  { display: block; }
  .nav-badge  { display: flex; }
  .nav-toggle { display: none; }
  .nav-links  { display: flex; margin-left: auto; }

  .about-grid {
    grid-template-columns: 180px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
  }
  .about-photo  { grid-column: 1; grid-row: 1 / 3; justify-content: flex-start; padding-top: 4px; }
  .about-text   { grid-column: 2; grid-row: 1; }
  .services-grid { grid-column: 2; grid-row: 2; margin-top: 32px; }
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .cv-grid      { grid-template-columns: 1fr 1fr; }
  .arsenal-grid { grid-template-columns: 1fr 1fr; }
  .arsenal-card.wide { grid-column: 1 / -1; }

  .featured-project { grid-template-columns: 1fr 1fr; }

  .modal-box { border-radius: var(--radius-lg); }
  .modal { align-items: center; }
}

@media (min-width: 1024px) {
  .arsenal-grid { grid-template-columns: 2fr 1fr 1fr; }
  .arsenal-card.large { grid-row: 1; }
  .arsenal-card.wide  { grid-column: 1 / -1; }
}

