@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Manrope:wght@300;400;500;700&display=swap');

:root {
  --bg: #fefdf8;
  --ink: #1c1a10;
  --yellow: #e8c912;
  --yellow-soft: #fef9c3;
  --amber: #d97706;
  --gray: #6b7280;
  --light-gray: #f3f0e6;
  --border: #e7e2cc;
  --card: #ffffff;
  --blue: #1d4ed8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Manrope', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* Ruled paper lines */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    transparent,
    transparent 27px,
    rgba(232,201,18,0.08) 27px,
    rgba(232,201,18,0.08) 28px
  );
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 48px 24px 80px; }

/* Header */
.page-header { margin-bottom: 48px; }
.dept-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; font-weight: 700; }

h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 14px;
  display: inline-block;
}

.subtitle { margin-top: 20px; font-size: 1.05rem; color: var(--gray); max-width: 60ch; line-height: 1.75; }

/* Concept tags */
.concept-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 48px; }
.concept {
  background: var(--yellow-soft);
  border: 1px solid var(--yellow);
  color: var(--ink);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: default;
  transition: background 0.2s;
}
.concept:hover { background: var(--yellow); }

/* Section */
section { margin-bottom: 48px; }

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.section-num {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--amber);
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 16px;
  transition: box-shadow 0.25s, border-color 0.25s;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  border-radius: 8px 0 0 8px;
  transition: background 0.25s;
}

.card:hover { box-shadow: 0 4px 24px rgba(0,0,0,0.07); border-color: var(--yellow); }
.card:hover::before { background: var(--yellow); }

.card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--amber);
  margin-bottom: 12px;
  font-style: italic;
}

.card p { color: var(--gray); line-height: 1.8; font-size: 0.97rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }

.card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.card ul li { color: var(--gray); font-size: 0.94rem; line-height: 1.65; padding-left: 20px; position: relative; }
.card ul li::before { content: '—'; position: absolute; left: 0; color: var(--yellow); font-weight: 700; }

/* Formula box */
.formula {
  background: var(--yellow-soft);
  border-left: 4px solid var(--yellow);
  border-radius: 0 6px 6px 0;
  padding: 14px 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.92rem;
  color: var(--ink);
  margin: 14px 0;
  letter-spacing: 0.01em;
}

/* Curve sketch box */
.sketch-box {
  background: var(--light-gray);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin: 14px 0;
}

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag { background: var(--yellow-soft); border: 1px solid var(--yellow); color: var(--ink); padding: 4px 13px; border-radius: 4px; font-size: 0.8rem; }

@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
