/* ─────────────────────────────────────────────────────────────
   FONT — Ubuntu Mono (auto-hébergée)
───────────────────────────────────────────────────────────── */
@font-face {
  font-family: 'Ubuntu Mono';
  src: url('./fonts/KFOjCneDtsqEr0keqCMhbBc9.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Ubuntu Mono';
  src: url('./fonts/KFOhCneDtsqEr0keqCMhIxc8Gc8.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Ubuntu Mono';
  src: url('./fonts/KFOlCneDtsqEr0keqCMhbCc8CsEYkg.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ─────────────────────────────────────────────────────────────
   VARIABLES & RESET
───────────────────────────────────────────────────────────── */
:root {
  --bg:          #090B0F;
  --surface:     #0F1117;
  --card:        #141820;
  --card-hover:  #1A2130;
  --accent:      #00E87A;
  --accent-dim:  #00A855;
  --accent-glow: rgba(0, 232, 122, 0.15);
  --blue:        #38BDF8;
  --purple:      #A78BFA;
  --text:        #E2E8F0;
  --muted:       #64748B;
  --border:      #1E2433;
  --border-h:    #2A3347;
  --radius:      8px;
  --radius-lg:   12px;
  --nav-h:       64px;
  --max-w:       1200px;
  --font:        'Ubuntu Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

button, input, select, textarea {
  font-family: var(--font) !important;
  cursor: pointer;
  border: none;
  background: none;
}

/* ─────────────────────────────────────────────────────────────
   SCROLLBAR
───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

/* ─────────────────────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: var(--nav-h);
  background: rgba(9, 11, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--border-h);
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.logo-cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
}

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

.nav-links a {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: color 0.2s;
  white-space: nowrap;
}

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

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid var(--border-h);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 0.8rem;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-label { font-weight: 700; color: var(--accent); }
.lang-sep    { color: var(--border-h); font-size: 0.75em; }
.lang-alt    { font-weight: 400; color: var(--muted); }

/* Hamburger (mobile) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  cursor: pointer;
  z-index: 101;
}

.nav-hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 4rem) 2rem 5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-prompt {
  font-size: 0.9rem;
  color: var(--accent-dim);
  letter-spacing: 0.05em;
}

.hero-name {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--accent);
  font-weight: 500;
}

.hero-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 480px;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: #00ff88;
  border-color: #00ff88;
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-h);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────
   TERMINAL WIDGET
───────────────────────────────────────────────────────────── */
.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots.small { gap: 5px; }

.dot {
  width: 12px; height: 12px;
  border-radius: 50%;
}

.terminal-dots.small .dot {
  width: 10px; height: 10px;
}

.dot-red    { background: #FF5F57; }
.dot-yellow { background: #FEBC2E; }
.dot-green  { background: #28C840; }

.terminal-title {
  font-size: 0.8rem;
  color: var(--muted);
  flex: 1;
  text-align: center;
}

.terminal-body {
  padding: 1.5rem;
  font-size: 0.82rem;
  line-height: 1.9;
  min-height: 260px;
  color: var(--text);
}

.t-command  { color: var(--accent); }
.t-output   { color: var(--text); }
.t-comment  { color: var(--muted); font-style: italic; }
.t-tag      { color: var(--accent); }
.t-value    { color: var(--blue); }
.t-cursor   { display: inline-block; width: 8px; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1s step-end infinite; }

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

/* ─────────────────────────────────────────────────────────────
   SECTIONS
───────────────────────────────────────────────────────────── */
.section {
  border-top: 1px solid var(--border);
  padding: 5rem 2rem;
}

.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: block;
  font-size: 0.8rem;
  color: var(--accent-dim);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

.about-desc {
  font-size: 0.92rem;
  line-height: 2;
  color: var(--muted);
  margin-bottom: 2rem;
}

.about-desc strong {
  color: var(--text);
  font-weight: 500;
}

.about-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}

.badge-accent {
  background: rgba(0, 232, 122, 0.12);
  color: var(--accent);
  border: 1px solid rgba(0, 232, 122, 0.3);
}

.badge-muted {
  background: var(--card);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Profile card */
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.profile-title {
  font-size: 0.8rem;
  color: var(--accent-dim);
}

.profile-body {
  padding: 1.25rem 1.5rem;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  gap: 1rem;
}

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

.profile-key {
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.profile-key::before { content: '"'; }
.profile-key::after  { content: '":'; }

.profile-val {
  color: var(--blue);
  text-align: right;
}

.profile-val::before { content: '"'; }
.profile-val::after  { content: '"'; }

/* ─────────────────────────────────────────────────────────────
   SKILLS
───────────────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.skill-col {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.skill-col:hover {
  border-color: var(--border-h);
  transform: translateY(-3px);
}

.skill-col-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
}

.skill-col-name::before {
  content: '▸ ';
  color: var(--accent-dim);
}

.skill-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.skill-item {
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
}

.skill-item::before {
  content: '[+]';
  color: var(--accent-dim);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.skill-col:hover .skill-item {
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────────
   PROJECTS
───────────────────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.project-accent-bar {
  height: 3px;
  width: 100%;
}

.project-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.project-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.project-github {
  font-size: 0.72rem;
  color: var(--muted);
}

.project-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.8;
  flex: 1;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.project-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
}

.project-branches {
  display: flex;
  gap: 0.5rem;
}

.project-branch {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  border: 1px solid;
  font-weight: 500;
}

.project-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.project-link {
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* ─────────────────────────────────────────────────────────────
   CONTACT
───────────────────────────────────────────────────────────── */
.contact-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

.contact-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.9;
}

.email-btn {
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 560px;
}

.social-card {
  flex: 1;
  min-width: 220px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.social-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  flex-shrink: 0;
}

.social-icon-blue {
  color: var(--blue);
}

.social-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.social-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.social-handle {
  font-size: 0.72rem;
  color: var(--muted);
}

.social-arrow {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s, transform 0.2s;
}

.social-card:hover .social-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-w);
  margin: 0 auto;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — TABLET (≤1024px)
───────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 3rem;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 3rem);
  }

  .terminal {
    max-width: 600px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE (≤640px)
───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  .navbar { padding: 0 1.25rem; }

  .nav-hamburger { display: flex; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.5rem;
    gap: 1.25rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a { font-size: 0.95rem; }

  .lang-toggle { align-self: flex-start; }

  .hero {
    padding: calc(var(--nav-h) + 2rem) 1.25rem 3rem;
    gap: 2.5rem;
  }

  .hero-ctas { flex-direction: column; }
  .btn { justify-content: center; text-align: center; }

  .section { padding: 3.5rem 1.25rem; }

  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }

  .social-links { flex-direction: column; }
  .social-card { min-width: unset; }

  .footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1.25rem;
  }

  .terminal-title { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   UTILITIES
───────────────────────────────────────────────────────────── */
::selection {
  background: rgba(0, 232, 122, 0.25);
  color: var(--text);
}
