/* ============================================================
   etienneunai.com — design tokens
   ============================================================ */
:root {
  color-scheme: light;
  --bg:      #FAFAEA;  /* Ivory */
  --brand:   #800000;  /* Maroon */
  --text:    #453018;  /* Deep Walnut */
  --oak:     #D0C6B0;  /* Pale Oak */
  --caramel: #C46210;  /* Burnt Caramel */
  --font-display: 'Ovo', Georgia, serif;
  --font-body: 'Inconsolata', 'Courier New', monospace;
  --radius: 12px;
  --container: 46rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 3px;
}

::selection {
  background: var(--caramel);
  color: var(--bg);
}

/* ============ Header ============ */
.site-header { padding: 2rem 0 1rem; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--brand);
  line-height: 1.15;
  white-space: nowrap;
}

.wip-badge {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: var(--oak);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============ Intro ============ */
.intro { padding: 1.5rem 0 2.5rem; }

.intro p {
  max-width: 40em;
  margin: 0;
}

/* ============ Contact ============ */
.contact { padding-bottom: 2.5rem; }

.contact-list {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-btn {
  display: grid;
  grid-template-columns: 3rem 0fr;
  align-items: center;
  width: auto;
  max-width: 3rem;
  height: 3rem;
  padding: 0;
  overflow: hidden;
  background: var(--oak);
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease,
              max-width 0.35s ease, padding 0.35s ease,
              grid-template-columns 0.35s ease;
}

.contact-btn .btn-icon { grid-column: 1; justify-self: center; }

.btn-label {
  grid-column: 2;
  min-width: 0;
  margin-left: 0.75rem;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.contact-btn:hover,
.contact-btn:focus-visible {
  grid-template-columns: 3rem 1fr;
  max-width: 20rem;
  padding: 0 1.1rem 0 0;
  background: var(--text);
  border-color: var(--text);
  color: var(--caramel);
}

.contact-btn:hover .btn-label,
.contact-btn:focus-visible .btn-label {
  opacity: 1;
}

/* ============ Projects ============ */
.projects { padding-bottom: 3rem; }

.section-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brand);
}

.project-grid {
  display: grid;
  gap: 1.25rem;
}

.project-card {
  border: 1px solid var(--oak);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.project-name {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--brand);
}

.project-desc { margin: 0 0 1rem; }

.project-links {
  font-weight: 600;
}

.project-links a ~ a { margin-top: 0.5rem; }

.project-links a {
  display: inline-block;
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.project-links a:hover,
.project-links a:focus-visible {
  color: var(--caramel);
  border-bottom-color: var(--caramel);
}

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--oak);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.875rem;
}

.site-footer p { margin: 0; }

/* ============ Responsive ============ */
@media (min-width: 640px) {
  .project-grid { grid-template-columns: 1fr 1fr; }
}

/* Touch devices: buttons stack full-width, labels always visible */
@media (hover: none) {
  .contact-list { flex-direction: column; }
  .contact-btn {
    width: 100%;
    max-width: none;
    grid-template-columns: 3rem 1fr;
    padding: 0 1.1rem 0 0;
  }
  .contact-btn:hover,
  .contact-btn:focus-visible {
    width: 100%;
    max-width: none;
    grid-template-columns: 3rem 1fr;
    padding: 0 1.1rem 0 0;
  }
  .btn-label { opacity: 1; }
}

/* Reduced motion: no transitions, labels always visible */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .contact-btn {
    max-width: none !important;
    grid-template-columns: 3rem 1fr !important;
    width: auto !important;
    padding: 0 1.1rem 0 0 !important;
  }
  .btn-label { opacity: 1 !important; }
}

/* ============ Utilities ============ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
