/* =========================================================
   Dyllan Démétrios — portfolio
   Tokens : encre #12100E · os #E8E1D3 · laiton #A9863F
            violet #5B4B8A · braise #B4502E · pierre #3A362F
   ========================================================= */

:root {
  --ink: #12100E;
  --ink-raised: #181512;
  --bone: #E8E1D3;
  --bone-dim: #ACA595;
  --brass: #A9863F;
  --violet: #8778BB;
  --ember: #C96038;
  --stone: #3A362F;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--stone);
  padding: 22px 0;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}

.site-title a { color: var(--bone); }

.site-role {
  font-size: 0.78rem;
  color: var(--bone-dim);
  margin: 0;
  letter-spacing: 0.02em;
}

.site-role-sub {
  font-size: 0.72rem;
  color: var(--brass);
  margin: 0;
  letter-spacing: 0.03em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  margin-left: auto;
}

.site-nav a {
  color: var(--bone-dim);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--bone);
  border-bottom-color: var(--brass);
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 14px;
  min-width: 190px;
  background: var(--ink-raised);
  border: 1px solid var(--stone);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 20;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 8px 18px;
  color: var(--bone-dim);
  font-size: 0.9rem;
  white-space: nowrap;
  border-bottom: none;
}

.nav-dropdown a:hover {
  color: var(--bone);
}

.header-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  padding-left: 20px;
  border-left: 1px solid var(--stone);
}

.header-links > a {
  color: var(--bone-dim);
  font-size: 0.95rem;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.header-links > a:hover {
  color: var(--bone);
  border-bottom-color: var(--brass);
}

.header-links .socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-links .socials a {
  display: inline-flex;
  color: var(--bone-dim);
  border-bottom: none;
  transition: color 0.15s ease;
}

.header-links .socials a:hover {
  color: var(--brass);
}

.header-links .socials svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------- hero ---------- */

.hero {
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--stone);
}

.hero .kicker {
  font-size: 0.85rem;
  color: var(--brass);
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.25;
  max-width: 100%;
  margin: 0 0 22px;
}

.hero p {
  max-width: 100%;
  color: var(--bone-dim);
  font-size: 1.05rem;
}

.hero .hero-tags {
  color: var(--brass);
  font-size: 0.95rem;
  margin-top: 8px;
}

.hero .hero-signature {
  font-style: italic;
  color: var(--bone-dim);
  font-size: 0.95rem;
  margin-top: 28px;
}

/* ---------- pillar list (home, legacy) ---------- */

.pillars {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  border-top: 1px solid var(--stone);
}

.pillars li {
  border-bottom: 1px solid var(--stone);
}

/* ---------- projects (home) ---------- */

.section-head {
  padding: 48px 0 8px;
}

.section-head .kicker {
  font-size: 0.85rem;
  color: var(--bone-dim);
  margin: 0;
}

.project-category {
  padding-top: 40px;
}

.project-category:first-of-type {
  padding-top: 24px;
}

.project-category > h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.6rem;
  margin: 0 0 20px;
}

.section-lead {
  color: var(--bone-dim);
  max-width: 100%;
  margin: 0 0 6px;
}

.section-lead-tags {
  color: var(--brass);
  font-size: 0.9rem;
  margin: 0 0 20px;
}

.pillars a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
}

.pillars a:hover .pillar-name { color: var(--bone); }
.pillars a:hover .pillar-go { transform: translateX(4px); }

.pillar-index {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--bone-dim);
  width: 2.5em;
  flex-shrink: 0;
}

.pillar-body { flex: 1; }

.pillar-name {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--bone-dim);
  transition: color 0.15s ease;
  display: block;
}

.pillar-desc {
  color: var(--bone-dim);
  font-size: 0.95rem;
  margin-top: 4px;
}

.pillar-go {
  color: var(--bone-dim);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.pillars li:nth-child(1) .pillar-name { border-left: 2px solid var(--ember); padding-left: 14px; }
.pillars li:nth-child(2) .pillar-name { border-left: 2px solid var(--brass); padding-left: 14px; }
.pillars li:nth-child(3) .pillar-name { border-left: 2px solid var(--violet); padding-left: 14px; }
.pillars li:nth-child(4) .pillar-name { border-left: 2px solid var(--ember); padding-left: 14px; }

/* ---------- page header (sub-pages) ---------- */

.page-head {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--stone);
}

.page-head .kicker {
  font-size: 0.85rem;
  color: var(--bone-dim);
  margin-bottom: 10px;
}

.page-head h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0;
}

.page-head p {
  color: var(--bone-dim);
  max-width: 72ch;
  margin-top: 14px;
}

.page-head .entry-link {
  display: inline-block;
  margin-top: 14px;
}

.page-head .entry-links {
  margin-top: 14px;
}

/* ---------- work entries (games / novels) ---------- */

.entries {
  padding-top: 8px;
  padding-bottom: 80px;
}

.entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 36px 0;
  border-bottom: 1px solid var(--stone);
}

.entry:first-of-type { padding-top: 0; }

.entry-accent {
  font-size: 0.8rem;
  color: var(--accent, var(--brass));
  text-transform: none;
}

.entry h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.55rem;
  margin: 0;
}

.entry p {
  color: var(--bone-dim);
  max-width: 80ch;
  margin: 0;
}

.entry p + p {
  margin-top: 14px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.tag {
  font-size: 0.78rem;
  color: var(--bone-dim);
  border: 1px solid var(--stone);
  padding: 4px 10px;
  border-radius: 2px;
}

.tag--role {
  color: var(--accent, var(--brass));
  border-color: var(--accent, var(--brass));
}

.entry-link {
  color: var(--accent, var(--brass));
  font-size: 0.95rem;
  border-bottom: 1px solid currentColor;
  width: fit-content;
  transition: color 0.15s ease;
}

.entry-link:hover {
  color: var(--bone);
}

.entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.entry-links .entry-link { margin: 0; }

.entry--game { --accent: var(--ember); }
.entry--novel-chrones { --accent: var(--brass); }
.entry--novel-anandavira { --accent: var(--brass); }
.entry--poetry { --accent: var(--ember); }
.entry--boardgame { --accent: var(--violet); }
.entry--concept { --accent: var(--brass); }

/* ---------- project grid (hover cards) ---------- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px 24px;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 80px;
}

.project-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.project-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--stone);
}

.project-card-media {
  position: absolute;
  inset: 0;
  background-image: var(--card-image, none), linear-gradient(155deg, var(--stone), var(--ink-raised));
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card-media,
.project-card:focus-visible .project-card-media {
  transform: scale(1.05);
}

.project-card-label {
  position: absolute;
  left: 0; right: 0; top: 0;
  padding: 16px 18px;
  background: linear-gradient(to bottom, rgba(18, 16, 14, 0.92), transparent);
}

.project-card-label .project-card-kicker {
  font-size: 0.75rem;
  color: var(--accent, var(--brass));
  margin: 0 0 4px;
}

.project-card-label h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--bone);
  margin: 0;
}

.project-card-badge {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-size: 0.72rem;
  color: var(--accent, var(--brass));
  border: 1px solid var(--accent, var(--brass));
  background: rgba(18, 16, 14, 0.78);
  padding: 4px 10px;
  border-radius: 2px;
  transition: opacity 0.25s ease;
}

.project-card:hover .project-card-badge,
.project-card:focus-visible .project-card-badge {
  opacity: 0;
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  background: rgba(18, 16, 14, 0.82);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.project-card:hover .project-card-overlay,
.project-card:focus-visible .project-card-overlay {
  opacity: 1;
}

.project-card-overlay .project-card-kicker {
  font-size: 0.75rem;
  color: var(--accent, var(--brass));
  margin: 0 0 4px;
}

.project-card-overlay h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--bone);
  margin: 0 0 8px;
}

.project-card-overlay p.project-card-desc {
  color: var(--bone-dim);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0 0 12px;
}

.project-card-overlay p.project-card-role {
  font-size: 0.75rem;
  color: var(--accent, var(--brass));
  margin: 0 0 4px;
}

.project-card-overlay .entry-meta + .entry-meta {
  margin-top: 8px;
}

.project-card-overlay .entry-meta { margin-top: 0; }

.project-card--game { --accent: var(--ember); }
.project-card--boardgame { --accent: var(--violet); }
.project-card--novel-chrones { --accent: var(--brass); }
.project-card--novel-anandavira { --accent: var(--brass); }
.project-card--poetry { --accent: var(--ember); }

.project-secondary-link {
  color: var(--brass);
  font-size: 0.88rem;
  border-bottom: 1px solid transparent;
  width: fit-content;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.project-secondary-link:hover {
  color: var(--bone);
  border-bottom-color: var(--brass);
}

@media (max-width: 700px) {
  .project-card-overlay { opacity: 1; }
}

/* ---------- back link (dedicated project pages) ---------- */

.back-link-wrap {
  padding: 24px 0 0;
}

.back-link {
  display: inline-block;
  color: var(--bone-dim);
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.back-link:hover {
  color: var(--bone);
  border-bottom-color: var(--brass);
}

/* ---------- button ---------- */

.btn {
  display: inline-block;
  width: fit-content;
  border: 1px solid var(--brass);
  color: var(--brass);
  padding: 10px 22px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  background: var(--brass);
  color: var(--ink);
}

/* ---------- moodboard ---------- */

.board-group {
  padding: 44px 0;
  border-bottom: 1px solid var(--stone);
}

.board-group:first-of-type { padding-top: 8px; }
.board-group:last-of-type { border-bottom: none; }

.board-group h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin: 0 0 6px;
  border-left: 2px solid var(--accent, var(--brass));
  padding-left: 14px;
}

.board-group .group-desc {
  color: var(--bone-dim);
  max-width: 74ch;
  margin: 0 0 28px;
}

.board-group--anandavira { --accent: var(--brass); }
.board-group--francia { --accent: var(--violet); }
.board-group--immarcescible { --accent: var(--brass); }

.board-block {
  margin-bottom: 30px;
}

.board-block:last-child { margin-bottom: 0; }

.board-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  margin-bottom: 10px;
}

.board-head h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--bone);
  margin: 0;
}

.moodboard-embed {
  min-height: 200px;
  max-width: 100%;
  overflow-x: auto;
}

.moodboard-note {
  border: 1px dashed var(--stone);
  padding: 22px 24px;
  color: var(--bone-dim);
  font-size: 0.92rem;
  margin: 0 0 40px;
}

.moodboard-note code {
  color: var(--bone);
  background: var(--ink-raised);
  padding: 1px 6px;
  border-radius: 2px;
}

/* ---------- contact ---------- */

.contact-section {
  padding-top: 64px;
  padding-bottom: 72px;
  border-top: 1px solid var(--stone);
  text-align: center;
}

.contact-section h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 14px;
}

.contact-section .lead {
  color: var(--bone-dim);
  max-width: 58ch;
  margin: 0 auto 32px;
}

.contact-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 26px;
  margin-bottom: 32px;
}

.contact-socials a {
  display: inline-flex;
  color: var(--bone-dim);
  border-bottom: none;
  transition: color 0.15s ease;
}

.contact-socials a:hover { color: var(--brass); }

.contact-socials svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-email {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--bone);
  border-bottom: 1px solid var(--brass);
  padding-bottom: 4px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-email:hover {
  color: var(--brass);
}

/* ---------- footer ---------- */

.site-footer {
  padding: 0;
  color: var(--bone-dim);
  font-size: 0.88rem;
}


@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 700px) {
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 14px; }

  .site-nav {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 2px;
    margin-left: 0;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav a { white-space: nowrap; }

  .pillars a { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pillars a .pillar-go { display: none; }

  .board-head { flex-direction: column; align-items: flex-start; }

  .header-links { width: 100%; justify-content: space-between; padding-left: 0; border-left: none; }
}

@media (max-width: 480px) {
  .hero { padding: 56px 0 48px; }
  .contact-section { padding-top: 48px; padding-bottom: 56px; }
  .page-head { padding: 40px 0 32px; }
}
