/* ═══════════════════════════════════════════════
   Vincent Guilhermond — Portfolio
   style.css
   ═══════════════════════════════════════════════ */

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

  :root {
    --bg: #0C0C0C;
    --fg: #E8E6E0;
    --fg-muted: #B8B4AE;
    --fg-subtle: #8A8681;
    --accent-design: #E8622A;
    --accent-eng: #7C9CF5;
    --border: rgba(255,255,255,0.07);
    --card: #161614;
    --font: 'Geist Mono', 'Menlo', 'Courier New', monospace;
    --col-width: 620px;
  }

  :root.light {
    --bg: #F5F4F1;
    --fg: #141210;
    --fg-muted: #5A5650;
    --fg-subtle: #968E86;
    --border: rgba(0,0,0,0.09);
    --card: #FAFAF8;
  }

  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* ─── CANVAS SPHERE ─── */
  #sphere-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    transition: opacity 0.4s;
  }
  :root.light #sphere-canvas { opacity: 0.55; }

  /* ─── RIPPLE CANVAS ─── */
  #ripple-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
  }

  /* ─── GRAIN OVERLAY ─── */
  body::before {
    content: '';
    position: fixed; inset: 0;
    z-index: 0 !important;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 180px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    transition: opacity 0.4s;
  }
  :root.light body::before { opacity: 0.22; }

  /* ─── LAYOUT ─── */
  .container {
    position: relative; isolation: isolate;
    max-width: var(--col-width);
    margin: 0 auto;
    padding: 80px 0 120px;
  }

  /* ─── HEADER ─── */
  .header {
    margin-bottom: 64px;
    opacity: 0;
    animation: fadeIn 0.6s 0.1s forwards;
  }
  .header-top {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .sphere-mini {
    width: 72px; height: 72px;
    flex-shrink: 0;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1);
    cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><circle cx='6' cy='6' r='6' fill='%23E8622A'/></svg>") 6 6, pointer !important;
  }
  .sphere-mini:hover {
    transform: scale(1.08);
  }
  .header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .name {
    font-size: 22px;
    font-weight: 400;
    color: var(--fg);
    letter-spacing: -0.03em;
    line-height: 2;
  }
  .tagline {
    font-size: 13px;
    color: var(--fg-subtle);
    font-weight: 300;
    line-height: 1.5;
  }
  .tagline .d { color: var(--accent-design); text-decoration: underline; text-underline-offset: 3px; }
  .tagline .e { color: var(--fg-muted); }

  /* ─── SECTION HEADER ─── */
  .section-label {
    font-size: 11px;
    font-weight: 400;
    color: var(--fg);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
    margin-top: 56px;
    scroll-margin-top: 80px;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
  }

  /* ─── PROJECT ITEM ─── */
  .project-list { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 100%; }


  .project-item {
    background: var(--card);
    border: 1px solid rgba(0,0,0,0.08);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.12s ease-out, box-shadow 0.2s;
    transform-style: preserve-3d;
    will-change: transform;
  }
  .project-list { perspective: 800px; isolation: isolate; }
  .project-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      600px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, 0.06) 0%,
      transparent 60%
    );
    opacity: 0;
    transition: opacity .35s, background .35s;
    pointer-events: none;
    z-index: 0;
  }
  :root.light .project-item::before {
    background: radial-gradient(
      400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(232, 98, 42, 0.12) 0%,
      rgba(232, 98, 42, 0.04) 45%,
      transparent 70%
    );
    mix-blend-mode: normal;
  }
  .project-item:hover::before { opacity: 1; }
  .project-item:hover { border-color: rgba(255,255,255,0.18); transition: border-color .2s, transform .12s ease-out, box-shadow .2s; }
  :root.light .project-item:hover {
    border-color: rgba(0,0,0,0.22);
    background: #FFFFFF;
    box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  }
  .project-item:has(.project-explore:hover) {
    border-color: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 0 24px rgba(255, 255, 255, 0.1), inset 0 0 32px rgba(255, 255, 255, 0.04) !important;
  }
  :root.light .project-item:has(.project-explore:hover) {
    border-color: #E8622A !important;
    box-shadow: 0 0 24px rgba(232,98,42,0.1), inset 0 0 32px rgba(232,98,42,0.03) !important;
  }
  .project-item:has(.project-explore:hover)::before {
    background: radial-gradient(
      600px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255, 255, 255, 0.08) 0%,
      transparent 60%
    );
    opacity: 1;
  }
  :root.light .project-item:has(.project-explore:hover)::before {
    background: radial-gradient(
      400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(232, 98, 42, 0.14) 0%,
      rgba(232, 98, 42, 0.05) 45%,
      transparent 70%
    );
    mix-blend-mode: normal;
  }
  .project-row, .project-preview { position: relative; z-index: 1; }

  .project-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
  }

  .project-left {}
  .project-title {
    font-size: 13px;
    font-weight: 400;
    color: var(--fg);
    letter-spacing: -0.01em;
    margin-bottom: 3px;
    transition: color 0.15s;
  }
  .project-item:hover .project-title { color: #fff; }
  :root.light .project-item:hover .project-title { color: #000; }
  .project-sub {
    font-size: 11px;
    color: var(--fg-muted);
    font-weight: 300;
    line-height: 1.5;
  }
  /* Long descriptions only visible in expanded state */
  .project-sub--collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 11px;
    color: var(--fg-muted);
    font-weight: 300;
    line-height: 1.5;
    overflow: hidden;
  }
  .project-sub--collapse span { overflow: hidden; display: block; padding-bottom: 2px; }
  .project-item:hover .project-sub--collapse { grid-template-rows: 1fr; }

  .project-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    flex-shrink: 0;
  }
  .project-tag {
    font-size: 10px;
    color: var(--fg-muted);
    font-weight: 400;
    white-space: nowrap;
    transition: color .2s;
    letter-spacing: .02em;
  }
  .project-year { font-size: 10px; color: var(--fg-muted); letter-spacing: .02em; }

  /* Expand preview */
  .project-preview {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.55s cubic-bezier(0.25, 1, 0.3, 1);
  }
  .project-item:hover .project-preview { grid-template-rows: 1fr; }
  .project-preview-inner { overflow: hidden; }
  .project-preview-content {
    padding: 0 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.4s ease 0.1s, transform 0.45s cubic-bezier(0.25, 1, 0.3, 1) 0.08s;
  }
  .project-item:hover .project-preview-content {
    opacity: 1;
    transform: translateY(0);
  }

  .project-thumb {
    width: 100%;
    aspect-ratio: 16/7;
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  :root.light .project-thumb { border-color: rgba(0,0,0,0.06); }
  .project-thumb svg { opacity: 0.2; }
  :root.light .project-thumb svg { opacity: 0.18; }
  .project-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .project-thumb img ~ .project-thumb-label { display: none; }
  .project-thumb-label {
    position: absolute;
    font-size: 10px;
    color: rgba(255,255,255,0.18);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    bottom: 10px; left: 12px;
  }
  :root.light .project-thumb-label { color: rgba(0,0,0,0.22); }

  .project-item:nth-child(1) .project-thumb { background: #17171A; }
  .project-item:nth-child(2) .project-thumb { background: #141718; }
  .project-item:nth-child(3) .project-thumb { background: #181714; }
  .project-item:nth-child(4) .project-thumb { background: #141817; }
  .project-item:nth-child(5) .project-thumb { background: #181416; }
  .project-item:nth-child(6) .project-thumb { background: #161818; }
  :root.light .project-item:nth-child(1) .project-thumb { background: #EEECEA; }
  :root.light .project-item:nth-child(2) .project-thumb { background: #ECEAE8; }
  :root.light .project-item:nth-child(3) .project-thumb { background: #EFECEA; }
  :root.light .project-item:nth-child(4) .project-thumb { background: #EAECEA; }
  :root.light .project-item:nth-child(5) .project-thumb { background: #EDEAE8; }
  :root.light .project-item:nth-child(6) .project-thumb { background: #EBEAE8; }

  .project-preview-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .project-pills { display: flex; flex-wrap: wrap; gap: 5px; }
  .meta-pill {
    font-size: 10px;
    color: var(--fg-subtle);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 2px 7px;
    letter-spacing: 0.05em;
    transition: color .2s, border-color .2s;
  }
  :root.light .meta-pill { border-color: rgba(0,0,0,0.10); }
  .project-item:hover .meta-pill,
  .project-item:focus-within .meta-pill {
    color: #fff !important;
    border-color: rgba(255,255,255,.28) !important;
  }
  :root.light .project-item:hover .meta-pill,
  :root.light .project-item:focus-within .meta-pill {
    color: #111214 !important;
    border-color: rgba(0,0,0,.32) !important;
  }
  .project-item:hover .project-tag { color: rgba(255,255,255,.6) !important; }
  :root.light .project-item:hover .project-tag { color: rgba(0,0,0,.6) !important; }
  .project-explore {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: var(--fg);
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,.25);
    padding-bottom: 1px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    flex-shrink: 0;
  }
  :root.light .project-explore { color: var(--fg); border-bottom-color: rgba(0,0,0,.15); }
  .project-explore:hover { color: var(--fg); border-color: var(--accent-design); }
  :root.light .project-explore:hover { color: var(--fg); border-color: var(--accent-design); }


  /* ─── SIDE TAG ─── */
  .side-tag {
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fg);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 2px 7px;
    border-radius: 2px;
    flex-shrink: 0;
  }
  :root.light .side-tag {
    color: var(--fg-muted);
    border-color: rgba(0,0,0,0.18);
  }

  /* ─── SKILLS ─── */
  .skills-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .skill-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    opacity: 0;
    animation: fadeIn 0.5s forwards;
  }
  .skill-row:first-child { border-top: 1px solid var(--border); }
  .skill-name { font-size: 13px; color: var(--fg); font-weight: 300; }
  .skill-type { font-size: 11px; color: var(--fg-subtle); }

  /* ─── ABOUT ─── */
  .about-block {
    opacity: 0;
    animation: fadeIn 0.5s forwards;
    border: 1px solid var(--border);
    background: var(--card);
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
  }
  :root.light .about-block { background: var(--card); }
  .about-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255,255,255,0.07) 0%,
      rgba(255,255,255,0.02) 40%,
      transparent 70%
    );
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    z-index: 0;
  }
  :root.light .about-block::before {
    background: radial-gradient(
      400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(0,0,0,0.04) 0%,
      rgba(0,0,0,0.01) 40%,
      transparent 70%
    );
  }
  .about-block:hover::before { opacity: 1; }
  .about-block > * { position: relative; z-index: 1; }
  .about-block p {
    font-size: 13px;
    color: var(--fg-muted);
    font-weight: 300;
    line-height: 1.75;
    margin-bottom: 14px;
  }
  .about-block p strong { color: var(--fg); font-weight: 400; }

  .inline-logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
    cursor: default;
  }
  .inline-logo {
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    width: 20px;
    height: 20px;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    will-change: transform;
  }
  .inline-logo-wrap:hover .inline-logo {
    transform: scale(1.5) translateY(-3px) rotate(-14deg) rotateX(10deg);
    box-shadow:
      4px 8px 16px rgba(0,0,0,0.3),
      1px 2px 4px rgba(0,0,0,0.15);
  }
  .inline-logo svg {
    width: 20px;
    height: 20px;
    border-radius: 50%;
  }
  .about-block p a {
    color: var(--accent-design);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(232,98,42,0.35);
    transition: text-decoration-color 0.15s;
  }
  .about-block p a:hover { text-decoration-color: var(--accent-design); }


  /* ─── SIGNATURE ─── */
  .signature-wrap {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
  }
  .signature {
    font-family: 'Caveat', 'Dancing Script', cursive;
    font-size: 28px;
    font-weight: 600;
    color: var(--fg);
    letter-spacing: 0.02em;
    opacity: 0.75;
    white-space: nowrap;
  }
  :root.light .signature { opacity: 0.6; }

  /* ─── METRICS ─── */
  /* ─── CLIENTS ─── */
  .clients-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin: 28px 0;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
  }
  .client-logo {
    background: var(--bg);
    padding: 18px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B6762;
  }
  :root.light .client-logo { color: #7A7470; background: var(--card); }
  .client-logo svg {
    width: 100%;
    max-width: 110px;
    height: 36px;
  }


  /* ─── STATUS ─── */
  .status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fg-muted);
    margin-top: 24px;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
  }
  .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #4ade80;
    flex-shrink: 0;
    animation: pulse 2.4s ease infinite;
  }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
    50% { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
  }

  /* ─── SITE FOOTER ─── */
  .site-footer {
    margin-top: 80px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    opacity: 0;
    animation: fadeIn 0.5s 1s forwards;
  }

  .site-footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
  }

  .site-footer-left {
    display: flex;
    flex-direction: column;
    gap: 0px;
  }

  .site-footer-name {
    font-size: 12px;
    color: var(--fg);
    letter-spacing: 0.02em;
  }

  .site-footer-role {
    font-size: 11px;
    color: var(--fg-subtle);
    letter-spacing: 0.02em;
  }

  .site-footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
  }

  .site-footer-right a {
    font-size: 11px;
    color: var(--fg-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color .15s, border-color .15s;
    letter-spacing: 0.03em;
  }
  .site-footer-right a:hover { color: var(--fg); border-color: var(--accent-design); }

  .site-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    gap: 12px;
  }

  .site-footer-bottom span {
    font-size: 10px;
    color: var(--fg-subtle);
    letter-spacing: 0.06em;
  }

  .site-footer-stack {
    letter-spacing: 0.04em !important;
  }

  /* ─── ANIMATIONS ─── */
  @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

  /* Stagger animations */
  .header { animation-delay: 0.05s; }
  .section-label:nth-of-type(1) { animation-delay: 0.15s; }
  .project-item:nth-child(1) { animation-delay: 0.2s; }
  .project-item:nth-child(2) { animation-delay: 0.25s; }
  .project-item:nth-child(3) { animation-delay: 0.3s; }
  .project-item:nth-child(4) { animation-delay: 0.35s; }
  .project-item:nth-child(5) { animation-delay: 0.4s; }
  .project-item:nth-child(6) { animation-delay: 0.45s; }
  .skill-row:nth-child(1) { animation-delay: 0.2s; }
  .skill-row:nth-child(2) { animation-delay: 0.25s; }
  .skill-row:nth-child(3) { animation-delay: 0.3s; }
  .skill-row:nth-child(4) { animation-delay: 0.35s; }
  .skill-row:nth-child(5) { animation-delay: 0.4s; }
  .skill-row:nth-child(6) { animation-delay: 0.45s; }
  .skill-row:nth-child(7) { animation-delay: 0.5s; }
  .skill-row:nth-child(8) { animation-delay: 0.55s; }
  .about-block { animation-delay: 0.2s; }
  .metrics-row { animation-delay: 0.3s; }
  .status-line { animation-delay: 0.35s; }
  .site-footer { animation-delay: 0.45s; }


  /* ─── SITE HEADER BAR ─── */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 40px;
    opacity: 0;
    animation: fadeIn .6s .2s forwards;
    /* Glass effect — toujours actif */
    background: rgba(10, 10, 10, 0.28);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition:
      background 0.35s ease,
      border-color 0.35s ease,
      box-shadow 0.35s ease;
  }

  :root.light .site-header {
    background: rgba(245, 244, 241, 0.55);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    box-shadow: none;
  }

  .site-header.scrolled {
    background: rgba(8, 8, 8, 0.42);
    border-color: transparent;
    box-shadow: none;
  }

  :root.light .site-header.scrolled {
    background: rgba(245, 244, 241, 0.82);
    border-color: rgba(0,0,0,0.08);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
  }

  @media (max-width: 720px) {
    .site-header { padding: 16px 20px; }
  }
  @media (max-width: 540px) {
    .site-header { padding: 14px 16px; }
  }

  /* ─── RESPONSIVE ─── */

  /* ── Tablet ── */
  @media (max-width: 720px) {
    .container { padding: 72px 0 100px; max-width: min(var(--col-width), calc(100% - 36px)); }
  }

  /* ── Mobile ── */
  @media (max-width: 540px) {

    /* Layout */
    .container { padding: 64px 0 90px; max-width: calc(100% - 36px); }

    /* Nav : on masque les liens texte, on garde juste le toggle */
    .top-nav {
      right: 16px;
      top: 20px;
      gap: 14px;
    }
    .top-nav a { font-size: 10px; }

    /* Header */
    .header { margin-bottom: 40px; }
    .header-top { gap: 14px; }
    .sphere-mini { width: 52px; height: 52px; }
    .name { font-size: 18px; }
    .tagline { font-size: 12px; }

    /* Sections */
    .section-label { margin-top: 40px; margin-bottom: 18px; }

    /* Projects : hover → tap */
    .project-row { padding: 13px 14px; gap: 10px; }
    .project-title { font-size: 13px; }
    .project-sub { font-size: 11px; }
    .project-sub--collapse { grid-template-rows: 1fr; } /* toujours visible sur mobile */
    .project-sub--collapse span { padding-bottom: 0; }
    .project-preview { grid-template-rows: 0fr !important; }
    .project-item:hover .project-preview { grid-template-rows: 0fr !important; }
    .project-item.mobile-open .project-preview { grid-template-rows: 1fr !important; }
    .project-item.mobile-open .project-preview-content { opacity: 1 !important; transform: translateY(0) !important; }
    .project-preview-inner { overflow: hidden; }
    .project-preview-content { padding: 0 14px 13px; gap: 8px; opacity: 0; transform: translateY(6px); }
    .project-thumb { aspect-ratio: unset; height: auto; }
    .project-thumb img { position: relative; inset: auto; height: auto; width: 100%; object-fit: contain; }
    .meta-pill { font-size: 9px; padding: 2px 6px; }
    .project-explore { font-size: 11px; }
    .project-tag, .project-year { font-size: 9px; }

    /* Désactiver le tilt 3D et le cursor custom (géré en JS aussi) */
    .project-item { transform: none !important; box-shadow: none !important; }

    /* Skills */
    .skill-name { font-size: 13px; }
    .skill-type { font-size: 11px; }

    /* About */
    .about-block p { font-size: 13px; line-height: 1.8; }

    /* Clients grid */
    .clients-grid { grid-template-columns: repeat(2, 1fr); }

    /* Metrics */
    .metrics-row { grid-template-columns: 1fr 1fr; }
    .metric-cell:last-child { grid-column: span 2; }
    .metric-value { font-size: 22px; }
    .metric-label { font-size: 9px; }

    /* Status */
    .status-line { font-size: 12px; }

    /* Footer */
    .site-footer { margin-top: 56px; padding-top: 24px; }
    .site-footer-inner { flex-direction: column; gap: 20px; margin-bottom: 20px; }
    .site-footer-right { gap: 20px; }
    .site-footer-bottom {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
      padding-top: 14px;
    }

    /* CV section */
    .cv-tabs { flex-direction: row; gap: 1px; }
    .cv-tab { padding: 10px 8px; font-size: 10px; flex: 1; text-align: center; white-space: nowrap; }
    .cv-panel { padding: 20px 16px; }
    .cv-entry { padding-left: 14px; }
    .cv-entry-role { font-size: 13px; }
    .cv-entry-date { font-size: 10px; }
    .cv-company-name, .cv-company-type { font-size: 11px; }
    .cv-entry-body { font-size: 12px; }
    .cv-entry-detail { font-size: 12px; }

    /* Section header row */
    .section-header-row { margin-top: 40px; }

    /* Cursor tag : masqué sur touch */
    #cursor-tag { display: none; }

    /* Background sphere : réduit pour perf */
    #sphere-canvas { opacity: 0.3; }
    :root.light #sphere-canvas { opacity: 0.38; }
  }

  /* ── Très petits écrans ── */
  @media (max-width: 380px) {
    .container { padding: 60px 0 80px; }
    .name { font-size: 16px; }
    .top-nav a { display: none; } /* Masque les liens, garde juste le toggle */
    .clients-grid { grid-template-columns: repeat(2, 1fr); }
  }



  /* ─── TOP NAV ─── */
  .top-nav {
    display: flex;
    gap: 20px;
    font-size: 11px;
    letter-spacing: .08em;
  }
  .top-nav a {
    font-size: 13px;
    color: var(--fg-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
    transition: color .15s, border-color .15s;
  }
  .top-nav a:hover { color: var(--fg); border-color: var(--accent-design); }
  :root.light .top-nav a:hover { border-color: var(--accent-design); }

  .section-header-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 56px;
    margin-bottom: 0;
  }
  .section-header-row .section-label {
    margin-top: 0;
    margin-bottom: 24px;
  }
  .cv-download-link {
    font-size: 13px;
    letter-spacing: .05em;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.25);
    padding-bottom: 1px;
    transition: color .15s, border-color .15s;
  }
  :root.light .cv-download-link { border-bottom-color: rgba(0,0,0,.15); }
  .cv-download-link:hover { color: var(--fg); border-color: var(--accent-design); }
  :root.light .cv-download-link:hover { border-color: var(--accent-design); }

  /* ─── CV TABS ─── */
  .cv-tabs {
    display: flex;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-bottom: none;
    margin-top: 16px;
  }
  .cv-tab {
    flex: 1;
    background: var(--card);
    border: none;
    border-bottom: 1px solid transparent;
    padding: 12px 16px;
    font-family: var(--font);
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--fg-subtle);
    transition: color .2s, background .2s, border-color .2s;
    text-align: left;
  }
  .cv-tab:hover { color: var(--fg); }
  .cv-tab.active {
    color: var(--fg);
    background: var(--bg);
    border-bottom-color: var(--accent-design);
  }
  :root.light .cv-tab { background: #EDECEA; color: var(--fg-muted); }
  :root.light .cv-tab.active { background: var(--card); border-bottom-color: var(--accent-design); color: var(--fg); }

  .cv-section {
    border: 1px solid var(--border);
    background: var(--bg);
    opacity: 0;
    animation: fadeIn 0.5s 1s forwards;
  }
  .cv-panel {
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
  }
  :root.light .cv-section { background: var(--card); border-color: rgba(0,0,0,0.08); }
  :root.light .cv-panel { background: var(--card); }
  .cv-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
      400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(255,255,255,0.07) 0%,
      rgba(255,255,255,0.02) 40%,
      transparent 70%
    );
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    z-index: 0;
  }
  :root.light .cv-panel::before {
    background: radial-gradient(
      400px circle at var(--mx, 50%) var(--my, 50%),
      rgba(0,0,0,0.04) 0%,
      rgba(0,0,0,0.01) 40%,
      transparent 70%
    );
  }
  .cv-panel:hover::before { opacity: 1; }
  .cv-panel > * { position: relative; z-index: 1; }
  .cv-panel.hidden { display: none; }


  /* Experience entries */
  .cv-entry {
    position: relative;
    padding-left: 18px;
  }
  .cv-entry::after {
    content: '';
    position: absolute;
    left: 0;
    top: 41px; /* dot top (38px) + dot radius (3px) */
    bottom: -38px; /* reach center of next dot */
    width: 1px;
    background: var(--border);
  }
  .cv-entry:last-child::after { display: none; }
  .cv-entry > * { position: relative; z-index: 1; }
  .cv-timeline-dot {
    position: absolute;
    left: -3.5px;
    top: 38px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fg-subtle);
    transition: background .2s;
  }
  .cv-entry:first-child .cv-timeline-dot { background: var(--fg); }
  .cv-entry.open .cv-timeline-dot { background: var(--fg); }

  .cv-entry-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 0;
    cursor: pointer;
    user-select: none;
    gap: 12px;
  }
  .cv-entry-header-left { flex: 1; min-width: 0; }
  .cv-entry-toggle {
    font-size: 19px;
    color: var(--fg-subtle);
    flex-shrink: 0;
    transition: transform .3s cubic-bezier(.16,1,.3,1), color .2s;
    line-height: 1;
    margin-top: 1px;
  }
  .cv-entry:hover .cv-entry-toggle { color: #E8622A; }
  .cv-entry.open .cv-entry-toggle { transform: rotate(45deg); color: var(--fg); }
  .cv-entry.open:hover .cv-entry-toggle { color: #E8622A; }
  .cv-entry-date {
    font-size: 10px;
    color: var(--fg-subtle);
    margin-bottom: 3px;
    letter-spacing: .04em;
  }
  .cv-entry-role {
    font-size: 14px;
    font-weight: 400;
    color: var(--fg);
    letter-spacing: -.02em;
    line-height: 1.3;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .cv-entry-company {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
  }
  .cv-company-name { font-size: 11px; color: var(--fg-muted); font-weight: 400; }
  .cv-company-type { font-size: 10px; color: var(--fg-subtle); }

  .cv-entry-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s cubic-bezier(.16,1,.3,1);
    margin-left: -18px;
    padding-left: 18px;
    margin-right: -18px;
    padding-right: 18px;
  }
  .cv-entry.open .cv-entry-body { grid-template-rows: 1fr; }
  .cv-entry-body-inner { overflow: hidden; }
  .cv-entry-body-content {
    padding-bottom: 18px;
    padding-top: 8px;
  }
  .cv-entry-desc {
    font-size: 12px;
    color: var(--fg-muted);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 10px;
    width: 100%;
  }
  .cv-now-tag {
    display: inline-block;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fg);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 1px 6px;
    border-radius: 2px;
    vertical-align: middle;
    flex-shrink: 0;
    position: relative;
    top: -1px;
  }
  :root.light .cv-now-tag {
    color: var(--fg-muted);
    border-color: rgba(0,0,0,0.20);
  }

  .cv-entry-link {
    font-size: 10px;
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.25);
    padding-bottom: 1px;
    transition: color .15s, border-color .15s;
    letter-spacing: .04em;
  }
  :root.light .cv-entry-link { border-bottom-color: rgba(0,0,0,.15); }
  .cv-entry-link:hover { color: var(--fg); border-color: var(--accent-design); }
  :root.light .cv-entry-link:hover { border-color: var(--accent-design); }

  /* Education entries — timeline, no collapse */
  .cv-edu-entry {
    position: relative;
    padding-left: 18px;
  }
  .cv-edu-entry::after {
    content: '';
    position: absolute;
    left: 0;
    top: 31px; /* dot top (28px) + dot radius (3px) */
    bottom: -28px; /* reach center of next dot */
    width: 1px;
    background: var(--border);
  }
  .cv-edu-entry:last-child::after { display: none; }
  .cv-edu-entry > * { position: relative; z-index: 1; }
  .cv-edu-dot {
    position: absolute;
    left: -3.5px;
    top: 28px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fg-subtle);
  }
  .cv-edu-dot--plus {
    background: transparent !important;
    color: var(--fg-subtle);
    font-size: 12px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    left: -6px;
    top: 25px;
    border-radius: 0;
    line-height: 1;
  }
  .cv-edu-content { padding: 4px 0 20px; }
  .cv-edu-degree {
    font-size: 14px;
    font-weight: 400;
    color: var(--fg);
    letter-spacing: -.02em;
    line-height: 1.3;
  }
  .cv-edu-subtitle {
    font-size: 11px;
    color: var(--fg-muted);
    font-weight: 300;
    margin-top: 4px;
  }
  .cv-edu-school {
    font-size: 11px;
    color: var(--fg-muted);
    font-weight: 400;
    margin-top: 4px;
    margin-bottom: 2px;
  }
  .cv-edu-year { font-size: 10px; color: var(--fg-subtle); }

  /* cv-tabs desktop fallback */

  /* ─── THEME TOGGLE ─── */
  .theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .toggle-track {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
    position: relative;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
  }
  :root.light .toggle-track {
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.14);
  }
  .toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #8A8681;
    transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
  }
  :root.light .toggle-thumb { transform: translateX(16px); background: #7A746E; }
  .toggle-label {
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--fg-subtle);
    transition: color 0.3s;
    user-select: none;
  }

  /* smooth global transition on theme switch */
  body, .project-item, .cv-section, .cv-panel, .cv-tab, .toggle-track, .meta-pill {
    transition: background 0.3s, border-color 0.3s, color 0.3s;
  }

  /* light mode SVG icons in thumbs */
  :root.light .project-thumb svg path,
  :root.light .project-thumb svg rect,
  :root.light .project-thumb svg circle { stroke: #4A4540; fill: #4A4540; }
  :root.light .project-thumb svg path[fill="none"],
  :root.light .project-thumb svg rect[fill="none"],
  :root.light .project-thumb svg circle[fill="none"] { fill: none; }

  /* header name color */
  .header-name { color: var(--fg); transition: color 0.3s; }

  *, *::before, *::after { cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><circle cx='6' cy='6' r='6' fill='%23E8622A'/></svg>") 6 6, auto !important; }
  a, button, [role="button"], label, .project-item, .stepper-btn, .next-link, .job-card {
    cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12'><circle cx='6' cy='6' r='6' fill='%23E8622A'/></svg>") 6 6, pointer !important;
  }

  /* Cursor natif sur écrans tactiles */
  @media (hover: none) and (pointer: coarse) {
    *, *::before, *::after { cursor: auto !important; }
    a, button, [role="button"], label, .project-item { cursor: pointer !important; }
  }

/* ─── CURSOR TAG ─── */
#cursor-tag {
  position: fixed;
  top: 0;
  left: 0;
  padding: 4px 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #E8622A;
  color: #fff;
  pointer-events: none;
  transform: translate(0, -50%);
  opacity: 0;
  z-index: 9999;
  white-space: nowrap;
  font-family: var(--font);
  border-radius: 2px;
  transition: opacity .18s ease, transform .18s ease;
}

/* ─── IMPROVEMENTS v6 ─── */

/* Tagline subtitle */
.tagline-sub {
  display: block;
  font-size: 11px;
  color: var(--fg-subtle);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* Skip to content (accessibility) */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-design);
  color: #fff;
  padding: 8px 12px;
  font-size: 11px;
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-design);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Project item border - more visible in dark */
.project-item {
  border-color: rgba(255,255,255,0.06) !important;
}
:root.light .project-item {
  border-color: rgba(0,0,0,0.10) !important;
  background: #FFFFFF;
}

/* Scroll progress indicator */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent-design);
  z-index: 999;
  width: 0%;
  transition: width 0.1s linear;
}

/* Status line - open to work */
.status-line {
  margin-top: 20px;
  margin-bottom: 0;
}

/* Side projects */

/* Smooth image loading */
.project-thumb img {
  background: var(--card);
}

/* CV entry description spacing */
.cv-entry-desc {
  width: 100%;
}

/* Footer — add email link */
.footer-email {
  font-size: 12px;
  color: var(--accent-design);
  text-decoration: none;
  border-bottom: 1px solid rgba(232,98,42,0.3);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.footer-email:hover { border-color: var(--accent-design); }

/* ─── HANDMADE BADGE ─── */
#handmade-badge {
  position: fixed;
  bottom: 0;
  left: 24px;
  z-index: 999;
  background: #E8622A;
  color: #fff;
  font-family: 'Geist Mono', monospace;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 12px 5px 12px;
  border-radius: 6px 6px 0 0;
  pointer-events: none;
  user-select: none;
}
