/* ================================
   Stuy Classics — Classical Theme
   Palette: Imperial Purple, Antique Gold, White
   Fonts: Palatino body, Cinzel headings (loaded in HTML)
   ================================ */

:root{
  --bg: #fbfaf7;                 /* parchment */
  --ink: #2c2c2c;                /* text */
  --muted: #5a5a5a;

  --purple: #4b0082;             /* deep imperial purple */
  --purple-2: #6a0dad;           /* accent purple */
  --gold: #d4af37;               /* antique gold */
  --gold-soft: #e9d28a;

  --card: #ffffff;
  --shadow: 0 6px 20px rgba(0,0,0,.08);

  --radius: 14px;
  --speed: 220ms;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

body{
  font-family: "Palatino Linotype","Book Antiqua",Palatino,serif;
  background:
    radial-gradient(900px 300px at 20% 0%, rgba(212,175,55,.08), transparent 60%),
    radial-gradient(900px 300px at 80% 0%, rgba(75,0,130,.06), transparent 60%),
    var(--bg);
  margin: 0;
  color: var(--ink);
  line-height: 1.6;
  text-align: center;
}

h1,h2,h3, summary{
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  letter-spacing: .4px;
}

/* ================= Nav ================= */
nav{
  background: linear-gradient(180deg, #5a12a3, var(--purple));
  padding: 1em 2em;
  border-bottom: 4px double var(--gold);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  position: sticky; top: 0; z-index: 10;
}

nav ul{
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px;
}

nav a{
  color: #fff8dc;
  text-decoration: none;
  font-variant-caps: small-caps;
  font-weight: 700;
  letter-spacing: .3px;
  padding: .35em .6em;
  border-radius: 10px;
  transition: background var(--speed) var(--ease), transform var(--speed) var(--ease);
}

nav a:hover{
  background: rgba(255,255,255,.12);
  transform: translateY(-1px);
  text-decoration: none;
}

/* ================= Header ================= */
header{
  padding: 3em 2em;
  background:
    linear-gradient(180deg, #6a29b6, #4b0082 60%, #3c006b);
  color: white;
  position: relative;
  border-bottom: 6px double var(--gold);
}

header::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity:.8;
}

header h1{
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  margin: 0 0 .35em;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}

/* ================= Layout ================= */
main{
  padding: 2em;
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

section{
  margin-bottom: 2.2em;
  padding: 1.5em;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid #eadfd0;
  box-shadow: var(--shadow);
  position: relative;
}

/* classical ribbon at left edge */
section::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0; width:6px;
  background: linear-gradient(180deg, var(--gold), var(--gold-soft));
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
}

.study-section h3, h2{
  color: var(--purple);
  margin-top: 0;
  padding-bottom: .3em;
  border-bottom: 2px solid var(--gold);
}

/* ================= Links ================= */
a{
  color: #7d1a1a;                /* deep Roman red */
  text-decoration: none;
  font-weight: 700;
}
a:hover{ color: var(--ink); text-decoration: underline; }

/* ================= Study Lists ================= */
.study-section ul{
  list-style: none;
  padding-left: 0;
  text-align: left;
  display: inline-block;
  margin: .2em 0 0;
}
.study-section li{
  margin: .5em 0;
  padding-left: 1.2em;
  position: relative;
}
.study-section li::before{
  content: "»";
  position: absolute; left: 0; top: 0;
  color: var(--purple-2);
}

/* ================= Elegant <details> ================= */
details{
  margin: 1em auto;
  max-width: 720px;
  background: #fff;
  border: 1px solid #eadfd0;
  border-radius: 12px;
  text-align: left;
  box-shadow: var(--shadow);
  transition:
    border-color var(--speed) var(--ease),
    transform var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}
details:hover{
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(0,0,0,.12);
}

summary{
  list-style: none;
  cursor: pointer;
  font-size: 1.15em;
  font-weight: 700;
  color: var(--purple);
  padding: .9em 1em;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  background:
    linear-gradient(180deg, rgba(212,175,55,.12), rgba(212,175,55,0) 65%);
  border-bottom: 1px solid #efe6d9;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
summary::-webkit-details-marker{ display:none; }

summary::after{
  content:"▸";
  color: var(--muted);
  transition: transform var(--speed) var(--ease), color var(--speed) var(--ease);
  font-size: .95em;
}
details[open] > summary::after{
  transform: rotate(90deg);
  color: var(--gold);
}

.win-list, details > ul{
  padding: .9em 1.1em 1.2em;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}
details[open] .win-list,
details[open] > ul{
  opacity: 1;
  transform: translateY(0);
}

.win-list p{ margin: .35em 0; }

/* ================= Responsiveness ================= */
@media (max-width: 600px){
  nav ul{ flex-direction: column; gap: 10px; }
  header{ padding: 2.2em 1.2em; }
  main{ padding: 1.2em; }
}

/* ================= Focus & Motion ================= */
:focus-visible{
  outline: 3px solid rgba(212,175,55,.6);
  outline-offset: 2px;
  border-radius: 8px;
}
@media (prefers-reduced-motion: reduce){
  *{ transition: none !important; }
}
