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

:root {
  --bg:         #f5f2ec;
  --surface:    #fff;
  --ink:        #1a1714;
  --ink-muted:  #7a7269;
  --ink-faint:  #b8b0a5;
  --accent:     #2c5f8a;
  --accent-alt: #c85a3b;
  --rule:       #e4dfd8;
  --mono:       'DM Mono', monospace;
  --serif:      'DM Serif Display', serif;
  --sans:       'DM Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* GRAIN OVERLAY */
.grain {
  pointer-events: none;
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  z-index: 999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  animation: grain-shift 8s steps(1) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-3%, -5%); }
  20%  { transform: translate(5%, 2%); }
  30%  { transform: translate(-2%, 6%); }
  40%  { transform: translate(4%, -3%); }
  50%  { transform: translate(-5%, 1%); }
  60%  { transform: translate(2%, -4%); }
  70%  { transform: translate(-4%, 5%); }
  80%  { transform: translate(3%, -2%); }
  90%  { transform: translate(-1%, 4%); }
  100% { transform: translate(0, 0); }
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: relative;
  padding: 80px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.header-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 32px;
}

.header-accent {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% -10%, rgba(44, 95, 138, 0.08) 0%, transparent 70%);
  z-index: 1;
}

.header-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 20px;
  opacity: 0;
  animation: fade-up 0.6s ease 0.1s forwards;
}

.site-title {
  font-family: var(--serif);
  font-size: clamp(52px, 8vw, 88px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
  opacity: 0;
  animation: fade-up 0.6s ease 0.2s forwards;
}

.site-subtitle {
  font-family: var(--serif);
  font-size: clamp(14px, 2vw, 18px);
  color: var(--ink-muted);
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up 0.6s ease 0.3s forwards;
}

.header-meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  opacity: 0;
  animation: fade-up 0.6s ease 0.4s forwards;
}

.meta-pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--surface);
  background: var(--accent);
}

/* ============================================
   MAIN CONTENT
   ============================================ */

.main-content {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* ============================================
   UNIT SECTIONS
   ============================================ */

.unit {
  border-bottom: 1px solid var(--rule);
  padding: 64px 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  opacity: 0;
  animation: fade-up 0.5s ease forwards;
}

.unit:nth-child(1) { animation-delay: 0.5s; }
.unit:nth-child(2) { animation-delay: 0.6s; }
.unit:nth-child(3) { animation-delay: 0.7s; }
.unit:nth-child(4) { animation-delay: 0.8s; }

.unit:last-child {
  border-bottom: none;
}

/* Unit Header (left column) */
.unit-header {
  position: relative;
  padding-top: 4px;
}

.unit-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.unit-label2 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  animation: fade-up 0.7s ease both;
  animation-delay: 0.7s;
  
}

.unit-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 14px;
}

.unit-desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.65;
  font-weight: 300;
}

/* Unit Body (right column) */
.unit-body {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Section Groups */
.section-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

/* Assignment List */
.assignment-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.assignment-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.assignment-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: var(--accent);
  border-radius: 3px 0 0 3px;
  transition: width 0.18s ease;
}

.assignment-link:hover {
  background: rgba(44, 95, 138, 0.07);
}

.assignment-link:hover::before {
  width: 3px;
}

.assignment-link:hover .link-title {
  color: var(--accent);
}

.assignment-link:hover .link-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.link-num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  min-width: 20px;
  flex-shrink: 0;
}

.link-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--ink);
  flex: 1;
  transition: color 0.18s ease;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 28px 32px;
  text-align: center;
}

.footer-inner {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.footer-name {
  color: var(--ink-muted);
}

.footer-divider {
  color: var(--rule);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 680px) {
  .site-header {
    padding: 56px 0 40px;
  }

  .main-content {
    padding: 0 20px 60px;
  }

  .unit {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 48px 0;
  }

  .unit-header {
    padding-top: 0;
  }

  .unit-title {
    font-size: 22px;
  }

  .header-inner {
    padding: 0 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 6px;
  }

  .footer-divider {
    display: none;
  }
}



.row {
    align-items: flex-start;
}

.col-lg-3,
.col-lg-6 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    border: 1px solid var(--rule);
    border-radius: 10px;
}

/* Bootstrap Component Animations */

.animate-fade {
    opacity: 0;
    animation: fade-up 0.6s ease forwards;
}


.animate-delay-1 {
    animation-delay: .2s;
}

.animate-delay-2 {
    animation-delay: .4s;
}

.animate-delay-3 {
    animation-delay: .6s;
}

.animate-delay-4 {
    animation-delay: .8s;
}