/* ============================================================
   Damien Marchand — CV
   Vanilla CSS, mobile-first, dark theme
   ============================================================ */

:root {
  --bg:        #0a0a0a;
  --bg-soft:   #111111;
  --surface:   #161616;
  --surface-2: #1d1d1d;
  --border:    #262626;
  --border-2:  #333333;

  --text:      #f2f2f2;
  --text-soft: #b8b8b8;
  --text-mute: #7a7a7a;

  --accent:    #d4af37;          /* or */
  --accent-2:  #c9a96e;
  --accent-soft: rgba(212, 175, 55, 0.12);

  --radius:    14px;
  --radius-sm: 8px;

  --max:       1100px;
  --gutter:    1.25rem;

  --shadow-1:  0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.35);

  --serif:     "Cormorant Garamond", "Times New Roman", ui-serif, Georgia, serif;
  --sans:      -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
               system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --easing:    cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s var(--easing); }
a:hover, a:focus-visible { color: var(--accent-2); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }

/* Subtle background gradient */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 40% at 80% -10%, rgba(212,175,55,0.08), transparent 60%),
    radial-gradient(50% 30% at 0% 110%, rgba(212,175,55,0.05), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--bg);
  padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10,10,10,0.75);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--easing), background .3s var(--easing);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(10,10,10,0.9);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: .85rem var(--gutter);
}
.nav__brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--text);
  font-weight: 600;
}
.nav__monogram {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--accent);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  background: var(--surface);
}
.nav__name { display: none; }
.nav__links {
  display: none;
  gap: 1.4rem;
  flex: 1;
  justify-content: center;
}
.nav__links a {
  color: var(--text-soft);
  font-size: .95rem;
  position: relative;
  padding: .25rem 0;
}
.nav__links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--easing);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); }

.lang-switch {
  font-family: var(--sans);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: .45rem .85rem;
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  padding: 3rem var(--gutter) 2.5rem;
  max-width: var(--max);
  margin: 0 auto;
}
.hero__inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.75rem;
  text-align: center;
}
.hero__photo {
  width: 160px; height: 160px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-1);
}
.hero__photo::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(212,175,55,0.25);
  pointer-events: none;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

.hero__eyebrow {
  margin: 0 0 .6rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  color: var(--text-mute);
}
.hero__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 8vw, 4rem);
  letter-spacing: -.01em;
  line-height: 1.05;
  margin-bottom: .5rem;
  background: linear-gradient(180deg, #fff 0%, #d8d8d8 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero__role {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 0 0 1rem;
  letter-spacing: .02em;
}
.hero__tagline {
  font-size: 1rem;
  color: var(--text-soft);
  max-width: 38ch;
  margin: 0 auto 1.6rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--easing), background .2s, border-color .2s, color .2s;
}
.btn--primary {
  background: var(--accent);
  color: #1a1300;
}
.btn--primary:hover { background: var(--accent-2); color: #1a1300; transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---------- Section ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem var(--gutter);
  scroll-margin-top: 5rem;
}
.section__heading {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 4.5vw, 2.4rem);
  margin-bottom: 1.75rem;
  position: relative;
  padding-bottom: .65rem;
}
.section__heading::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 1px;
  background: var(--accent);
}
.section__lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 65ch;
  margin: 0 0 1.5rem;
}

/* ---------- Timeline (experience) ---------- */
.timeline {
  position: relative;
  display: flex; flex-direction: column;
  gap: 1.5rem;
  padding-left: 1.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--border-2), transparent);
}
.timeline__item {
  position: relative;
  padding: 1.1rem 1.1rem 1.1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s, transform .25s;
}
.timeline__item:hover { border-color: var(--border-2); transform: translateX(2px); }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.32rem; top: 1.6rem;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(212,175,55,.12);
}
.timeline__period {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: .35rem;
}
.timeline__role {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .15rem;
}
.timeline__company {
  color: var(--accent);
  font-size: .98rem;
  margin-bottom: .15rem;
}
.timeline__location {
  color: var(--text-mute);
  font-size: .85rem;
  margin-bottom: .65rem;
}
.timeline__desc {
  color: var(--text-soft);
  font-size: .95rem;
  margin: 0 0 .65rem;
}
.timeline__stack {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-top: .5rem;
}
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-2);
  border: 1px solid rgba(212,175,55,0.15);
}

/* ---------- Skills ---------- */
.skills {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.skills__group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: border-color .25s, transform .25s;
}
.skills__group:hover { border-color: var(--border-2); transform: translateY(-2px); }
.skills__title {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: .8rem;
}
.skills__items { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- Education ---------- */
.education { display: flex; flex-direction: column; gap: .9rem; }
.education__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.education__degree { font-weight: 600; }
.education__school { color: var(--accent); font-size: .95rem; margin-top: .1rem; }
.education__meta { color: var(--text-mute); font-size: .85rem; margin-top: .25rem; }

/* ---------- Hobbies ---------- */
.hobbies {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.hobbies__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  transition: border-color .25s, transform .25s;
}
.hobbies__item:hover { border-color: var(--border-2); transform: translateY(-2px); }
.hobbies__name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: .25rem;
}
.hobbies__desc {
  color: var(--text-soft);
  font-size: .95rem;
  margin-bottom: .35rem;
}
.hobbies__link {
  display: inline-block;
  font-size: .85rem;
  color: var(--accent);
  word-break: break-all;
}

@media (min-width: 640px) {
  .hobbies { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Split (languages + contact) ---------- */
.section--split { padding-top: 1.5rem; }
.split { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
.split__col > .section__heading { margin-top: 0; }

.languages { display: flex; flex-direction: column; gap: .55rem; }
.languages__item {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .65rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.languages__name { font-weight: 600; }
.languages__level { color: var(--text-mute); font-size: .9rem; }

.contact { display: flex; flex-direction: column; gap: .6rem; }
.contact__item {
  display: flex; gap: .9rem; align-items: center;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .25s, transform .25s;
}
.contact__item:hover { border-color: var(--accent); transform: translateX(2px); }
.contact__label {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-mute);
  min-width: 88px;
}
.contact__value { color: var(--text); word-break: break-word; }
a.contact__item { text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.75rem var(--gutter);
  text-align: center;
  color: var(--text-mute);
  font-size: .85rem;
}
.site-footer .dot { margin: 0 .5rem; opacity: .5; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--easing), transform .7s var(--easing);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .nav__name { display: inline; }
  .skills { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  body { font-size: 17px; }
  .nav__links { display: flex; }

  .hero { padding: 5rem var(--gutter) 4rem; }
  .hero__inner {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 3rem;
  }
  .hero__photo { width: 200px; height: 200px; flex-shrink: 0; }
  .hero__tagline { margin-left: 0; margin-right: 0; }
  .hero__actions { justify-content: flex-start; }

  .section { padding: 5rem var(--gutter); }

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

  .split { grid-template-columns: 1fr 1.2fr; gap: 3rem; }
}

/* ---------- Print (bonus: imprime / export PDF propre) ---------- */
@media print {
  body { background: #fff; color: #111; }
  body::before { display: none; }
  .site-header, .lang-switch, .hero__actions, .site-footer, .skip-link { display: none !important; }
  .nav__links { display: none !important; }
  a { color: #111; text-decoration: none; }
  .hero__name { color: #111; background: none; -webkit-text-fill-color: initial; }
  .hero__role { color: #555; }
  .section, .hero { padding: 1rem 0; }
  .timeline__item, .skills__group, .education__item, .languages__item, .contact__item {
    background: transparent; border-color: #ddd;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
