/* Laura Lihanza-Leya | 2026 */

:root {
  --serif: 'Cormorant', Georgia, serif;
  --sans: 'Libre Franklin', system-ui, sans-serif;
  --black: #111;
  --white: #fff;
  --warm: #B8977E;
  --gray: #888;
  --light: #e8e4df;
  --bg: #faf9f7;
  --rule: rgba(0,0,0,0.1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--black);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--warm); color: var(--white); }
:focus-visible { outline: 2px solid var(--warm); outline-offset: 3px; }

/* Grain */
.grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.04;
  mix-blend-mode: multiply;
}

/* Falling canvas overlay */
#fallingCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 90;
  pointer-events: none;
  transition: opacity 0.8s ease-out;
}
#fallingCanvas.done { opacity: 0; }

/* Skip */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--warm);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.8rem;
  z-index: 99;
}
.skip-link:focus { left: 0; }

/* Reveal */
.rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.rv.vis { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  #fallingCanvas { display: none; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes lineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Layout */
.wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 40px;
}
section { padding-block-start: 8rem; }

/* Section label */
.s-label {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm);
  margin-block-end: 2rem;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block-end: 12vh;
}

.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  animation: fadeIn 1s ease-out 0.5s both;
}

.hero-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-block-start: 1.5rem;
  animation: fadeIn 1s ease-out 0.9s both;
}

.hero-line {
  width: 48px;
  height: 1px;
  background: var(--warm);
  margin-block-start: 2rem;
  animation: lineGrow 0.8s ease-out 1.2s both;
  transform-origin: left;
}

.hero-location {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  margin-block-start: 1rem;
  animation: fadeIn 1s ease-out 1.4s both;
}

/* Philosophie */
.philo {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.45;
  color: var(--black);
  max-width: 520px;
  border: none;
  padding: 0;
}
.philo em { font-style: italic; color: var(--warm); }

/* Timeline */
.timeline { margin-block-start: 2.5rem; }

.tl-item {
  position: relative;
  padding: 2rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  cursor: pointer;
}
.tl-item:last-child { border-bottom: 1px solid var(--rule); }

.tl-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--warm);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s;
  z-index: -1;
  pointer-events: none;
}
.tl-item:hover::after,
.tl-item:focus-within::after {
  transform: scaleX(1);
  opacity: 0.08;
}

.tl-period {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}

.tl-role {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  line-height: 1.3;
  margin-block-start: 0.15rem;
}

.tl-company {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--gray);
  margin-block-start: 0.15rem;
}

.tl-detail {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.8rem;
  color: var(--gray);
  margin-block-start: 0.5rem;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s;
  opacity: 0;
}
.tl-item.open .tl-detail { max-height: 200px; opacity: 1; }

.tl-toggle {
  position: absolute;
  right: 0;
  top: 2rem;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-toggle::before,
.tl-toggle::after {
  content: '';
  position: absolute;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}
.tl-toggle::before { width: 14px; height: 1.5px; }
.tl-toggle::after { width: 1.5px; height: 14px; }
.tl-item.open .tl-toggle::after { transform: rotate(90deg); opacity: 0; }

/* Formation */
.formation-list { margin-block-start: 2.5rem; }
.f-item { padding-block: 1.5rem; border-top: 1px solid var(--rule); }
.f-item:last-child { border-bottom: 1px solid var(--rule); }
.f-school { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; line-height: 1.3; }
.f-program { font-family: var(--sans); font-weight: 300; font-size: 0.8rem; color: var(--gray); margin-block-start: 0.2rem; }

/* Contact */
.contact-section { padding-block: 8rem 3rem; }

.contact-line {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.4;
  max-width: 480px;
}

.contact-links {
  margin-block-start: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.contact-link {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color 0.3s;
  width: fit-content;
}
.contact-link::after {
  content: '';
  width: 20px;
  height: 1.5px;
  background: var(--warm);
  transition: width 0.3s;
}
.contact-link:hover { color: var(--warm); }
.contact-link:hover::after { width: 36px; }

/* Playground */
.playground {
  position: relative;
  height: 60vh;
  height: 60svh;
  min-height: 400px;
  overflow: hidden;
  padding: 0;
}

#physCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .playground { display: none; }
}

/* 404 */
.page-404 {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.four-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(6rem, 20vw, 14rem);
  line-height: 1;
  color: var(--light);
  letter-spacing: -0.04em;
}
.four-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  line-height: 1.4;
  margin-block-start: 1rem;
}
.four-text {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--gray);
  margin-block-start: 0.75rem;
  line-height: 1.6;
}
.four-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warm);
  margin-block-start: 2.5rem;
  transition: color 0.3s;
}
.four-link::after {
  content: '';
  width: 16px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s;
}
.four-link:hover { color: var(--black); }
.four-link:hover::after { width: 28px; }

/* Nav dots */
.nav-dot {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.5s;
}
.nav-dot.vis { opacity: 1; }

.nav-dot a {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--light);
  background: transparent;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  display: block;
}
.nav-dot a:hover,
.nav-dot a.active {
  background: var(--warm);
  border-color: var(--warm);
  transform: scale(1.3);
}

/* Footer */
.foot { padding-block: 3rem; border-top: 1px solid var(--rule); }
.foot-inner { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 1rem; }
.foot-text { font-family: var(--sans); font-weight: 300; font-size: 0.65rem; letter-spacing: 0.08em; color: var(--gray); text-transform: uppercase; }
.foot-credit { font-family: var(--sans); font-weight: 300; font-size: 0.6rem; letter-spacing: 0.06em; color: var(--light); transition: color 0.3s; }
.foot-credit:hover { color: var(--gray); }

@media (max-width: 700px) {
  .wrap { padding: 0 24px; }
  .nav-dot { top: auto; bottom: 20px; right: 16px; transform: none; flex-direction: row; }
  .foot-inner { flex-direction: column; gap: 0.5rem; }
  .playground { height: 50vh; min-height: 300px; }
}

@media print {
  .grain, .nav-dot, .hero-line, .playground, #fallingCanvas { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wrap { max-width: 100%; padding: 0; }
  .hero { min-height: auto; padding: 2rem 0; }
  section { padding-block-start: 2rem; }
  .tl-detail { max-height: none; opacity: 1; }
  .tl-item::after { display: none; }
  .contact-link::after { display: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
  a[href^="#"]::after { content: none; }
  .foot-credit { display: none; }
}
