@charset "UTF-8";

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  --accent:       #03a9f4;
  --accent-dark:  #0280c0;
  --bg:           #f4f1ec;
  --surface:      rgba(240, 230, 220, 0.75);
  --text:         #333;
  --text-muted:   #555;
  --heading:      #111;
  --shadow-sm:    0 0 8px rgba(0, 0, 0, 0.15);
  --shadow-md:    0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-section: 0 -1px 10px rgba(0, 0, 0, 0.2);
  --radius:       8px;
  --transition:   0.3s ease;
  --font-serif:   'Noto Serif', Georgia, serif;
}

/* Dark mode overrides */
.dark-mode {
  --bg:       #1a1a1a;
  --surface:  rgba(40, 40, 40, 0.85);
  --text:     #ddd;
  --text-muted: #aaa;
  --heading:  #f0f0f0;
  --shadow-sm: 0 0 8px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-section: 0 -1px 10px rgba(0, 0, 0, 0.6);
}


/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

article, aside, footer, header, main, nav, section {
  display: block;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  transition: background-color var(--transition), color var(--transition);
}


/* ============================================
   Typography
   ============================================ */
h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 0.75rem;
  color: var(--heading);
  line-height: 1.2;
  transition: color var(--transition);
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin-bottom: 0.5rem;
  color: var(--heading);
  transition: color var(--transition);
}

p {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.75rem;
  transition: color var(--transition);
}

p.comment {
  color: var(--text-muted);
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin-top: 0.5rem;
  transition: color var(--transition), border-color var(--transition);
}


/* ============================================
   Header / Hero
   ============================================ */
#title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #000;
  overflow: hidden;
}

/* Subtle grain texture overlay */
#title::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(2.5rem, 8vw, 6rem);
  position: absolute;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.hero-outline {
  color: transparent !important;
  -webkit-text-stroke: 2px var(--accent);
}

.hero-fill {
  color: var(--accent) !important;
  animation: wave 4s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% {
    clip-path: polygon(
      0% 45%, 16% 44%, 33% 50%, 54% 60%,
      70% 61%, 84% 59%, 100% 52%, 100% 100%, 0% 100%
    );
  }
  50% {
    clip-path: polygon(
      0% 60%, 15% 65%, 34% 66%, 51% 62%,
      67% 50%, 84% 45%, 100% 46%, 100% 100%, 0% 100%
    );
  }
}


/* ============================================
   Dark Mode Toggle Button
   ============================================ */
.btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 8px 14px;
  border-radius: 100px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  background: rgba(3, 169, 244, 0.25);
  border-color: var(--accent);
}

.btn-icon {
  font-size: 1rem;
}


/* ============================================
   Bounce Arrow
   ============================================ */
.arrow {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background-image: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MTIgNTEyIiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxwYXRoIGZpbGw9IiNGRkZGRkYiIGQ9Ik0yOTMuNzUxLDQ1NS44NjhjLTIwLjE4MSwyMC4xNzktNTMuMTY1LDE5LjkxMy03My42NzMtMC41OTVsMCwwYy0yMC41MDgtMjAuNTA4LTIwLjc3My01My40OTMtMC41OTQtNzMuNjcyICBsMTg5Ljk5OS0xOTBjMjAuMTc4LTIwLjE3OCw1My4xNjQtMTkuOTEzLDczLjY3MiwwLjU5NWwwLDBjMjAuNTA4LDIwLjUwOSwyMC43NzIsNTMuNDkyLDAuNTk1LDczLjY3MUwyOTMuNzUxLDQ1NS44Njh6Ii8+DQo8cGF0aCBmaWxsPSIjRkZGRkZGIiBkPSJNMjIwLjI0OSw0NTUuODY4YzIwLjE4LDIwLjE3OSw1My4xNjQsMTkuOTEzLDczLjY3Mi0wLjU5NWwwLDBjMjAuNTA5LTIwLjUwOCwyMC43NzQtNTMuNDkzLDAuNTk2LTczLjY3MiAgbC0xOTAtMTkwYy0yMC4xNzgtMjAuMTc4LTUzLjE2NC0xOS45MTMtNzMuNjcxLDAuNTk1bDAsMGMtMjAuNTA4LDIwLjUwOS0yMC43NzIsNTMuNDkyLTAuNTk1LDczLjY3MUwyMjAuMjQ5LDQ1NS44Njh6Ii8+DQo8L3N2Zz4=");
  background-size: contain;
  z-index: 2;
  text-decoration: none;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40%  { transform: translateX(-50%) translateY(-20px); }
  60%  { transform: translateX(-50%) translateY(-10px); }
}


/* ============================================
   Content / Slide Layout
   ============================================ */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
}

.slide {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  box-shadow: var(--shadow-section);
  padding: 40px 5%;
  background: var(--bg);
  transition: background-color var(--transition);
}

.slide:nth-child(even) {
  background: color-mix(in srgb, var(--bg) 95%, var(--accent) 5%);
}


/* ============================================
   Cards
   ============================================ */
.container {
  flex: 1 1 300px;
  margin: 20px;
  padding: 28px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(4px);
  transition: box-shadow var(--transition), transform var(--transition),
              background var(--transition), opacity 0.5s ease, transform 0.5s ease;

  /* Scroll-reveal initial state */
  opacity: 0;
  transform: translateY(24px);
}

.container.visible {
  opacity: 1;
  transform: translateY(0);
}

.container:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Ensure hover doesn't conflict with reveal animation */
.container.visible:hover {
  transform: translateY(-3px);
}


/* ============================================
   Star Rating
   ============================================ */
.checked {
  color: orange;
}

.rating {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .rating {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.rating .fa-star {
  font-size: 1.4rem;
  margin: 2px;
}


/* ============================================
   Resources Section
   ============================================ */
.resources {
  text-align: center;
  padding: 80px 10%;
  width: 100%;
  box-shadow: var(--shadow-section);
  background: var(--bg);
  transition: background-color var(--transition);
}

.resources h2 {
  margin-bottom: 24px;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.resources a {
  display: inline-block;
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.6;
  color: var(--accent);
  text-decoration: none;
  margin: 6px 0;
  transition: color var(--transition), text-decoration-color var(--transition);
}

.resources a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.scale {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 32px;
  font-style: italic;
  transition: color var(--transition);
}


/* ============================================
   Back-to-Top Button
   ============================================ */
#myBtn {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 20px;
  z-index: 99;
  text-decoration: none;
  padding: 10px 16px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: #fff;
  background: #000;
  border-radius: 100px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: background var(--transition), box-shadow var(--transition);
}

#myBtn:hover {
  background: #333;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}


/* ============================================
   Footer
   ============================================ */
footer {
  padding: 40px;
  background-color: #000;
  text-align: center;
}

footer p {
  color: var(--accent);
  font-size: 0.9rem;
}

footer a {
  color: var(--accent);
  transition: opacity var(--transition);
}

footer a:hover {
  opacity: 0.75;
}


/* ============================================
   Responsive — Tablet (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
  .slide {
    padding: 24px 4%;
  }

  .container {
    flex: 1 1 260px;
    margin: 14px;
    padding: 22px 18px;
  }
}


/* ============================================
   Responsive — Mobile (≤ 600px)
   ============================================ */
@media (max-width: 600px) {
  .hero-content h1 {
    font-size: clamp(1.8rem, 10vw, 3.5rem);
    white-space: normal;
    text-align: center;
    width: 90vw;
  }

  .slide {
    flex-direction: column;
    padding: 20px 4%;
    box-shadow: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .dark-mode .slide {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  .container {
    margin: 10px 0;
    flex: 1 1 auto;
  }

  .resources {
    padding: 50px 6%;
  }

  .btn {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
}