/* 
HOME CSS RULES

1. Styles for the hero section (big header/banner area)
2. Styles for homepage buttons or call-to-actions
3. Layout for homepage-only sections (like featured projects, welcome message)
4. Any special images or background styles
5. Animations or effects used only on the homepage
*/

/* 1. Styles for the hero section */
.hero {
    text-align: left;
    padding: 0rem;
    max-width: min(50vw, 800px);
    width: 100%;
}

/* Medium screen adjustments to prevent text clipping */
@media (max-width: 1200px) and (min-width: 769px) {
    .hero {
        max-width: min(45vw, 700px);
        padding-right: 1rem;
    }
    
    .main-heading {
        font-size: clamp(1.8rem, 4vw, 3rem);
        word-break: break-word;
    }
    
    .sub-heading {
        font-size: clamp(0.8rem, 2vw, 1.1rem);
    }
}

.main-heading {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 1px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sub-heading {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: #64ffda; /* Teal color for the subtext */
    letter-spacing: clamp(1px, 0.5vw, 2px);
    text-transform: uppercase;
    font-weight: 300;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 2. Styles for homepage buttons or call-to-actions */
.cta-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: transparent;
    border: 2px solid #64ffda;
    color: #64ffda;
    font-weight: 600;
    margin-top: 2rem;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

/* 3. Layout for homepage-only sections */
.profile-box {
    background-color: #000;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    text-align: center;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-top: -2rem;
    padding-left: 2rem;
    padding-right: 2rem;
    position: relative;
    left: 0;
}

.profile-image {
    max-width: 8rem;
    height: auto;
    margin: 0 auto 1rem;
    display: block;
}

.profile-text {
    color: #64ffda;
    font-size: 0.9rem;
    letter-spacing: 1px;
    font-weight: 500;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-left: 0;
    text-align: center;
}

.nav-menu li a {
    color: #ccc;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    padding: 0;
    transition: color 0.3s ease;
    display: inline-block;
}

.nav-menu li a:hover {
    color: #64ffda;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    left: -0.7em;
    top: 50%;
    transform: translateY(-50%);
    width: 0.3em;
    height: 0.3em;
    border-radius: 50%;
    background-color: #64ffda;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-menu li a:hover::before {
    opacity: 1;
}

/* 4. Any special images or background styles */
.content {
    background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
    position: relative;
}

/* Matrix Background Canvas */
.matrix-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Music Notes Animation Canvas */
.music-notes-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    opacity: 0.8;
}

/* Hero Video Background */
.hero-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero {
    position: relative;
    z-index: 3;
}

/* 5. Animations or effects used only on the homepage */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typing animation styles */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.hero {
    opacity: 1;
}

.main-heading {
    position: relative;
    display: block;
}

.heading-line {
    display: block;
    line-height: 1.2;
}

.sub-heading {
    position: relative;
    display: inline-block;
}

#typing-text-line1, #typing-text-line2 {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: none;
}

#sub-typing-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: none;
}

.cursor, .sub-cursor {
    display: inline-block;
    animation: blink 1s infinite;
    color: #64ffda;
    font-weight: 300;
}

.cursor {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1;
}

.sub-cursor {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    line-height: 1;
}

/* Hide cursors initially */
.cursor.hidden, .sub-cursor.hidden {
    display: none;
}

/* Mobile styles for hero section */
@media (max-width: 768px) {
    .hero {
        max-width: 100%;
        padding: 0;
        text-align: center;
        margin: 1rem 0;
    }
    
    .main-heading {
        font-size: 2rem;
        word-break: normal;
        word-wrap: break-word;
        hyphens: auto;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .sub-heading {
        font-size: 0.9rem;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    /* Allow text wrapping on mobile for typing animation */
    #typing-text-line1, #typing-text-line2 {
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: none;
        text-align: center;
    }
}

.nav-menu li {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.nav-menu li:nth-child(1) { animation-delay: 0.2s; }
.nav-menu li:nth-child(2) { animation-delay: 0.4s; }
.nav-menu li:nth-child(3) { animation-delay: 0.6s; }
.nav-menu li:nth-child(4) { animation-delay: 0.8s; }
.nav-menu li:nth-child(5) { animation-delay: 1.0s; }

/* Social Icons Styling */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-left: 0.5rem;
}

.social-icons a {
    color: #ccc;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover {
    color: #64ffda;
    transform: translateY(-3px);
}

/* Animation for social icons */
.social-icons a {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

.social-icons a:nth-child(1) { animation-delay: 1s; }
.social-icons a:nth-child(2) { animation-delay: 1.2s; }
.social-icons a:nth-child(3) { animation-delay: 1.4s; }