/* Earl Marriott Computer Science Club - Mobile Friendly CSS Reset and Styles */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

/* Color Variables from logo */
:root {
    /* Github Dark theme colors */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border-color: #30363d;
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-red: #f85149;
    --accent-yellow: #d29922;
    --accent-purple: #d2a8ff;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.4);

    /* Transition */
    --transition-speed: 0.3s;

    /* Border radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Font sizes */
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.5rem;
    --font-2xl: 2rem;
    --font-3xl: 2.5rem;
    --font-4xl: 3rem;
    --light-blue: var(--accent-blue);
}

/* Base Styles */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 1100px 650px at 50% -15%, rgba(88, 166, 255, 0.22), transparent 65%),
        radial-gradient(ellipse 800px 500px at 100% -5%, rgba(210, 168, 255, 0.14), transparent 65%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

/* Container */
#island {
    max-width: 90vw;
    margin: 20px auto;
    padding: 25px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

/* Ensure images don't break layout */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Gradient Text - Now just regular text styling for dark theme */
.gradient-text {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 0;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    position: relative;
    padding: 0 30px 20px;
}

#nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    position: relative;
}

/* Hamburger hidden by default; only shown on mobile via media query below */
.hamburger {
    display: none;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    line-height: 1.2;
}

/* Header title inside .gradient-text */
.gradient-text h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    line-height: 1.2;
    color: var(--text-primary);
}

/* Navigation */
nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
    text-align: center;
    min-width: 80px;
    white-space: nowrap;
}

.nav-link.github-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-speed) ease;
    border: 1px solid var(--border-color);
}

/* Fix GitHub icon to display properly - use filled version */
.nav-link.github-link svg {
    fill: currentColor !important;
    stroke: none !important;
    width: 20px !important;
    height: 20px !important;
}

/* Hover/Focus states for accessibility */
.nav-link:hover,
.nav-link:focus-visible {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    outline: 2px solid rgba(88, 166, 255, 0.3);
    border-color: rgba(88, 166, 255, 0.4);
}

.nav-link.active {
    background: var(--accent-blue);
    color: var(--bg-primary);
    border-color: var(--accent-blue);
}

/* Gear / settings icon button */
.gear-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    vertical-align: middle;
    transition: all var(--transition-speed) ease;
}

/* Gear / settings icon button:hover */
.gear-btn:hover,
.gear-btn:focus-visible {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: rotate(30deg);
    outline: 2px solid rgba(88, 166, 255, 0.3);
    border-color: rgba(88, 166, 255, 0.4);
}

/* Gear / settings icon button.active */
.gear-btn.active {
    color: var(--accent-blue);
    border-color: rgba(88, 166, 255, 0.5);
}

/* Settings dropdown panel (desktop: floats under gear icon) */
.settings-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 200;
}

.settings-panel.active {
    display: flex;
}

/* Settings label */
.settings-label {
    margin: 0;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

/* Push notification button */
.notify-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    margin: 15px 0;
}

.notify-btn:hover:not(:disabled) {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    border-color: rgba(88, 166, 255, 0.4);
}

.notify-btn.active {
    background: var(--accent-green);
    color: var(--bg-primary);
    border-color: var(--accent-green);
    cursor: default;
}

.notify-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}



/* Rickroll link (keep red theme) */
.rickroll-link {
    background: rgba(248, 81, 73, 0.2);
    border-color: rgba(248, 81, 73, 0.3);
    color: #f85149;
    font-weight: bold;
}

.rickroll-link:hover,
.rickroll-link:focus-visible {
    background: rgba(248, 81, 73, 0.3);
    color: #ff7b72;
}

/* Main Content */
main {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
    padding-top: 40px;
}

.page-title {
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: inline-block;
    font-weight: 600;
    font-size: clamp(1.8rem, 4.5vw, 2.5rem);
    letter-spacing: -0.01em;
}

/* Hero section logo */
.hero-logo {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.hero-logo-img {
    height: 130px;
    width: 130px;
    border-radius: 50%;
    object-fit: cover;
    box-sizing: border-box;
    padding: 6px;
    background: linear-gradient(135deg, var(--bg-primary), var(--light-blue));
    margin: 0 auto;
}

/* Increased hero heading size */
main h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    display: inline-block;
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* Achievement Cards */
.achievement {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.achievement:hover,
.achievement:focus-within {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    /* Slight adjustments for tablets */
    #island {
        margin: 15px auto;
        padding: 20px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.7rem;
    }

    .nav-link {
        payload: 12px 24px;
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    /* Mobile-first adjustments */
    #island {
        margin: 10px auto;
        padding: 15px;
        border-radius: 15px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    /* Hamburger menu */
    .hamburger {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        width: 30px;
        height: 20px;
        cursor: pointer;
        z-index: 100;
        background: none;
        border: none;
    }

    .hamburger .bar {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--text-primary);
        margin: 4px 0;
        transition: 0.4s;
    }

    /* Hide nav by default on mobile */
    #nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(1, 16, 39, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        padding-top: 80px;
        gap: 20px;
        transition: 0.4s;
        z-index: 99;
        overflow-y: auto;
        visibility: hidden;
        opacity: 0;
    }

    .gear-btn {
        margin-top: 10px;
    }

    /* Settings panel adjustments for mobile */
    .settings-panel {
        position: fixed;
        top: auto;
        bottom: 20px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 85%;
        max-width: 320px;
    }

    #nav-menu.active {
        right: 0;
        visibility: visible;
        opacity: 1;
    }

    /* Style for nav links when menu is open */
    #nav-menu .nav-link {
        width: 90%;
        max-width: 250px;
        padding: 16px 20px;
        font-size: 1rem;
        text-align: center;
        background: var(--bg-secondary);
        color: var(--text-primary);
        text-decoration: none;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
        transition: all var(--transition-speed) ease;
    }
    #nav-menu .nav-link:hover,
    #nav-menu .nav-link:focus-visible {
        background: var(--bg-tertiary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    /* Adjust logo size */
    .logo {
        max-height: 50px;
        margin-right: 10px;
    }

    /* Ensure heading doesn't break */
    .gradient-text {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .gradient-text h1 {
        font-size: 1.8rem;
        margin: 0;
    }

    h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    /* Extra small devices */
    #island {
        margin: 5px auto;
        padding: 12px;
        border-radius: 12px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .gradient-text {
        padding: 12px 0;
    }

    .gradient-text h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .nav-link {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .achievement {
        padding: 20px;
        margin-bottom: 25px;
    }

    footer {
        padding: 20px 0;
        font-size: 0.85rem;
    }
}

/* Animated hamburger bars */
.bar.active {
    background-color: var(--light-blue);
}

/* Animates the hamburger to an X */
.bar:nth-child(1).active {
    transform: translateY(8px) rotate(45deg);
}
.bar:nth-child(2).active {
    opacity: 0;
}
.bar:nth-child(3).active {
    transform: translateY(-8px) rotate(-45deg);
}

/* Animation for gradient text */
@keyframes gradientShift {
    0% {
        background-position: left 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: left 50%;
    }
}

/* Rickroll animation */
#rickroll {
    position: relative;
    overflow: hidden;
}

#rickroll.visited::after {
    content: "get rickrolled lol";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #ffeb3b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: monospace;
    animation: glitch 2s infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#rickroll.visited:hover::after {
    opacity: 1;
}

@keyframes glitch {
    0% {
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000;
    }
    25% {
        text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00;
    }
    50% {
        text-shadow: 0 0 5px #0000ff, 0 0 10px #0000ff;
    }
    75% {
        text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff;
    }
    100% {
        text-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000;
    }
}

/* Logo specific styling */
.logo {
    height: 48px;
    width: 48px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    box-sizing: border-box;
    padding: 3px;
    background: linear-gradient(135deg, var(--bg-primary), var(--light-blue));
}

/* Blog styles */
.posts-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
.post-preview {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    text-align: left;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.post-preview:last-child {
    margin-bottom: 0;
}
.post-preview:hover,
.post-preview:focus-within {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.post-title {
    margin: 0 0 15px 0;
    font-size: 1.8rem;
}
.post-title a {
    color: var(--text-primary);
    text-decoration: none;
}
.post-title a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}
.post-meta {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}
.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}
.read-more {
    display: inline-block;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 500;
}
.read-more:hover {
    text-decoration: underline;
}

/* Post detail styles */
.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color var(--transition-speed) ease;
}
.back-link:hover {
    color: var(--accent-blue);
}
.post-header {
    margin-bottom: 30px;
    text-align: center;
}
.post-title {
    font-size: 2.2rem;
    margin-bottom: 10px;
}
.post-meta {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}
.post-content {
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
}
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 16px;
}
.post-content p {
    margin-bottom: 16px;
}
.post-content a {
    color: var(--accent-blue);
    text-decoration: underline;
}
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 20px 0;
}
/* Calendar page */
.calendar-status {
    color: var(--text-secondary);
    text-align: center;
    padding: 40px 0;
}
.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}
.calendar-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.calendar-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.calendar-date {
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}
.calendar-title {
    color: var(--text-primary);
    margin: 0 0 6px 0;
    font-size: 1.3rem;
}
.calendar-time {
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.calendar-location {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-top: 6px;
}
.calendar-desc {
    color: var(--text-secondary);
    margin-top: 12px;
    font-size: 0.95rem;
}
