/* ============================================================
   Télio Tortay — Portfolio
   style.css
   ============================================================ */

/* ── VARIABLES & RESET ── */
:root {
  --bg:           #080808;
  --bg2:          #111111;
  --bg3:          #181818;
  --text:         #e8e4dc;
  --text-muted:   #6b6760;
  --text-dim:     #3a3835;
  --accent:       #c8b89a;
  --accent2:      #8a7a6a;
  --border:       rgba(200,184,154,0.12);
  --border-light: rgba(200,184,154,0.06);
  --max:          1400px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1rem, 2vw, 2rem) clamp(1.5rem, 4vw, 4rem);
}

nav::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(8,8,8,0.96) 0%, transparent 100%);
  pointer-events: none;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 2.5vw, 2.5rem);
  list-style: none;
  position: relative;
  z-index: 1;
}

.nav-links a {
  font-family: 'Syne', sans-serif;
  font-size: clamp(9px, 0.75vw, 11px);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
}

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

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  overflow: hidden;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 clamp(1.5rem, 4vw, 4rem) clamp(4rem, 7vh, 7rem) clamp(1.5rem, 4vw, 4rem);
  position: relative;
  max-width: 700px;
}

.hero-eyebrow {
  font-family: 'Syne', sans-serif;
  font-size: clamp(9px, 0.75vw, 11px);
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(1.2rem, 2vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero-name {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 6.5vw, 8.5rem);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  margin-bottom: clamp(1rem, 1.5vw, 1.5rem);
}

.hero-name em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: clamp(0.85rem, 1vw, 1rem);
  color: var(--text-muted);
  margin-bottom: clamp(2rem, 3vw, 3rem);
  max-width: 380px;
  letter-spacing: 0.02em;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Syne', sans-serif;
  font-size: clamp(9px, 0.75vw, 11px);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.9rem 1.8rem;
  transition: all 0.4s;
  cursor: pointer;
  width: fit-content;
}

.hero-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(200,184,154,0.04);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 250px;
  background: linear-gradient(to top, rgba(8,8,8,0.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero-scroll {
  position: absolute;
  bottom: clamp(1.5rem, 3vh, 2.5rem);
  right: clamp(1.5rem, 3vw, 3rem);
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-dim);
  writing-mode: vertical-rl;
  display: flex; align-items: center; gap: 1rem;
  z-index: 2;
}

.hero-scroll::after {
  content: '';
  display: block;
  width: 1px; height: 60px;
  background: var(--border);
}

/* ── SECTIONS ── */
section { padding: clamp(4rem, 8vw, 9rem) clamp(1.5rem, 4vw, 4rem); position: relative; }
.inner { max-width: var(--max); margin: 0 auto; }

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: clamp(9px, 0.7vw, 10px); font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
  display: flex; align-items: center; gap: 1.5rem;
}

.section-label::before {
  content: ''; display: block;
  width: 30px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 3.5vw, 4rem); font-weight: 700;
  line-height: 1.05; letter-spacing: -0.02em;
  margin-bottom: clamp(2rem, 3.5vw, 3.5rem);
}

.section-title em { font-style: normal; color: var(--accent); font-weight: 400; }

/* ── ABOUT ── */
#about {
  background: var(--bg2);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: start;
}

.about-text p {
  font-size: clamp(1rem, 1.1vw, 1.2rem);
  line-height: 1.9; color: var(--text); margin-bottom: 1.4rem;
}

.about-text p:last-child { margin-bottom: 0; }
.about-text strong { font-weight: 400; color: var(--accent); }
.about-details { display: flex; flex-direction: column; gap: 2.5rem; padding-top: 0.3rem; }

.about-block-label {
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 0.9rem; display: block;
}

.tools-list { display: flex; flex-direction: column; gap: 0.4rem; }

.tool-item {
  display: flex; align-items: center; gap: 0.9rem;
  font-size: clamp(0.95rem, 1vw, 1.1rem); color: var(--text);
}

.tool-item::before {
  content: ''; display: block;
  width: 18px; height: 1px;
  background: var(--accent); flex-shrink: 0;
}

.location-line { font-size: 1rem; color: var(--text-muted); }

/* ── GALERIE ── */
#projets { padding-left: 0; padding-right: 0; }

.projets-header {
  padding: 0 clamp(1.5rem, 4vw, 4rem);
  max-width: var(--max);
  margin: 0 auto clamp(3rem, 5vw, 5rem) auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 28vw;
  gap: 2px;
  background: var(--bg3);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--bg3);
  cursor: pointer;
  min-height: 0;
}

.gallery-item.span-row2 { grid-row: span 2; }
.gallery-item.span-col2 { grid-column: span 2; }

.gallery-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.8rem;
  background: var(--bg3);
  border: 1px solid var(--border-light);
  transition: background 0.3s;
}

.gallery-item:hover .gallery-placeholder { background: #1e1e1e; }

.gallery-placeholder-plus { font-size: 1.5rem; color: var(--text-dim); font-weight: 300; line-height: 1; }

.gallery-placeholder-text {
  font-family: 'Syne', sans-serif;
  font-size: 8px; font-weight: 500;
  letter-spacing: 0.25em; text-transform: uppercase; color: var(--text-dim);
}

.gallery-item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
}

.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.78) 0%, rgba(8,8,8,0.05) 45%, transparent 65%);
  opacity: 1;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1rem, 1.5vw, 1.5rem);
  z-index: 2;
}

.overlay-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(0.9rem, 1vw, 1.1rem); font-weight: 500;
  color: var(--text); margin-bottom: 0.2rem;
}

.overlay-sub {
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
}

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 999;
  background: rgba(4,4,4,0.96);
  align-items: center; justify-content: center;
  cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox-inner {
  position: relative;
  max-width: 90vw; max-height: 90vh;
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}

.lightbox-img {
  max-width: 90vw; max-height: 80vh;
  object-fit: contain;
  border: 1px solid var(--border);
}

.lightbox-placeholder {
  width: min(80vw, 900px); height: min(60vh, 540px);
  background: var(--bg3);
  border: 1px solid var(--border-light);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
}

.lightbox-caption {
  font-family: 'Syne', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}

.lightbox-sub {
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.lightbox-close {
  position: fixed; top: 1.5rem; right: 2rem;
  font-family: 'Syne', sans-serif;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-muted); cursor: pointer;
  transition: color 0.2s;
  background: none; border: none;
  display: flex; align-items: center; gap: 0.6rem;
}

.lightbox-close:hover { color: var(--accent); }
.lightbox-close::before { content: '×'; font-size: 1.4rem; font-weight: 300; }

/* ── TIMELINE ── */
#references {
  background: var(--bg2);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.timeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 4rem;
}

.timeline-col { display: flex; flex-direction: column; }

.timeline-item {
  display: grid;
  grid-template-columns: clamp(75px, 8vw, 110px) 1px 1fr;
  gap: 0 clamp(1rem, 2vw, 1.8rem);
  padding: clamp(1.4rem, 2vw, 2rem) 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.3s, padding 0.3s, margin 0.3s;
}

.timeline-item:first-child { border-top: 1px solid var(--border-light); }

.timeline-item:hover {
  background: rgba(200,184,154,0.02);
  padding-left: 0.8rem;
  padding-right: 0.8rem;
  margin-left: -0.8rem;
  margin-right: -0.8rem;
}

.timeline-year {
  font-family: 'Syne', sans-serif;
  font-size: clamp(11px, 0.9vw, 13px); font-weight: 600;
  letter-spacing: 0.06em; color: var(--accent);
  padding-top: 0.25rem; text-align: right;
  line-height: 1.4;
}

.timeline-line { background: var(--border); position: relative; flex-shrink: 0; }

.timeline-line::before {
  content: '';
  position: absolute; top: 0.6rem; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px;
  background: var(--accent); border-radius: 50%;
}

.timeline-content { padding-bottom: 0.2rem; }

.timeline-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(0.95rem, 1vw, 1.1rem); font-weight: 600;
  color: var(--text); margin-bottom: 0.4rem; line-height: 1.3;
}

.timeline-content h3 em { font-style: normal; color: var(--accent); font-weight: 400; }

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  margin-bottom: 0.4rem;
}

.timeline-pill {
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.timeline-pill.role  { border-color: rgba(200,184,154,0.2); color: var(--accent2); }
.timeline-pill.console { border-color: rgba(255,255,255,0.12); color: #9a9590; }

.timeline-content p { font-size: clamp(0.85rem, 0.9vw, 0.95rem); color: var(--text-muted); line-height: 1.5; }

.timeline-tag {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid rgba(138,122,106,0.3);
  padding: 0.2rem 0.5rem;
  margin-left: 0.5rem;
  vertical-align: middle; position: relative; top: -0.1rem;
}

/* ── CONTACT ── */
#contact {
  min-height: 80vh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center; position: relative; overflow: hidden;
}

#contact::before {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(200,184,154,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.contact-inner { position: relative; z-index: 1; max-width: 820px; width: 100%; padding: 0 1rem; }

.contact-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  width: 100%;
}

.contact-title em { font-style: normal; color: var(--accent); font-weight: 400; }

.contact-sub {
  font-size: clamp(0.9rem, 1vw, 1.1rem); color: var(--text-muted);
  margin-bottom: 3rem; line-height: 1.8;
}

.contact-email {
  font-family: 'Syne', sans-serif;
  font-size: clamp(11px, 1vw, 13px); font-weight: 500;
  letter-spacing: 0.12em; color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem; transition: all 0.3s;
  display: inline-block; margin-bottom: 2.5rem;
}

.contact-email:hover { color: var(--accent); border-bottom-color: var(--accent); }

.social-links { display: flex; gap: 2rem; justify-content: center; }

.social-link {
  font-family: 'Syne', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-dim); transition: color 0.3s;
  display: flex; align-items: center; gap: 0.6rem;
}

.social-link:hover { color: var(--accent); }
.social-link::before { content: ''; display: block; width: 16px; height: 1px; background: currentColor; }

/* ── FOOTER ── */
footer {
  padding: clamp(1.5rem, 2vw, 2rem) clamp(1.5rem, 4vw, 4rem);
  border-top: 1px solid var(--border-light);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}

.footer-copy {
  font-family: 'Syne', sans-serif; font-size: 9px; font-weight: 500;
  letter-spacing: 0.18em; color: var(--text-dim); text-transform: uppercase;
}

.footer-made {
  font-family: 'Syne', sans-serif; font-size: 9px; font-weight: 400;
  letter-spacing: 0.1em; color: var(--text-dim);
}

/* ── ANIMATIONS ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE — MOBILE (< 768px) ── */
@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; }
  .hero-left { min-height: 100vh; padding: 7rem 1.5rem 4rem 1.5rem; justify-content: flex-end; max-width: 100%; }
  .hero-scroll { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 60vw; }
  .gallery-item.span-row2,
  .gallery-item.span-col2 { grid-column: span 1; grid-row: span 1; }
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline-item { grid-template-columns: 70px 1px 1fr; gap: 0 1rem; }
  .timeline-item:hover { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .nav-links { display: none; }
  #contact { min-height: 70vh; }
}

/* ── RESPONSIVE — TABLETTE (769px–1100px) ── */
@media (min-width: 769px) and (max-width: 1100px) {
  .about-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.span-col2 { grid-column: span 1; }
  .gallery-item.span-row2 { grid-row: span 1; }
}

/* ── RESPONSIVE — TIMELINE MEDIUM (< 900px) ── */
@media (max-width: 900px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline-item { grid-template-columns: 70px 1px 1fr; gap: 0 1rem; }
  .timeline-item:hover { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}

/* ── RESPONSIVE — GRANDS ÉCRANS (> 1800px) ── */
@media (min-width: 1800px) {
  .hero-name { font-size: 9.5rem; }
  .gallery-grid { grid-auto-rows: 22vw; }
}
