/* Typography imported from Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&family=Staatliches&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@400..800&display=swap");

/* ===========================================================
   CSS BASE STYLES
   =========================================================== */

/* Paul Irish popularized border-box, which includes padding 
   and borders in element dimensions for more intuitive layouts. */

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*,
*:before,
*:after {
  box-sizing: inherit;
}

/* ===========================================================
   DESIGN SYSTEM & VARIABLES
   =========================================================== */

/* CSS Variables let us reuse colors and values */

:root {
  --accent-color: #555;
  --body-typeface: "Rubik", sans-serif;
  --main-heading: "Staatliches", cursive;
  --subheading: "Syne", sans-serif;
  --gradient: linear-gradient(45deg, rgb(36, 170, 219), #0c779e);
  --color-yellow: #ffc83d;
  --color-blue-dark: #0c779e;
  --color-blue-light: rgb(36, 170, 219);
  --color-white: #fff;
  --color-black: #111;
  --color-gray-dark: #222;
  --color-gray-medium: #555;
  --color-gray-light: #666;
  --bg-primary: var(--color-white);
  --bg-secondary: var(--color-yellow);
  --bg-accent: var(--gradient);
  --text-primary: var(--color-gray-dark);
  --text-secondary: var(--color-black);
  --text-inverse: var(--color-white);
}

/* ===========================================================
   BASE LAYOUT & GLOBAL ELEMENTS
   =========================================================== */

body {
  font-family: var(--body-typeface);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Making all images responsive - they'll never overflow their container */
img {
  max-width: 100%;
  height: auto;
}

/* ===========================================================
   TYPOGRAPHY SYSTEM
   =========================================================== */

h1 {
  font-size: 3.5rem;
  font-family: var(--subheading);
  margin-bottom: 1rem;
  font-weight: 600;
}

h2 {
  font-size: 2.25rem;
  font-family: var(--subheading);
  font-weight: 500;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

h3 {
  font-size: 2rem;
  font-family: var(--subheading);
  margin-bottom: 1.5rem;
  color: var(--text-inverse);
}

p,
li {
  font-size: 1.325rem;
  font-family: var(--body-typeface);
  line-height: 1.3;
  margin-bottom: 1rem;
}

strong {
  font-weight: 600;
}
em {
  font-style: italic;
  font-weight: 400;
}
.subheading {
  color: var(--text-secondary);
}

/* ===========================================================
   INTERACTIVE ELEMENTS
   =========================================================== */

a {
  text-decoration: none;
  color: var(--text-inverse);
  font-weight: 600;
}

a:hover {
  color: var(--text-secondary);
}

.navigation-link {
  display: block;
  font-size: 1.225rem;
  font-family: var(--body-typeface);
  margin-bottom: 1rem;
  line-height: 1.2;
  padding: 1rem 2rem;
  border-radius: 2rem;
  border: 3px solid var(--color-white);
  background: var(--color-blue-light);
  text-align: center;
}
.navigation-link:hover {
  background: var(--bg-primary);
  border: 3px solid var(--color-blue-light);
}

/* ===========================================================
   DECORATIVE & ANIMATED ELEMENTS
   =========================================================== */

.ornamental {
  text-align: center;
  font-size: 4rem;
}

.spin {
  display: inline-block;
  animation: spin 20s linear infinite;
}

.spin:nth-child(2) {
  animation-delay: 0.3s;
}
.spin:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ===========================================================
   LAYOUT COMPONENTS
   =========================================================== */

.student,
.mentor {
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
  margin-bottom: 2rem;
  padding: 1rem;
}

/* Reusable content container for centered text blocks */
.text-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 85%;
}

/* ===========================================================
   PAGE SECTIONS - HERO & CONTENT BLOCKS
   =========================================================== */

.intro-section {
  min-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: 600%;
  background-image: var(--gradient);
  animation: bg-animation 120s infinite alternate;
  padding: 3rem;
}
@keyframes bg-animation {
  0% {
    background-position: 0%;
  }
  100% {
    background-position: 100%;
  }
}
.hero-headline-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 85%;
  color: var(--text-inverse);
}

.hero-headline {
  color: var(--text-inverse);
}

/* ===========================================================
   CONTENT SECTION GROUPS
   =========================================================== */

.explore-ring,
.concept-section,
.process-section,
.about-project,
.project-log-teaser {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3rem;
}

.methodology-section,
.how-it-works {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: var(--bg-accent);
  color: var(--text-inverse);
  padding: 3rem;
}
.what-is-webring,
.student-hub,
.reflection-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 3rem;
}

/* Special sections */

.mentorship-showcase {
  background-image: url("assets/lily-rosen--taylore-lawrence.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
}

.footer {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: 600%;
  background-image: var(--gradient);
  animation: bg-animation 120s infinite alternate;
  padding: 1rem;
}

/* ===========================================================
   COURSE-SPECIFIC COMPONENTS
   =========================================================== */

.course-context {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.course-context a {
  color: var(--text-secondary); /* black */
  text-decoration: underline;
  font-weight: 600;
}

.course-context a:hover {
  color: var(--color-blue-light);
}
.course-outcomes {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.course-outcomes li {
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 6px;
}

/* Student groups */
.student-group {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

/* Mentor group - distinct styling */
.mentor-group {
  width: 100%;
  background: rgba(52, 152, 219, 0.08);
  border-radius: 12px;
  padding: 1.5rem;
  border: 1px solid rgba(52, 152, 219, 0.3);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

/* ===========================================================
   WEB RING COMPONENTS
   =========================================================== */

/* ===========================================================
   IDEA Web Ring Banner Styles
   --------------------------------------
   Styles for the inline “Previous | IDEA Web Ring | Next” 
   navigation links (web ring). 

   - Use with <nav class="webring" data-members="/webring-members-coding-club.json" data-hub="/"> container
   - Links: .webring-previous, .webring-next, .webring-hub
   - Divider between links: .divider
   =========================================================== */

.webring {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem; /* space between items */
  background: linear-gradient(135deg, #6a5af9, #f95a8a);
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.15);
  justify-content: center;
  margin-bottom: 1rem;
}

/* Individual links */
.webring-previous,
.webring-next,
.webring-hub {
  color: white;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  transition: background 0.3s;
}

.webring-previous:hover,
.webring-next:hover,
.webring-hub:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Divider between links */
.divider {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* ===========================================================
   IDEA Web Ring Page View Counter
   --------------------------------------
   Global page view counter using EnhancedCounter for persistent,
   cross-device view tracking.

   - Uses EnhancedCounter with localStorage + API verification
   - Creates unique counters for each page path
   - Automatically increments on each page load
   - Displays count in element with ID 'viewCount'

   Usage: Add <div class="page-counter">👁️ <span id="viewCount">—</span> views</div>
   =========================================================== */

.page-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  background: linear-gradient(135deg, #6a5af9, #f95a8a);
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: white;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.15);
  justify-content: center;
  margin-bottom: 1rem;
  font-variant-numeric: tabular-nums;
  cursor: default;
  user-select: none;
  transition: background 0.3s; /* Add transition for smooth hover */
}

/* Match the webring nav hover exactly */
.page-counter:hover {
  background: rgba(255, 255, 255, 0.2);
}
