/* Adam Valine — personal portfolio
   Autumn-luxury: warm cream paper + burnt rust + honey gold + maple wine.
   Light, not dark. Editorial typography. */

:root {
  --bg: #f7ebd0;
  --bg-elev: #efe1bc;
  --bg-paper: #fbf3dd;
  --bg-deep: #e3d09a;
  --ink: #2a1d10;
  --ink-soft: #51371f;
  --ink-muted: #8a6c44;
  --ink-dim: #b9966b;

  /* Accent — driven by the adventure theme system. Default = burnt rust. */
  --accent: #b04a23;
  --accent-bright: #c95a2d;
  --accent-deep: #6e2418;

  /* Legacy aliases (kept so older selectors don't break during the transition). */
  --rust: var(--accent);
  --rust-bright: var(--accent-bright);
  --rust-deep: var(--accent-deep);

  --honey: #c89a4a;
  --honey-bright: #e0b466;
  --wine: #7a2e3b;
  --moss: #6e7544;
  --thread: #c4ad77;
  --thread-soft: #d8c294;

  --font-display: "Playfair Display", "Didot", serif;
  --font-body: "Cormorant Garamond", "Garamond", "Georgia", serif;
  --font-serif: var(--font-body);  /* legacy alias */
  --font-mono: "JetBrains Mono", "SF Mono", "Menlo", monospace;

  /* Theme-system variables (mutated by the adventure manifest). */
  --font-base: 18px;
  --line-height: 1.7;
  --radius: 0px;
  --density: 1;

  --maxw: 1180px;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --transition: 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--font-base);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition), color var(--transition);
}
body {
  margin: 0;
  min-height: 100dvh;
  line-height: var(--line-height);
  background:
    radial-gradient(ellipse 70% 40% at 30% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    radial-gradient(ellipse 60% 35% at 100% 30%, color-mix(in srgb, var(--honey) 8%, transparent), transparent 70%),
    var(--bg);
  transition: background-color var(--transition);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--rust); }
a:focus-visible { outline: 1px solid var(--rust); outline-offset: 4px; }

.mono { font-family: var(--font-mono); font-size: 0.84em; letter-spacing: 0.02em; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.005em; line-height: 1.05; color: var(--ink); margin: 0; }
.display em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--rust); }
.eyebrow { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--rust-deep); margin: 0 0 1.75rem; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 1.3rem var(--pad-x); background: rgba(247, 235, 208, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--thread-soft); }
.nav__brand { display: inline-flex; align-items: baseline; gap: 0.75rem; }
.nav__monogram { font-family: var(--font-display); font-style: italic; font-size: 1.6rem; font-weight: 500; color: var(--rust-deep); line-height: 1; }
.nav__wordmark { font-family: var(--font-display); font-style: italic; font-size: 1.05rem; font-weight: 400; color: var(--ink); letter-spacing: 0.04em; }
.nav__links { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; align-items: center; }
.nav__links a { color: var(--ink-muted); font-weight: 500; }
.nav__links a:hover { color: var(--rust); }
@media (max-width: 760px) { .nav__links { gap: 0.85rem; font-size: 0.62rem; letter-spacing: 0.12em; } .nav__wordmark { display: none; } }

/* ---- atmospheric banner ---- */
.atmospheric { margin: 0; max-width: 100%; overflow: hidden; aspect-ratio: 21 / 9; background: var(--bg-deep); position: relative; }
.atmospheric img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; filter: saturate(0.92) brightness(1.02); }
.atmospheric::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to bottom, transparent 60%, var(--bg) 100%); }
@media (max-width: 760px) { .atmospheric { aspect-ratio: 16 / 10; } }

/* ---- hero ---- */
.hero { padding: 5rem var(--pad-x) 5rem; position: relative; }
.hero__inner { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 820px) { .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; } }
.hero__copy { max-width: 60ch; }
.hero__title { font-size: clamp(3.2rem, 8vw, 6.5rem); margin: 0 0 1.5rem; font-weight: 600; }
.hero__sub { font-style: italic; font-size: clamp(1.15rem, 1.7vw, 1.35rem); color: var(--ink-soft); margin: 0 0 1.75rem; line-height: 1.6; }
.hero__sub em { color: var(--rust); font-style: italic; }
.hero__byline { color: var(--ink-muted); margin: 0 0 2.5rem; font-size: 0.86rem; }
.hero__byline a { color: var(--rust-deep); border-bottom: 1px solid var(--rust-deep); }
.hero__byline a:hover { color: var(--wine); border-bottom-color: var(--wine); }
.hero__cta { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.hero__portrait { margin: 0; position: relative; background: linear-gradient(160deg, var(--bg-elev) 0%, var(--bg-deep) 100%); border: 1px solid var(--thread); overflow: hidden; padding: 8px; box-shadow: 0 24px 60px -24px rgba(110, 36, 24, 0.35), 0 0 0 1px rgba(176, 74, 35, 0.05) inset; max-width: 480px; justify-self: center; width: 100%; }
.hero__portrait img { width: 100%; height: auto; display: block; aspect-ratio: 4 / 5; object-fit: cover; }
@media (max-width: 820px) { .hero__portrait { max-width: 380px; } }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; padding: 0.95rem 1.85rem; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; border: 1px solid transparent; background: transparent; font-weight: 500; transition: all var(--transition); cursor: pointer; }
.btn--primary { background: var(--rust); color: var(--bg); border-color: var(--rust); }
.btn--primary:hover { background: var(--rust-deep); color: var(--bg); transform: translateY(-1px); }
.btn--ghost { border-color: var(--ink-muted); color: var(--ink); }
.btn--ghost:hover { border-color: var(--rust-deep); color: var(--rust-deep); }

/* ---- sections ---- */
.section { padding: 7rem var(--pad-x); max-width: var(--maxw); margin: 0 auto; }
.section--paper { background: var(--bg-paper); max-width: none; margin: 0; padding: 7rem var(--pad-x); border-top: 1px solid var(--thread-soft); border-bottom: 1px solid var(--thread-soft); }
.section--paper > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section--alt { background: var(--bg-elev); max-width: none; margin: 0; padding: 6rem var(--pad-x); border-top: 1px solid var(--thread-soft); border-bottom: 1px solid var(--thread-soft); }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__header { text-align: center; margin-bottom: 4rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.section__title { font-size: clamp(2.2rem, 4.5vw, 3.4rem); margin: 0 0 1.5rem; }
.section__lede { color: var(--ink-soft); font-style: italic; font-size: 1.08rem; line-height: 1.7; max-width: 64ch; margin: 0 auto; }
.section__lede em { color: var(--rust); }
.section__lede a { color: var(--rust-deep); border-bottom: 1px solid var(--rust-deep); }
.section__lede a:hover { color: var(--wine); border-bottom-color: var(--wine); }

/* ---- projects ---- */
.projects { list-style: none; padding: 0; margin: 0; display: grid; gap: 3.5rem; }
.project { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: center; background: var(--bg); border: 1px solid var(--thread); padding: 1.85rem; transition: border-color var(--transition), transform var(--transition); }
.project:hover { border-color: var(--rust); transform: translateY(-1px); box-shadow: 0 12px 30px -12px rgba(176, 74, 35, 0.15); }
.project--reverse .project__img { order: 2; }
@media (max-width: 760px) { .project, .project--reverse { grid-template-columns: 1fr; gap: 1.75rem; } .project--reverse .project__img { order: 0; } }
.project__img { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--thread-soft); background: var(--bg-deep); }
.project__img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95); }
.project__copy { display: block; }
.project__slug { color: var(--rust); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; margin: 0 0 0.5rem; }
.project__name { font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 2.2vw, 1.55rem); font-weight: 500; color: var(--ink); margin: 0 0 1rem; line-height: 1.25; }
.project__bio { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.65; margin: 0 0 1.25rem; }
.project__bio em { color: var(--rust-deep); font-style: italic; }
.project__stack { color: var(--ink-muted); font-size: 0.76rem; letter-spacing: 0.04em; margin: 0; padding-top: 0.95rem; border-top: 1px dashed var(--thread-soft); }
.projects__epilogue { text-align: center; color: var(--ink-muted); font-style: italic; max-width: 60ch; margin: 3rem auto 0; }
.projects__epilogue a { color: var(--rust-deep); border-bottom: 1px solid var(--rust-deep); }

/* ---- elsewhere (parody portfolio) ---- */
.elsewhere { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.elsewhere__card { background: var(--bg-paper); border: 1px solid var(--thread); position: relative; display: flex; flex-direction: column; overflow: hidden; transition: border-color var(--transition), transform var(--transition); }
.elsewhere__card:hover { border-color: var(--rust); transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(176, 74, 35, 0.18); }
.elsewhere__thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-deep); border-bottom: 1px solid var(--thread-soft); }
.elsewhere__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 480ms cubic-bezier(0.2, 0.8, 0.2, 1); filter: saturate(0.96); }
.elsewhere__thumb:hover img { transform: scale(1.04); }
.elsewhere__url { color: var(--rust); font-size: 0.7rem; letter-spacing: 0.06em; margin: 1.5rem 1.75rem 0.75rem; }
.elsewhere__name, .elsewhere__desc, .elsewhere__visit { margin-left: 1.75rem; margin-right: 1.75rem; }
.elsewhere__visit { margin-bottom: 1.75rem; }
.elsewhere__name { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; font-weight: 500; color: var(--ink); margin: 0 0 0.85rem; }
.elsewhere__desc { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.65; margin: 0 0 1.25rem; flex-grow: 1; }
.elsewhere__desc em { color: var(--rust-deep); font-style: italic; }
.elsewhere__desc a { color: var(--rust-deep); border-bottom: 1px solid var(--ink-dim); font-size: 0.92em; }
.elsewhere__desc a:hover { color: var(--wine); border-bottom-color: var(--wine); }
.elsewhere__visit { font-family: var(--font-display); font-style: italic; font-size: 0.95rem; color: var(--rust); padding-top: 0.85rem; border-top: 1px dashed var(--thread-soft); margin-top: auto; }
.elsewhere__visit:hover { color: var(--wine); }

/* ---- connect ---- */
.connect { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; max-width: 920px; margin: 0 auto; }
.connect__card { padding: 1.85rem 1.75rem; background: var(--bg); border: 1px solid var(--thread); }
.connect__label { color: var(--rust); font-size: 0.74rem; letter-spacing: 0.06em; margin: 0 0 1rem; }
.connect__addr { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); margin: 0; font-style: italic; }
.connect__addr a { font-family: var(--font-mono); font-style: normal; color: var(--ink); border-bottom: 1px solid var(--ink-dim); font-size: 0.9em; }
.connect__addr a:hover { color: var(--rust-deep); border-bottom-color: var(--rust-deep); }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--thread); background: var(--bg-elev); padding: 3rem var(--pad-x) 2.5rem; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; text-align: center; }
.footer__name { font-family: var(--font-display); font-style: italic; font-size: 1.4rem; color: var(--rust-deep); margin: 0 0 0.4rem; }
.footer__sub { color: var(--ink-muted); font-size: 0.78rem; margin: 0; }
