/* 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");
@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Momo+Trust+Display&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: "Lexend", sans-serif;
  --main-heading: "Staatliches", cursive;
  --subheading: "Momo Trust Display", 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-purple: #3a10e5;
  --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);
  color: var(--text-inverse);
  padding-bottom: 0.5rem;
  border-bottom: 1px dotted white;
  margin-bottom: 0.25rem;
}

h4 {
  font-size: 2rem;
  line-height: 1.4;
  font-weight: 100;
  font-family: monospace;
  margin-bottom: 4rem;
  text-align: center;
}

.session-heading {
  color: var(--color-purple);
}

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

pre {
  font-size: 0.2rem;
  padding: 0;
  font-family: monospace;
  text-align: left;
  margin-bottom: 2rem;
}
strong {
  font-weight: 600;
}
em {
  font-style: italic;
  font-weight: 400;
}

code {
  font-family: monospace;
  background: rgba(247, 238, 245, 0.9);
  border-radius: 0.5rem;
  padding: 0.125rem 0.25rem;
}

.badge-wrapper {
  text-align: center;
}

.subheading {
  color: var(--text-secondary);
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-image: var(--gradient);
  animation: bg-animation 120s infinite alternate;
}

.site-nav {
  width: 100%;
}
.nav-list {
  width: 100%;
  display: flex;
  flex-direction: row;
}
.site-nav-item {
  padding: 1rem;
  margin: 0;
}
.site-nav-link {
  display: inline-block;
  background: var(--color-yellow);
  color: var(--color-gray-dark);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: 1px solid black;
  border-radius: 1rem;
  transition: all 0.15s ease-in-out;
}

.site-nav-link:hover {
  background: var(--color-purple);
  color: var(--color-white);
  cursor: pointer;
  transform: translate(-4px, -8px);
  box-shadow: 8px 8px 0 0 black;
}

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

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

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

.dark-links {
  color: var(--color-purple);
}
.navigation-link {
  display: inline-block;
  font-size: 1.225rem;
  font-family: var(--body-typeface);
  margin-bottom: 1rem;
  line-height: 1.2;
  border-radius: 2rem;
  background: var(--color-blue-light);
  transition: all 0.15s ease-in-out;
}
.navigation-link:hover {
  background: var(--color-purple);
  color: var(--color-white);
  cursor: pointer;
  transform: translate(-4px, -8px);
  box-shadow: 8px 8px 0 0 black;
}

/* ===========================================================
   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 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  grid-auto-rows: 1fr;
  gap: 1rem;
  padding-top: 2rem;
}

/* Reusable content container for centered text blocks */
.text-section {
  text-align: left;
  width: 85%;
}

.text-section-center {
  text-align: center;
  width: 85%;
}
/* ===========================================================
   PAGE SECTIONS - HERO & CONTENT BLOCKS
   =========================================================== */

.intro-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-size: 400%;
  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 {
  width: 85%;
  color: var(--text-inverse);
}

.hero-headline,
.hero-subhead {
  color: var(--text-inverse);
}
.hero-text {
  font-size: 1.4rem;
}

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

.curriculum-anchor,
.concept-section,
.process-section,
.about-project,
.tools-skills,
.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;
}

.explore-ring,
.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,
.session {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  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: 2.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;
}

/* ===========================================================
   SUMMER CODING MENTORSHIP — CLEAN IDENTITY CARDS
   =========================================================== */

.student {
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}

/* ---------------------------
   CARD CONTAINER
---------------------------- */

.navigation-link {
  width: 100%;
  display: block;
  flex: 1;
  text-decoration: none;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  background: var(--color-blue-light);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.navigation-link:hover {
  transform: translate(-4px, -8px);
  box-shadow: 8px 8px 0 0 black;
}

/* ---------------------------
   META (program/year row)
---------------------------- */

.student-meta {
  display: flex;
  gap: 0.5rem;
  margin: 0 0 0.75rem 0;
  padding: 0;
  list-style: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px dotted white;
  margin-bottom: 1rem;
}

.student-program,
.student-year {
  font-size: 1.25rem;
  font-weight: 400;
  margin: 0;
}

/* ---------------------------
   TEXT LINES (NEW SYSTEM)
---------------------------- */

.student-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 0.5fr;
  gap: 0.5rem;
}
.badge {
  font-size: 0.9rem;
  font-weight: 300;
  margin: 0;
}

.grid-item {
  display: flex;
  flex-direction: column;
}

.grid-label {
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 300;
}

.grid-value {
  font-size: 1rem;
  font-weight: 500;
}

/* Each JS-generated line */
.student-line {
  font-size: 0.85rem;
  color: white;
  opacity: 0.9;
  line-height: 1.4;
  margin: 0;
}

/* Label emphasis (Name / Last Seen / etc) */
.student-line::first-letter {
  font-weight: 600;
}

/* ---------------------------
   OPTIONAL SUBTLE HIERARCHY
---------------------------- */

/* Make "Name" feel strongest */
.student-line:first-child {
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 1;
}

/* ===========================================================
   RETURNING STUDENT GLOW (1+ YEAR GAP RETURN)
   =========================================================== */

.student-return {
  position: relative;
}

/* soft outer glow */
.student-return::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 0.75rem;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 60%);
  filter: blur(6px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

/* subtle animated pulse */
@keyframes returnPulse {
  0% {
    opacity: 0.4;
    transform: scale(0.99);
  }
  50% {
    opacity: 0.8;
    transform: scale(1);
  }
  100% {
    opacity: 0.4;
    transform: scale(0.99);
  }
}

.student-return::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  animation: returnPulse 3s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

/* ===========================================================
   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);
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  pre {
    font-size: 1rem;
    padding: 2rem;
    text-align: center;
  }
}
