/* VARIABLES & BASE */
:root {
  --bg-color: #0f0f1a;
  --text-color: #eaeaea;
  --accent: #8a2be2;
  --nav-bg: rgba(15, 15, 26, 0.9);
}

body.light {
  --bg-color: #ffffff;
  --text-color: #111111;
  --nav-bg: rgba(255, 255, 255, 0.9);
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
}

canvas#dotmatrix {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
}

/* LAYOUT & NAVIGATION */
header {
  position: sticky;
  top: 0;
  background-color: var(--nav-bg);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  backdrop-filter: blur(8px);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
}

.logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* Default: (dark mode) */
.logo-dark { display: inline; vertical-align: middle; }
.logo-light { display: none; vertical-align: middle; }

/* Light mode */
body.light .logo-dark { display: none; }
body.light .logo-light { display: inline; }

/* Ensure text aligns nicely */
.logo span {
  margin-left: 8px;
  font-weight: bold;
  font-size: 1.5rem;
  vertical-align: middle;
}



.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

#mode-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-color);
}

/* INTRO SECTION */
.intro {
  max-width: 800px;
  margin: 10rem auto;
  text-align: center;
  padding: 2rem;
}

.intro h1 {
  font-size: 3.2rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.intro p {
  font-size: 1.01rem;
  opacity: 0.8;
}

.intro a {
  color: var(--accent);
}
/* CONTACTS */
.contacts {
  max-width: 1100px;
  margin: 4rem auto;
  margin-bottom: 1rem;
  margin-top: 4rem;
  padding: 2rem;
  text-align: center;
}

.contacts h2 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0rem;
}

.contacts p {
  font-size: 0.8rem;
  opacity: 0.8;
  text-align: left;
  max-width: fit-content;
}

.contacts p strong {
  font-size: 0.8rem;
  opacity: 1;
  text-align: left;
  max-width: fit-content;
}
/* Mobile */
@media (max-width: 768px) {
  .contacts p {
    font-size: 0.6rem;
    opacity: 0.8;
    text-align: left;
    max-width: fit-content;
  }

  .contacts strong {
    font-size: 0.7rem;
    opacity: 1;
    text-align: left;
    max-width: fit-content;
  }
}

/* Default desktop */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(30, 30, 50, 0.9);
  border: 1px solid var(--accent);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
  transition: transform 0.3s ease;
  text-align: center;
  backdrop-filter: blur(4px);
}

.extra-info {
  color: #ccc;
}

.extra-info ul {
  list-style: none;/* remove bullets introduced by browser default */
  padding: 0;
  margin-top: 0.5rem;
}

.extra-info ul li {
  margin-bottom: 0.4rem;
  list-style: none;/* extra safety */
}

/* links inside the extra-info */
.extra-info a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.extra-info a:hover {
  color: #ffffff;
}

/* ensure social icons inside contact cards keep the accent color */
.contact-card .social-icons a,
.contact-card .social-links a {
  color: var(--accent) !important;
  transition: transform 0.2s ease, color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
}

.contact-card .avatar {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1rem;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}

.contact-card h3 {
  margin: 0.5rem 0;
}

.contact-card p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.contact-card .extra-info {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #ccc;
}

.contact-card .extra-info.hidden {
  display: none;
}

.contact-card .toggle-info {
  margin-top: 0.8rem;
  padding: 0.4rem 0.8rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.2s;
}

.contact-card .toggle-info:hover {
  background-color: #a355ff;
}

/* Light mode tweaks */
body.light .contact-card {
  background-color: #ffffff;
  border-color: #ccc;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}

body.light .contact-card .extra-info {
  color: #111111;
}

/* Social Icons */
.social-icons,
.social-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.social-icons a,
.social-links a {
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform 0.2s ease, color 0.2s ease;
}

.social-icons a:hover,
.social-links a:hover {
  transform: scale(1.3);
  color: #ffffff;
}

/* CONTACTS COLLAPSE/EXPAND */

/* Button styling */
.expand-btn {
  display: block;
  margin: 15px auto;
  padding: 15px 20px;
  font-size: 1.1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
}

.expand-btn:hover {
  background: #5a2ea6; /* darker purple on hover */
}

/* Collapsed preview */
#contacts-list.collapsed {
  max-height: 310px; /* cards peek */
  overflow: hidden;
  position: relative;
  transition: max-height 0.2s ease-out;
}

/* "blur/fade" indicator when collapsed */
#contacts-list.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px; /* blur area */
  background: linear-gradient(to bottom, rgba(255,255,255,0), var(--bg-color));
  backdrop-filter: blur(0.7px); /* blur */
  -webkit-backdrop-filter: blur(0.7px); /* Safari support */
  pointer-events: none; /* so it doesn’t block clicks */
  border-radius: 0 0 5px 5px;
}


/* "..." indicator */
#contacts-list.collapsed::before {
  content: "...";
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
  z-index: 2; /* make sure it stays above the blur */
  background: transparent;
}

/* Expanded full list */
#contacts-list.expanded {
  max-height: 100%;
  transition: max-height 0.3s ease-in;
}

/* MOBILE-OPTIMIZED CONTACT GRID */
@media (max-width: 768px) {
  /* Grid: 2 columns */
  #contacts-list.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem;
  }

  /* Contact cards smaller & compact */
  #contacts-list .contact-card {
    background-color: rgba(35, 35, 55, 0.9);
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 0.8rem;
    text-align: center;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
    transition: transform 0.2s ease;
  }

  /* compact avatar */
  #contacts-list .contact-card .avatar {
    width: 85px;
    height: 85px;
    border-radius: 12px;
    margin-bottom: 0.5rem;
  }

  #contacts-list .contact-card h3 {
    font-size: 0.9rem;
    margin: 0.3rem 0;
  }

  #contacts-list .contact-card p {
    font-size: 0.72rem;
    line-height: 1.1;
    margin: 0.3rem 0;
  }

  /* smaller social icons */
  #contacts-list .social-links {
    gap: 0.5rem;
  }

  #contacts-list .social-links a {
    font-size: 1rem;
  }

  /* smaller toggle button */
  #contacts-list .toggle-info {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    margin-top: 0.4rem;
  }

  /* expand button*/
  .expand-btn {
    width: 90%;
    font-size: 0.95rem;
    padding: 10px 14px;
  }
}

/* Extra-small devices: single column layout */
@media (max-width: 320px) {
  #contacts-list.contact-grid {
    grid-template-columns: 1fr;
  }
}

/* expanded info */
@media (max-width: 768px) {
  /* shrink extra info text & prevent overflow */
  #contacts-list .contact-card .extra-info {
    font-size: 0.7rem;
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: left;
    margin-top: 0.5rem;
    padding: 0 0.2rem;
  }

  /* smaller links & icons inside extra-info */
  #contacts-list .contact-card .extra-info a {
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
  }

  #contacts-list .contact-card .extra-info i {
    font-size: 0.8rem;
  }

  /* tighter list structure */
  #contacts-list .contact-card .extra-info ul {
    padding-left: 0;
    margin: 0.3rem 0;
  }

  #contacts-list .contact-card .extra-info li {
    margin-bottom: 0.25rem;
  }

  /* stop horizontal scrolling on long lines */
  #contacts-list .contact-card {
    overflow-x: hidden;
    word-wrap: break-word;
  }
}

/* Light mode */
body.light #contacts-list .contact-card {
  background-color: #f9f9ff;
  border: 1px solid rgba(160, 160, 200, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  color: #222;
}

body.light #contacts-list .contact-card h3 {
  color: #333;
}

body.light #contacts-list .contact-card p,
body.light #contacts-list .contact-card .extra-info {
  color: #444;
}

body.light #contacts-list .contact-card .toggle-info {
  background-color: var(--accent);
  color: white;
}

body.light #contacts-list .contact-card .social-links a,
body.light #contacts-list .contact-card .extra-info a {
  color: var(--accent);
}

body.light #contacts-list .contact-card .social-links a:hover,
body.light #contacts-list .contact-card .extra-info a:hover {
  color: #6a0dad;
}

/* NOTICES */
.notices {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

.notices h2 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

.notice-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.notice-card {
  position: relative;
  background-color: rgba(40, 40, 60, 0.9);
  padding: 1.5rem;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.15);
  text-align: left;
  transition: all 0.3s ease;
}

.notice-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.notice-card p {
  margin: 0.5rem 0 0.8rem 0;
  font-size: 1rem;
  opacity: 0.9;
}

.notice-card a {
 color: violet; /* link */
}

.notice-date {
  font-size: 0.8rem;
  color: var(--accent);
}

.notice-card .full-desc {
  margin-top: 1rem;
  color: #ccc;
}

.notice-card .full-desc.hidden {
  display: none;
}

.notice-card .toggle-full {
  margin-top: 1rem;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
}

.notice-card .toggle-full:hover {
  background: #a355ff;
}

.notice-controls {
  margin-top: 2rem;
  text-align: center;
}

.notice-controls button {
  margin: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.notice-controls button:hover {
  background-color: #a355ff;
}

/* Light mode tweaks */
body.light .notice-card {
  background-color: #f4f4f4;
  color: #222;
}

body.light .notice-card .full-desc {
  color: #333333;
}

@media (max-width:768px) {
  .notice-card {
    font-size: 0.8rem;
  }
  .notice-card p {
    font-size: 0.8rem;
  }

  .notice-card a {
    font-size: 0.8rem;
    color: violet /*link*/;
    text-align: justify;
    width: fit-content;
    max-width: fit-content;
    display: flex;
  }

  .notice-card h3 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}
}
  
/* RESOURCES */
.resources {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

.resources h2 {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.resource-card {
  background-color: rgba(40, 40, 60, 0.9);
  border-left: 4px solid var(--accent);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  transition: 0.3s ease;
  box-shadow: 0 0 12px rgba(138, 43, 226, 0.2);
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 15px rgba(155, 93, 229, 0.3);
}

.resource-card .icon {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.resource-card .button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.9rem;
  transition: 0.2s ease;
}

.resource-card .button:hover {
  background: #7b3ae1;
}

/* Light mode tweaks */
body.light .resource-card {
  background: #ffffff;
  border: 1px solid rgba(106, 13, 173, 0.15);
  color: #333333;
  box-shadow: 0 0 10px rgba(106, 13, 173, 0.1);
}

body.light .resource-card:hover {
  box-shadow: 0 0 15px rgba(106, 13, 173, 0.2);
}

body.light .resource-card .icon {
  color: #6a0dad;
}

body.light .resource-card h3 {
  color: #333333;
}

body.light .resource-card p {
  color: #555555;
}

body.light .resource-card .button {
  background: #6a0dad;
  color: white;
}

body.light .resource-card .button:hover {
  background: #5a0b9a;
}

/* UTILITIES */
.download-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.download-btn:hover {
  background-color: #a355ff;
}

.section {
  padding: 4rem 2rem;
  background-color: rgba(20, 20, 30, 0.6);
  border-radius: 16px;
  margin: 3rem 0;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

body.light .section {
  background-color: rgba(240, 240, 245, 0.8);
}

.section-divider {
  height: 2px;
  width: 80%;
  margin: 4rem auto;
  border: none;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0.4;
}

/* MODAL / STARTUP INFO */
.startup-btn {
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.startup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
  background: linear-gradient(135deg, #a855f7, var(--accent));
}

.startup-btn i {
  font-size: 1.2rem;
}

/* Modal Background */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background-color: var(--bg-color);
  margin: 2% auto;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 20px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 30px rgba(138, 43, 226, 0.5);
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  background: linear-gradient(135deg, var(--accent), #a855f7);
  color: white;
  padding: 1.5rem 2rem;
  border-radius: 18px 18px 0 0;
  text-align: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.close-modal {
  color: white;
  float: right;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  transition: color 0.2s;
}

.close-modal:hover {
  color: #ffcccc;
}

.modal-body {
  padding: 2rem;
  color: var(--text-color);
}

.info-section {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}

.info-section h3 {
  color: var(--accent);
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-section p,
.info-section li {
  line-height: 1.6;
  opacity: 0.9;
}

.info-section ul {
  padding-left: 0;
  list-style: none;
}

.info-section li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.highlight-card {
  background: rgba(138, 43, 226, 0.1);
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(138, 43, 226, 0.2);
  transition: transform 0.2s;
}

.highlight-card:hover {
  transform: translateY(-3px);
}

.highlight-card i {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.highlight-card h4 {
  margin: 0.5rem 0;
  color: var(--accent);
}

.highlight-card p {
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-img:hover {
  transform: scale(1.05);
}

.update-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(138, 43, 226, 0.05);
  border-radius: 8px;
}

.update-date {
  background: var(--accent);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  white-space: nowrap;
}

.update-item p {
  margin: 0;
  flex: 1;
}

.cta-section {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1), rgba(168, 85, 247, 0.1));
  border-left: 4px solid var(--accent);
  text-align: center;
}

.cta-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-btn:hover {
  background: #a855f7;
  transform: translateY(-2px);
}

/* Light mode tweaks */
body.light .modal-content {
  background-color: #ffffff;
  border-color: #6a0dad;
}

body.light .info-section {
  background: rgba(106, 13, 173, 0.05);
}

body.light .highlight-card {
  background: rgba(106, 13, 173, 0.08);
  border-color: rgba(106, 13, 173, 0.2);
}

body.light .update-item {
  background: rgba(106, 13, 173, 0.05);
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    padding: 0.5rem 1rem;
  }

  nav { position: relative; }
  .logo { font-size: 1.2rem; }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    backdrop-filter: blur(8px);
    padding: 1rem;
    border-top: 1px solid var(--accent);
    z-index: 100;
  }

  .nav-links.active { display: flex; }

  .hamburger {
    display: block;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.2rem;
  }

  .intro { margin: 2rem auto; padding: 1rem; }
  .intro h1 { font-size: 2rem; }

  .contact-grid { grid-template-columns: 1fr; gap: 1rem; }
  .contact-card .avatar { width: 120px; height: 120px; }

  .contacts h2,
  .notices h2,
  .resources h2 { font-size: 2rem; }

  .modal-content {
    width: 95%;
    margin: 1% auto;
    max-height: 95vh;
  }
  .modal-body { padding: 1rem; }
  .info-section { padding: 1rem; }
  .highlight-grid { grid-template-columns: 1fr; }
  .startup-btn { padding: 0.8rem 1.5rem; font-size: 1rem; }
  .update-item { flex-direction: column; gap: 0.5rem; }
  .update-date { align-self: flex-start; }
}
.redirect-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80vh;
    text-align: center;
}

.redirect-container {
    max-width: 600px;
    padding: 20px;
}

.redirect-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background: #0c54e6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: 0.3s;
}

.redirect-btn:hover {
    background: #3f7eb9;
}

.small-note {
    margin-top: 15px;
    font-size: 0.9rem;
    opacity: 0.7;
}
