* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark mode colors (default) */
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1620;
    --text-primary: #ffffff;
    --text-secondary: #8db5d9;
    --accent-primary: #5ba3d0;
    --accent-secondary: #4a7ba7;
    --accent-hover: #8db5d9;
    --border-color: rgba(91, 163, 208, 0.2);
    --card-bg: rgba(15, 22, 40, 0.8);
    --card-border: rgba(91, 163, 208, 0.3);
}

html.light-mode {
    /* Light mode colors */
    --bg-primary: #f5f7fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #4a5568;
    --accent-primary: #2c5f8d;
    --accent-secondary: #3d7ab5;
    --accent-hover: #1e4d75;
    --border-color: rgba(44, 95, 141, 0.2);
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-border: rgba(44, 95, 141, 0.3);
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Theme toggle button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.theme-toggle:hover {
    background: var(--accent-hover);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: var(--bg-primary);
}

@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-Light.ttf') format('truetype');
    font-weight: 300;
}

@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-Medium.ttf') format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'Fredoka';
    src: url('fonts/Fredoka-Bold.ttf') format('truetype');
    font-weight: 700;
}

body {
    font-family: "Fredoka", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background canvas styling */
#sharkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-primary) 100%);
    transition: background 0.3s ease;
}

header {
    background: var(--card-bg);
    color: var(--text-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    border-bottom: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    z-index: 100;
    width: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    width: calc(100% - 4rem);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent-primary);
    letter-spacing: 1px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.logo:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--accent-primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* Dropdown menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    list-style: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    z-index: 1000;
    margin-top: 0.5rem;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    font-weight: 400;
    font-size: 0.95rem;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.hero {
    background: var(--card-bg);
    color: var(--text-primary);
    text-align: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--border-color);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 1rem;
    transition: background-color 0.3s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, var(--card-border) 0%, transparent 70%);
    pointer-events: none;
}

.hero-logo {
    height: 450px;
    width: auto;
    object-fit: contain;
    margin-bottom: 2rem;
    z-index: 1;
    animation: logoZoomIn 1.2s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    z-index: 1;
    position: relative;
    animation: textGlow 3s ease-in-out infinite;
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-secondary);
    opacity: 0.95;
    margin-bottom: 2rem;
    z-index: 1;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    z-index: 1;
    position: relative;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    font-family: 'Fredoka', sans-serif;
    letter-spacing: 0.5px;
    text-align: center;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--card-border);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
}

.btn-secondary:hover {
    background: var(--card-border);
    border-color: var(--accent-hover);
    color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px var(--card-border);
}

.scroll-arrow {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    z-index: 1;
    position: relative;
    animation: bounce 2s infinite;
}

.scroll-arrow:hover {
    color: var(--accent-primary);
    transform: translateY(4px);
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

/* Announcements Section */
.announcements-section {
    background: var(--bg-primary);
    padding: 4rem 2rem;
    width: 100%;
    min-height: auto;
    transition: background-color 0.3s ease;
}

.announcements-section h2 {
    font-size: 2.5rem;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.announcements-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: calc(100% - 4rem);
}

.announcement-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
}

.announcement-card:nth-child(1) {
    animation-delay: 0s;
}

.announcement-card:nth-child(2) {
    animation-delay: 0.2s;
}

.announcement-card:nth-child(3) {
    animation-delay: 0.4s;
}

.announcement-card:hover {
    background: var(--card-bg);
    border-color: var(--card-border);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px var(--card-border);
    opacity: 0.95;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.announcement-date {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.announcement-card h3 {
    color: var(--accent-primary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.announcement-card p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.announcement-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.announcement-link:hover {
    color: var(--accent-hover);
    transform: translateX(4px);
}

    z-index: 1;
    position: relative;
}

@keyframes textGlow {
    0%, 100% { 
        color: var(--accent-primary);
    }
    50% { 
        color: var(--accent-hover);
    }
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
    width: calc(100% - 4rem);
}

.section {
    margin: 1.5rem 0;
}

.section h1 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.section h2 {
    color: var(--accent-primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.content-box {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.content-box:hover {
    border-color: var(--card-border);
    background: var(--card-bg);
    opacity: 0.95;
}

.welcome-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.8;
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

footer {
    background: var(--card-bg);
    color: var(--text-primary);
    text-align: center;
    padding: 2rem 2rem 6rem 2rem;
    margin-top: 3rem;
    border-top: 2px solid var(--border-color);
    backdrop-filter: blur(10px);
    width: 100%;
    transition: background-color 0.3s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-content p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-icon {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(91, 163, 208, 0.1);
}

.social-icon:hover {
    color: #5ba3d0;
    background: rgba(91, 163, 208, 0.2);
    transform: translateY(-2px);
}

footer p {
}

/* Team Members Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.team-member {
    background: rgba(20, 30, 50, 0.6);
    border: 1px solid rgba(91, 163, 208, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    text-align: center;
}

.team-member:hover {
    background: rgba(20, 30, 50, 0.9);
    border-color: rgba(91, 163, 208, 0.6);
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(91, 163, 208, 0.1);
}

.member-photo {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    background: rgba(91, 163, 208, 0.1);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.team-member:hover .member-photo img {
    transform: scale(1.05);
}

.team-member h3 {
    color: #5ba3d0;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.member-role {
    color: #8db5d9;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.member-bio {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Alumni Section */
.alumni-content {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.alumni-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.alumni-content p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.alumni-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.alumni-list li {
    color: var(--text-secondary);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.alumni-list li:last-child {
    border-bottom: none;
}

.alumni-list strong {
    color: var(--accent-primary);
}

/* Collapsible sections */
.collapsible-section {
    overflow: hidden;
}

.collapsible-header {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    user-select: none;
    transition: color 0.3s ease;
}

.collapsible-header:hover {
    color: var(--accent-primary);
}

.collapse-icon {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.collapsible-section.collapsed .collapsible-content {
    max-height: 0 !important;
    opacity: 0;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: fixed;
    left: max(2rem, calc(50vw - 600px - 240px));
    top: 120px;
    width: 220px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    z-index: 100;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.toc-title {
    color: var(--accent-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    text-align: center;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: block;
    text-align: center;
}

.toc-nav a:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    transform: scale(1.05);
}

.toc-nav a.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    font-weight: 600;
}

/* Adjust main content for TOC */
.invitational-main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 1400px) {
    .toc-sidebar {
        left: 1rem;
        width: 200px;
        padding: 1rem;
    }
}

@media (max-width: 1680px) {
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 1200px) {
    .toc-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: var(--card-bg);
        border-bottom: 2px solid var(--border-color);
        backdrop-filter: blur(10px);
        max-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.active {
        max-height: 80vh;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        text-align: center;
    }

    .nav-links a::after {
        display: none;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 35px;
    }

    /* Dropdown menu */
    .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        margin: 0;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        padding: 0;
        background: var(--bg-secondary);
        max-height: none;
        overflow: visible;
    }

    .dropdown-menu li {
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu a {
        padding: 0.875rem 1.5rem;
        display: block;
        width: 100%;
        text-align: center;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .nav-dropdown > a {
        pointer-events: none;
    }

    .nav-dropdown.active > a {
        background: var(--bg-secondary);
    }

    /* Hero section */
    .hero {
        padding: 3rem 1rem;
        min-height: 80vh;
    }

    .hero-logo {
        height: 250px;
        margin-bottom: 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 0 1rem;
    }

    .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }

    /* Main content */
    main {
        padding: 0 1rem;
        margin: 1rem auto;
        width: calc(100% - 2rem);
    }

    .section {
        margin: 1rem 0;
    }

    .section h1 {
        font-size: 1.8rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    /* Announcements */
    .announcements-section {
        padding: 2rem 1rem;
    }

    .announcements-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .announcements-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: calc(100% - 2rem);
    }

    .announcement-card {
        padding: 1.5rem;
    }

    /* Team grid */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .member-photo {
        height: 200px;
    }

    /* Content boxes */
    .content-box {
        padding: 1rem;
    }

    /* Theme toggle */
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* Footer */
    footer {
        padding: 1.5rem 1rem;
    }

    .footer-content {
        gap: 1rem;
    }

    .social-links {
        gap: 1rem;
    }

    .social-icon {
        width: 36px;
        height: 36px;
    }

    /* Invitational page specific */
    .invitational-main {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    /* Alumni section */
    .alumni-content {
        padding: 1.5rem;
    }

    /* Two-column layouts */
    .section > div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }

    /* Button grids in Maps and Important Documents sections */
    .content-box > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Collapsible sections */
    .collapsible-header {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        height: 180px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .section h1 {
        font-size: 1.5rem;
    }

    .section h2 {
        font-size: 1.3rem;
    }

    .announcements-section h2 {
        font-size: 1.5rem;
    }

    nav {
        padding: 0.75rem;
    }

    .logo {
        font-size: 1rem;
    }

    main {
        padding: 0 0.75rem;
        width: calc(100% - 1.5rem);
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}
