/* style.css */
/* Configure Tailwind CSS to use Inter font */
body {
    font-family: 'Inter', sans-serif;
    background-color: #000000; /* Pure black background */
    color: #e0e0e0;
    overflow-x: hidden;
    margin: 0;
    min-height: 100vh;
}

/* Accelerated interstellar travel intro animation */
.space-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at center, #000 0%, #0a0e2a 70%, #1a1f4e 100%);
    animation: spaceIntro 0.6s ease-out forwards;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle 0.7s infinite ease-in-out;
}

.space-title {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 150, 255, 0.8);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(50px);
    animation: titleAppear 0.3s 0.15s ease-out forwards;
}

.space-subtitle {
    font-size: 1.5rem;
    color: #a0d2ff;
    opacity: 0;
    transform: translateY(30px);
    animation: subtitleAppear 0.3s 0.3s ease-out forwards;
}

/* Custom modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1a1f4e, #0a0e2a);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalAppear 0.5s ease-out;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #a0d2ff;
    cursor: pointer;
    transition: transform 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
    background: rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(100, 180, 255, 0.5);
}

.modal-body {
    color: #d0e5ff;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    padding: 0 10px;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-button {
    background: linear-gradient(to right, #4a6fff, #8a4fff);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 111, 255, 0.3);
}

.modal-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 111, 255, 0.5);
}

/* Image carousel area */
.carousel {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.carousel-inner {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
    height: 100%;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

.carousel-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #3b82f6;
    transform: scale(1.2);
}

/* New: Button pulse animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.pulse-animation {
    animation: pulse 2s infinite;
}
/* Glassmorphism effect */
.glassmorphism {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.4);
}
/* Animation effect */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.animate-fade-in {
    animation: fade-in 1s ease-out forwards;
}
/* Bookmark style */
.bookmark-link {
    position: fixed;
    top: 25px;
    right: -5px;
    background-color: #1e3a8a;
    color: #ffffff;
    padding: 12px 30px 12px 20px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px 0 0 6px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    transition: right 0.3s ease;
}
.bookmark-link:hover {
    right: 0;
}
.bookmark-link::after {
    content: '';
    position: absolute;
    bottom: -16px;
    right: 0;
    width: 0;
    height: 0;
    border-top: 8px solid #1c3274;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #1c3274;
    border-right: 8px solid transparent;
    box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.3);
}
/* Whale style */
#whale-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100px;
    height: 100px;
    z-index: 1000;
    cursor: pointer;
    text-decoration: none;
}
.whale-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.whale {
    position: absolute;
    font-size: 40px;
    animation: swim-rotate 4s linear infinite;
}
.splash {
    position: absolute;
    font-size: 16px;
    opacity: 0;
    animation: splash 2s infinite;
}
.s1 { top: 40px; left: 10px; animation-delay: 0s; }
.s2 { top: 10px; left: 60px; animation-delay: 0.6s; }
.s3 { top: 60px; left: 40px; animation-delay: 1.2s; }
@keyframes swim-rotate {
    0% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(10px, -10px) rotate(20deg); }
    50% { transform: translate(-5px, 5px) rotate(0deg); }
    75% { transform: translate(5px, 10px) rotate(-20deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes splash {
    0%, 100% { opacity: 0; transform: scale(0.5) translate(0, 20px); }
    50% { opacity: 1; transform: scale(1.2) translate(0, 0); }
    80% { opacity: 0; }
}
/* Speech bubble style */
.speech-bubble {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: black;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}
.speech-bubble.visible {
    opacity: 1;
    visibility: visible;
}
/* Meteor style - Enhanced for beauty */
.meteor {
    position: fixed;
    top: -10px;
    height: 3px; /* Slightly thicker */
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.8), rgba(173, 216, 230, 0.5)); /* White to light blue gradient */
    border-radius: 2px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)); /* Stronger, softer glow */
    z-index: 5;
    pointer-events: none;
    animation-timing-function: cubic-bezier(0.42, 0, 0.58, 1); /* Smoother fall */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        gap: 1.5rem;
    }
    .header h1 {
        font-size: 3rem;
    }
    .glassmorphism {
        padding: 1.5rem;
    }
    .glassmorphism h2 {
        font-size: 2rem;
        color: #e0e0e0;
    }
    .glassmorphism p,
    .glassmorphism ul {
        font-size: 0.95rem;
    }
    /* Adjusted for unified catalog-section */
    .catalog-section {
        flex-direction: column;
        padding: 1rem;
    }
    .catalog-section h2 {
        font-size: 1.3rem;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    .catalog-btn { /* Adjusted for unified buttons */
        font-size: 1.2rem;
        text-align: center;
    }
    /* Utility sections responsive adjustments */
    .utility-section {
        padding: 0.8rem; /* Smaller padding for smaller sections */
        max-width: 48% !important; /* Allow two columns on medium screens */
    }
    .utility-section h2 {
        font-size: 1.1rem;
    }
    .utility-section p {
        font-size: 0.8rem;
    }
    .utility-btn {
        font-size: 0.8rem;
        padding: 8px 16px;
    }

    .space-title {
        font-size: 2.5rem;
    }
    .space-subtitle {
        font-size: 1.2rem;
    }
    .carousel {
        height: 180px;
    }
    .modal-content {
        width: 85%;
        padding: 20px;
    }
    .modal-title {
        font-size: 1.5rem;
    }
    .modal-body {
        font-size: 1rem;
    }
    .space-station-container {
        padding: 1.5rem;
    }
    .station-svg {
        width: 80px;
        height: 80px;
    }
    .future-title {
        font-size: 1.8rem;
    }
    .future-desc {
        font-size: 1rem;
    }
}
@media (max-width: 480px) {
    .header h1 {
        font-size: 2.5rem;
    }
    .glassmorphism {
        padding: 1rem;
        border-radius: 1rem;
    }
    .glassmorphism h2 {
        font-size: 1.75rem;
        color: #e0e0e0;
    }
    .glassmorphism p,
    .glassmorphism ul {
        font-size: 0.9rem;
    }
    .catalog-section { /* Apply general responsive styles to catalog-section */
        padding: 0.8rem;
    }
    .catalog-section h2 {
        font-size: 1.1rem;
    }
    .catalog-btn { /* Adjusted for unified buttons */
        font-size: 1rem;
    }
    /* Utility sections responsive adjustments for smaller screens */
    .utility-section {
        max-width: 100% !important; /* Stack vertically on small screens */
        padding: 0.8rem;
    }
    .utility-section h2 {
        font-size: 1rem;
    }
    .utility-section p {
        font-size: 0.75rem;
    }
    .utility-btn {
        font-size: 0.75rem;
        padding: 6px 12px;
    }

    .space-title {
        font-size: 2rem;
    }
    .space-subtitle {
        font-size: 1rem;
    }
    .carousel {
        height: 150px;
    }
    .modal-content {
        width: 90%;
        padding: 15px;
    }
    .modal-title {
        font-size: 1.3rem;
    }
    .modal-body {
        font-size: 0.9rem;
    }
    .space-station-container {
        padding: 1rem;
    }
    .space-station-content {
        flex-direction: column;
        align-items: center;
    }
    .future-text {
        margin-top: 1rem;
        text-align: center;
    }
    .future-title {
        font-size: 1.5rem;
    }
    .future-desc {
        font-size: 0.9rem;
    }
}
/* Navigation button scaling */
.nav-btn {
    width: 100px !important;
    height: 100px !important;
    font-size: 1rem !important;
}

/* Interstellar travel animation keyframes */
@keyframes spaceIntro {
    0% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.1; } /* Subtler twinkle effect */
    50% { opacity: 0.7; } /* Max opacity for subtle twinkling */
}

@keyframes titleAppear {
    0% { opacity: 0; transform: translateY(50px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes subtitleAppear {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes modalAppear {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Website content initial hidden state */
.page-content {
    opacity: 0;
    animation: contentAppear 0.5s 0.6s forwards;
}

@keyframes contentAppear {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Website directory and personal homepage blocks styling (larger and flexible) */
.catalog-section {
    padding: 1.5rem; /* Default padding for catalog sections */
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column; /* Stack content vertically */
    align-items: center; /* Center content horizontally */
    text-align: center; /* Center text */
    flex: 1; /* Allow these sections to grow and shrink */
    min-width: 300px; /* Ensure a minimum width before wrapping */
}
.catalog-section h2 {
    font-size: 2rem; /* Consistent heading size */
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(100, 180, 255, 0.3); /* Consistent border */
    padding-bottom: 0.75rem;
    white-space: nowrap; /* Prevent wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%; /* Ensure border spans full width */
}
.catalog-section p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}
.catalog-btn {
    width: auto; /* Allow button to size based on content */
    padding: 12px 24px; /* Consistent button padding */
    font-size: 0.9rem; /* Consistent button font size */
    height: auto; /* Allow height to adjust */
}

/* Utility sections for smaller, side-by-side blocks */
.utility-section {
    padding: 1rem; /* Smaller padding */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%; /* Default to full width on very small screens */
    max-width: 250px; /* Increased max width for each utility section */
    height: 160px; /* Slightly increased fixed height for consistent box size */
    justify-content: space-between; /* Distribute space vertically */
    box-sizing: border-box; /* Include padding in width */
    flex-shrink: 0; /* Prevent shrinking below content */
    flex-grow: 1; /* Allow growing to fill space */
}

.utility-section h2 {
    font-size: 1.3rem; /* Adjusted heading size */
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(100, 180, 255, 0.3);
    padding-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.utility-section p {
    font-size: 0.85rem; /* Smaller paragraph text */
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.utility-btn {
    padding: 10px 20px; /* Adjusted button padding */
    font-size: 0.9rem; /* Adjusted button font size */
    border-radius: 16px; /* Adjust border-radius if needed */
    white-space: nowrap;
}

/* Space station model style */
.space-station-model {
    width: 120px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateStation 15s infinite linear, float 4s ease-in-out infinite;
}

@keyframes rotateStation {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.station-body {
    position: absolute;
    width: 60px;
    height: 40px;
    background: linear-gradient(to right, #4a5568, #2d3748);
    border-radius: 10px;
    top: 40px;
    left: 30px;
    transform: translateZ(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.station-module {
    position: absolute;
    width: 30px;
    height: 30px;
    background: linear-gradient(to bottom, #718096, #4a5568);
    border-radius: 50%;
    top: 35px;
    left: 45px;
    transform: translateZ(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.solar-panel {
    position: absolute;
    width: 80px;
    height: 20px;
    background: linear-gradient(to bottom, #a0aec0, #718096);
    border-radius: 3px;
    top: 45px;
    left: 20px;
    transform: translateZ(0px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.solar-panel::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    top: 50%;
    transform: translateY(-50%);
}

.antenna {
    position: absolute;
    width: 2px;
    height: 15px;
    background: #e2e8f0;
    top: 25px;
    left: 60px;
    transform: translateZ(30px);
}

.antenna::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #63b3ed;
    top: -10px;
    left: -3px;
}

/* Floating animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Twinkling Light Overlay */
.twinkling-lights-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Below the main content, above the default body background */
    overflow: hidden;
    pointer-events: none; /* Allows clicks to pass through to elements below */
}

.prop-star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0;
    animation: twinkle-prop var(--duration, 3s) infinite ease-in-out; /* Use CSS variables for duration */
}

@keyframes twinkle-prop {
    0%, 100% { opacity: 0.1; } /* Very subtle minimum opacity */
    50% { opacity: 0.6; } /* Max opacity is 0.6 for non-dazzling effect */
}

/* Twinkling Light Toggle Switch - Enhanced Sci-Fi Style */
.twinkling-light-toggle-container {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    z-index: 9001;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(30, 40, 70, 0.5); /* Darker, more saturated background */
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(100, 150, 255, 0.3); /* Slightly more prominent border */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.6); /* Stronger shadow */
    border-radius: 16px; /* Slightly more rounded */
    padding: 12px 18px; /* More padding */
    gap: 10px;
    transition: all 0.3s ease;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px; /* Wider switch */
    height: 26px; /* Taller switch */
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a5568; /* Darker, metallic gray for off state */
    transition: .4s;
    border-radius: 26px; /* Match height for perfect roundness */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.4); /* Inner shadow for depth */
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px; /* Larger knob */
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #e0e0e0; /* Off-white knob */
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3); /* Subtle knob glow */
}

input:checked + .slider {
    background: linear-gradient(to right, #007bff, #53a8ff); /* Electric blue gradient for on state */
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.4), 0 0 15px rgba(0, 123, 255, 0.6); /* Outer glow for track */
}

input:focus + .slider {
    box-shadow: 0 0 1px #007bff;
}

input:checked + .slider:before {
    transform: translateX(24px); /* Adjusted translation for wider switch */
    background-color: #a0c4ff; /* Lighter blue knob when on */
    box-shadow: 0 0 10px #a0c4ff, 0 0 20px #a0c4ff; /* Stronger knob glow */
}

.toggle-label {
    color: #e0e0e0;
    font-size: 0.9rem; /* Slightly larger font */
    font-weight: 600; /* Bolder font */
    text-shadow: 0 0 8px rgba(160, 210, 255, 0.4); /* Subtle text glow */
    white-space: nowrap;
}
