:root {
    /* Rainbow palette based on your logo */
    --rainbow-grad: linear-gradient(90deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
}

::selection {
    background: rgba(231, 60, 126, 0.3); /* Semi-transparent Pink */
    color: #ffffff; /* White text when highlighted */
}

/* For Safari/Firefox support */
::-moz-selection {
    background: rgba(231, 60, 126, 0.3);
    color: #ffffff;
}

body {
    margin: 0;
    padding: 50px 0; /* Add padding so content doesn't touch the edges */
    min-height: 100vh; /* Changed from height to min-height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Changed from center to start at the top */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    /* Deep Navy Base */
    background-color: #020c1b;
    
    /* The Rainbow Rays Layer */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(231, 60, 126, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(35, 166, 213, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(35, 213, 171, 0.1) 0%, transparent 50%);
    
    background-size: 200% 200%;
    animation: rainbowRays 12s ease-in-out infinite;
    background-attachment: fixed;
    overflow-y: auto;
}

@keyframes rainbowRays {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

.main-nav {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(2, 12, 27, 0.9); /* Translucent Navy */
    backdrop-filter: blur(10px); /* Modern frosted glass effect */
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 0;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.nav-item {
    color: #8892b0; /* Your grey-blue body text color */
    text-decoration: none;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: #64ffda; /* Your signature Teal */
}

/* The "Active" tab highlight */
.nav-item.active {
    color: white;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--rainbow-grad); /* Your rainbow gradient bar */
}

.logo-container {
    position: relative;
    z-index: 10;
    margin-top: 20px; /* Space from the top rainbow bar */
}

.logo-container img {
    max-width: 320px;
    height: auto;
    /* This creates a multi-layered glow effect */
    filter: drop-shadow(-10px 0 15px rgba(231, 60, 126, 0.4))  /* Pink/Red glow on left */
            drop-shadow(10px 0 15px rgba(35, 166, 213, 0.4)); /* Blue/Cyan glow on right */
    transition: all 0.5s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
    /* Intensify the rainbow glow on hover */
    filter: drop-shadow(-15px 0 25px rgba(238, 119, 82, 0.6)) 
            drop-shadow(15px 0 25px rgba(35, 213, 171, 0.6));
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 5px;
    margin-top: 30px;
    margin-bottom: 10px;
    text-transform: uppercase;
    /* Horizontal Rainbow Gradient */
    background: linear-gradient(
        to right, 
        #a855f7, /* Purple */
        #ec4899, /* Pink */
        #3b82f6, /* Blue */
        #22c55e, /* Green */
        #eab308, /* Yellow */
        #ef4444  /* Red */
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: colorGlow 8s linear infinite;
    display: inline-block;
}

@keyframes colorGlow {
    0% { filter: hue-rotate(0deg) drop-shadow(0 0 15px rgba(168, 85, 247, 0.5)); }
    100% { filter: hue-rotate(360deg) drop-shadow(0 0 15px rgba(168, 85, 247, 0.5)); }
}

p, li {
    color: #8892b0 !important;
    line-height: 1.8;
    max-width: none !important; /* Forces it to fill the container */
    width: 100%;
}

.cta-button {
    padding: 12px 30px;
    border: 2px solid;
    border-image: var(--rainbow-grad) 1;
    color: white;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.cta-button:hover {
    background: var(--rainbow-grad);
    color: #0a192f;
    border-image: none;
    background-size: 400% 400%;
}

.tagline {
    font-size: 1.2rem;
    color: #64ffda;
    margin-bottom: 40px;
    font-weight: 300;
    text-align: center;
}

.content-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 900px; /* Increased width to give content more room */
    width: 95%;
    margin: 40px auto;
}

.card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid transparent;
    border-image: linear-gradient(to right, #e73c7e, #23a6d5) 1;
    cursor: pointer;
    overflow: hidden;
    
    /* Use a slightly larger max-height for the collapsed state */
    max-height: 70px; 
    
    /* Smooth transition for opening and closing */
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    width: 100%;
    
    /* These two lines ensure the header stays centered vertically */
    display: flex;
    flex-direction: column;
}

.card.expanded {
    max-height: 1000px; /* Large enough for all content */
}

.card-header {
    /* flex-grow ensures the header takes up the available space when collapsed */
    flex: 0 0 70px; 
    display: flex;
    align-items: center; /* This vertically centers the text */
    padding: 0 25px;    /* Removed vertical padding to let flex-alignment work */
    box-sizing: border-box;
}

.card-header h3 {
    margin: 0;
    width: 100%;
    color: #e73c7e;
    font-size: 1.1rem;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1;
    
    /* ADD THIS LINE FOR SMOOTH HOVER */
    transition: text-shadow 0.3s ease, color 0.3s ease; 
}

.card-body {
    padding: 10px 25px 30px 25px; /* Added back a bit of top padding for the body text */
    opacity: 0;
    transition: opacity 0.4s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Make text inside the body use the full width */
.card-body p {
    width: 100%;
    max-width: none; /* Removes any previous 500px limits */
    text-align: justify; /* Optional: gives a clean 'block' look to text */
    margin-bottom: 15px;
}

.card.expanded .card-body {
    display: block;
    opacity: 1;
    /* This delay makes the text appear AFTER the card slides open */
    transition: opacity 0.5s ease 0.2s;
}

.expand-icon {
    float: right;
    color: #64ffda;
    transition: transform 0.3s ease;
}

.card.expanded .expand-icon {
    transform: rotate(45deg);
    color: #ef4444; /* Changes to red/pink when open */
}

/* Improved Skills List to fill space */
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Items fill width in columns */
    gap: 10px;
    width: 100%;
}


.contact-area {
    display: flex;
    align-items: center;
    gap: 20px;
}

.secondary-link {
    color: #8892b0;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid transparent;
    transition: 0.3s;
}

.secondary-link:hover {
    color: white;
    border-bottom: 1px solid #23a6d5;
}

/* Footer Separation */
.site-footer {
    margin-top: 80px;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 800px;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.footer-links a {
    color: #64ffda;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-links a:hover { color: #e73c7e; }

#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    background: var(--rainbow-grad);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

/* This adds the illuminated aura to the title on hover */
.card:hover .card-header h3 {
    text-shadow: 0 0 8px rgba(231, 60, 126, 0.6), /* Initial Pink shadow */
                 0 0 15px rgba(231, 60, 126, 0.3), /* Wider, softer Pink shadow */
                 0 0 20px rgba(168, 85, 247, 0.1); /* Very subtle Purple edge */
}

/* This adds a glow to the expand-icon on hover */
.card:hover .expand-icon {
    color: white; /* Optional: Make the icon turn white on hover */
    text-shadow: 0 0 8px rgba(100, 255, 218, 0.7); /* Teal glow */
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .content-section {
        flex-direction: column;
        padding: 0 20px;
    }
    body {
        height: auto;
        padding: 50px 0;
    }
    .card { max-height: 60px; }
    .card-header { flex: 0 0 60px; }
    .card-body p {
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .light-beam, body, h1 {
        animation: none !important;
    }
}

.light-beam {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        45deg,
        transparent 45%,
        rgba(255, 255, 255, 0.03) 50%,
        transparent 55%
    );
    
    /* We use 'alternate' so it plays forward then backward */
    /* We use 'ease-in-out' to make the transition at the ends invisible */
    animation: sweep 15s ease-in-out infinite alternate !important;
}

@keyframes sweep {
    0% { 
        transform: translate(-10%, -10%); 
    }
    100% { 
        transform: translate(10%, 10%); 
    }
}

/* Container for legal pages to keep text readable */
.container {
    max-width: 1100px; /* Adjust this to 100% if you want it to touch the edges */
    width: 90%;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Keeps text left-aligned in the wide container */
}

/* Legal Page Headings */
.container h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    /* Uses the same rainbow glow as your main title */
}

.container h2 {
    color: #e73c7e; /* Matching your card header pink */
    margin-top: 40px;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* List Styling */
.container ul, .container ol {
    width: 100%;
    padding-left: 20px;
    box-sizing: border-box;
}

.container li {
    margin-bottom: 12px;
}

.container li strong {
    color: #64ffda; /* Teal highlight for key terms */
}

/* Links inside the text */
.container a {
    color: #23a6d5;
    text-decoration: none;
    transition: 0.3s;
}

.container a:hover {
    color: #e73c7e;
    text-decoration: underline;
}

.container p {
    text-align: left; /* Change to 'justify' if you want a clean block look */
    width: 100%;
}

/* Specifically target the email link in the footer and contact sections */
.container a[href^="mailto:"] {
    color: #64ffda !important; /* Bright Teal for high visibility */
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(100, 255, 218, 0.3); /* Adds a subtle underline */
    transition: all 0.3s ease;
}

.container a[href^="mailto:"]:hover {
    color: #e73c7e !important; /* Switches to Lumino Pink on hover */
    border-bottom: 1px solid #e73c7e;
    text-shadow: 0 0 10px rgba(231, 60, 126, 0.5); /* Adds a "light-up" effect */
}

/* This targets ANY link containing 'mailto' anywhere on the site */
a[href^="mailto:"] {
    color: #64ffda !important; /* Force Teal */
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: 0.3s ease;
}

/* Ensure it stays bright even after being clicked */
a[href^="mailto:"]:visited {
    color: #64ffda !important;
}

/* Glow effect on hover */
a[href^="mailto:"]:hover {
    color: #e73c7e !important; /* Turns Pink on hover */
    text-shadow: 0 0 10px rgba(100, 255, 218, 0.5);
}

/* Back Button Styling */
.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    color: #64ffda;
    text-decoration: none;
    font-size: 0.9rem;
    z-index: 100;
    transition: 0.3s;
    background: rgba(2, 12, 27, 0.8);
    padding: 8px 15px;
    border-radius: 5px;
}

.back-home:hover {
    color: #e73c7e;
    transform: translateX(-5px);
}

/* Legal Footer */
.container footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    text-align: center;
    color: #444;
}

/* Section Spacing for Legal/Support Pages */
section {
    margin-bottom: 50px;
    animation: fadeIn 0.8s ease;
}

/* The Support Contact Box */
.contact-box {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid #64ffda; /* Teal accent for support */
    padding: 20px 25px;
    margin-top: 20px;
    border-radius: 0 12px 12px 0;
    line-height: 1.6;
    color: #ccd6f6; /* Slightly brighter text for readability */
}

.contact-box strong {
    color: #64ffda;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.contact-box a {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

/* Specific styling for the Terms list */
#terms ul {
    list-style: none;
    padding: 0;
}

#terms li {
    margin-bottom: 20px;
    padding-left: 25px;
    position: relative;
}

/* Custom bullet points to match your 'Expertise' cards */
#terms li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: #e73c7e; /* Pink arrow */
    font-weight: bold;
}

#terms li strong {
    color: #f8f9fa; /* Off-white for term titles */
    display: block;
    margin-bottom: 4px;
}
