/* Essential styles migrated from style.scss and enhanced for the new architecture */

@import url("https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700");
@import url("https://fonts.googleapis.com/css?family=Anonymous+Pro");
@import url('https://fonts.googleapis.com/css?family=Raleway:200');

/* Global base styles */
html {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    /* Removed scroll-behavior: smooth to prevent jiggle when clicking navbar links */
    /* JavaScript handles smooth scrolling with proper offset calculations */
}

body {
    font: normal 75% Arial, Helvetica, sans-serif;
    width: 100%;
    height: 100%;
    color: #999;
}

html, body {
    width: 100%;
    height: 100%;
}

/* Essential Typography */
p, span, .modal-body {
    font-family: "Poppins", sans-serif;
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: #999;
}

h1, h2, h3, h4 {
    color: #999;
}

span {
    font-family: 'Anonymous Pro';
    /*color: rgb(247, 247, 247);*/
    text-decoration: underline rgba(255, 0, 0, 0);
}

/* Enhanced HeadlineText with glow effect - smaller size to prevent height jumping */
.HeadlineText {
    position: relative;
    top: 5%;
    width: 10em;
    margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: underline rgba(255, 0, 0, 0);
    text-shadow:
        0 0 10px rgba(120, 119, 198, 0.5),
        0 0 20px rgba(120, 119, 198, 0.3),
        0 0 30px rgba(120, 119, 198, 0.2);
    animation: textGlow 2s ease-in-out infinite alternate;
    font-size: 1.5rem; /* Smaller font size to reduce height impact */
}

@keyframes textGlow {
    from {
        text-shadow:
            0 0 10px rgba(120, 119, 198, 0.5),
            0 0 20px rgba(120, 119, 198, 0.3),
            0 0 30px rgba(120, 119, 198, 0.2);
    }
    to {
        text-shadow:
            0 0 15px rgba(120, 119, 198, 0.7),
            0 0 25px rgba(120, 119, 198, 0.4),
            0 0 35px rgba(120, 119, 198, 0.3);
    }
}

/* Red heart styling and typewriter fixes */
.red-heart {
    color: #ff0000 !important;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.2); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
}

/* Typewriter container - simple and clean */
.typewriter-smooth {
    display: inline-block;
    min-width: 200px; /* Smaller fixed width */
}

.typewriter-smooth .wrap {
    display: inline-block;
    min-height: 1em; /* Minimal height to prevent complete collapse */
    padding-right: 0.5rem; /* Add right padding to prevent text overlapping */
}

/* HeadlineSection for main section headings */
.HeadlineSection {
    font-size: 2.5rem;
    font-weight: 300;
    color: #fff;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Layout containers */
#WrapperContainer {
    padding-top: 20px;
    padding-left: 5px;
    padding-right: 5px;
}

.z-index-content {
    position: relative;
    z-index: 10;
}

.main-content-fix {
    position: relative;
    z-index: 10;
    padding-top: 20px; /* Simple standard spacing */
}

/* Essential card styles with glassmorphism */
.card {
    margin: 0 auto;
    float: none;
    margin-bottom: 10px;
    
    /* Modern glassmorphism card effect */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    
    /* Enhanced shadows */
    box-shadow:
        0 8px 25px 0 rgba(0, 0, 0, 0.2),
        0 4px 12px 0 rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    /* Smooth transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

/* Enhanced hover effects */
.card:hover {
    transform: translateY(-8px) scale(1.02);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 20px 40px 0 rgba(0, 0, 0, 0.3),
        0 8px 20px 0 rgba(120, 119, 198, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Add subtle glow effect to cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(120, 119, 198, 0.1) 0%,
        transparent 50%,
        rgba(255, 119, 198, 0.1) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card:hover::before {
    opacity: 1;
}

/* Profile photo styling */
#ProfilePhoto {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 60%;
    border-radius: 50%;
}

/* Contact card positioning */
#ContactCard {
    max-width: 18rem;
    width: auto;
    float: right;
}

/* Skill images */
.SkillImage {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 35%;
    max-width: 100px;
    height: auto;
}

/* Project card images - proper sizing */
.project-card .SkillImage {
    width: 60px;
    height: 60px;
    max-width: 60px;
    object-fit: contain;
}

/* Modal images - responsive and properly contained */
.modal-body img,
.modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Image slider specific styling */
#GardenLightSlider img,
#SpeakerSlider img,
#HomeNetworkSlider img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

/* Bootstrap Carousel Styling */
.carousel {
    max-width: 100%;
    margin: 20px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carousel-inner {
    border-radius: 15px;
}

.carousel-item {
    text-align: center;
    background: #000;
}

.carousel-item img {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: 10px;
}

/* Carousel controls styling */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 20px 20px;
}

/* Remove old slider styles */
.ideal-image-slider {
    max-width: 100%;
    overflow: hidden;
}

.SkillOverviewH5 {
    float: right;
    margin-right: 5px;
    font-size: 25px;
}

/* Essential typewriter styles */
#typewriter {
    font-size: 1.5em;
    margin: 0;
    color: #999;
    font-family: "Courier New";
}

#typewriter:after {
    content: "|";
    animation: blink 500ms linear infinite alternate;
}

@keyframes blink {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Syntax highlighting */
.var-highlight {
    color: #f5c503;
}

.string-highlight {
    font-weight: 500;
    color: rgba(199, 90, 26, 0.8);
}

/* Navigation link styling with hover effects */
.nav-link {
    font-size: 1.7rem; /* Increased font size */
    position: relative;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    overflow: hidden;
}

.nav-link i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(102, 126, 234, 0.1);
    /* Removed transform to prevent jiggle when clicking */
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link:active {
    /* Removed transform to prevent jiggle when clicking */
    transition: transform 0.1s ease;
}

/* Navbar brand hover effect */
.navbar-brand a {
    transition: all 0.3s ease;
}

.navbar-brand:hover a {
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.8);
    transform: scale(1.05);
}

/* Mobile navbar toggler hover effect */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    border-color: rgba(102, 126, 234, 0.8);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.4);
    background: rgba(102, 126, 234, 0.1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
}

/* Enhanced navbar background with fixed height */
.navbar-enhanced {
    background: rgba(13, 13, 35, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    min-height: 80px; /* Fixed height for desktop */
    height: 80px;
}

.navbar-enhanced .container-fluid {
    min-height: 80px;
    display: flex;
    align-items: center;
}

.navbar-enhanced:hover {
    background: rgba(13, 13, 35, 0.98) !important;
    border-bottom-color: rgba(102, 126, 234, 0.4);
}

/* Mobile navbar fixed height */
@media (max-width: 991.98px) {
    .navbar-enhanced {
        min-height: 70px;
        height: auto; /* Allow height to expand when collapsed content is shown */
    }
    
    .navbar-enhanced .container-fluid {
        min-height: 70px;
    }
    
    /* When navbar collapse is shown, ensure it pushes content down */
    .navbar-enhanced .navbar-collapse.show {
        padding-bottom: 15px;
    }
    
    /* Add some spacing between nav items when collapsed */
    .navbar-enhanced .navbar-collapse.show .nav-item {
        padding: 5px 0;
    }
}

/* Utility classes */
.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #ddd;
    margin: 40px 0;
}

.table {
    margin: auto;
    text-align: center;
    font-size: 15px;
}

canvas {
    display: block;
}

/* Video responsiveness */
video {
    width: 100% !important;
    height: auto !important;
}

/* Progress bars */
.progress {
    margin-bottom: 10px;
}

/* Modal styles */
.ModalModalImage {
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    max-width: 100%;
    height: auto;
}

.ModalModalImage:hover {
    opacity: 0.7;
}

.modalImage {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.9);
}

/* Enhanced Bootstrap modal styling */
.modal-dialog {
    max-width: 90vw;
    margin: 2rem auto;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 100%;
    background: rgba(33, 37, 41, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: 2rem;
}

/* Project card enhancements */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.project-btn {
    border: none;
    background: transparent;
    width: 100%;
    height: 100%;
    padding: 2rem 1rem;
}

.ModalCaption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

.modal-content, .ModalCaption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.caption {
    font-size: 15px !important;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg,
        rgba(120, 119, 198, 0.8),
        rgba(255, 119, 198, 0.8));
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg,
        rgba(120, 119, 198, 1),
        rgba(255, 119, 198, 1));
}

/* Responsive breakpoints */
@media all and (min-width:960px) and (max-width: 1024px) {
    #typewriter {
        font-size: 1.0em;
        margin: 0;
        font-family: "Courier New";
        color: #999;
    }

    #typewriter:after {
        content: "|";
        animation: blink 500ms linear infinite alternate;
    }

    #ContactCard {
        max-width: 18rem;
        width: auto;
        clear: both;
    }

    .SkillOverviewH5 {
        float: right;
        margin-right: 5px;
        font-size: 10px;
    }
}

@media all and (min-width:801px) and (max-width: 959px) {
    #typewriter {
        font-size: 1.0em;
        margin: 0;
        font-family: "Courier New";
        color: #999;
    }

    #typewriter:after {
        content: "|";
        animation: blink 500ms linear infinite alternate;
    }

    #ContactCard {
        max-width: 18rem;
        width: auto;
        float: none;
    }

    .SkillOverviewH5 {
        float: right;
        margin-right: 5px;
        font-size: 10px;
    }
}

@media all and (min-width:769px) and (max-width: 800px) {
    #typewriter {
        font-size: 1.0em;
        margin: 0;
        font-family: "Courier New";
        color: #999;
    }

    #typewriter:after {
        content: "|";
        animation: blink 500ms linear infinite alternate;
    }
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
    
    #ContactCard {
        float: none;
        margin: 0 auto;
    }
    
    .HeadlineSection {
        font-size: 2rem;
    }
}
