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

/* Body Styles */
body {
    font-family: Helvetica;
    line-height: 1.6;
    background: linear-gradient(to right, #fc4a1a, #3c7fc3, #d459f2, #ffaf7b);
    animation: multicolorOmbreAnimation 10s infinite;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    /* Disable text selection */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none;         /* Non-prefixed version, currently supported by Chrome, Opera and Edge */
}
h1, h2, h3, .nav-box{
    font-family: Papyrus;
}

/* Multicolor Ombre Animation */
@keyframes multicolorOmbreAnimation {
    0% {
        filter: hue-rotate(0deg);
        background-position: 0% 50%;
    }
    25% {
        filter: hue-rotate(90deg);
        background-position: 25% 50%;
    }
    50% {
        filter: hue-rotate(180deg);
        background-position: 50% 50%;
    }
    75% {
        filter: hue-rotate(270deg);
        background-position: 75% 50%;
    }
    100% {
        filter: hue-rotate(360deg);
        background-position: 100% 50%;
    }
}

/* Header Styles */
header {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 40px 0em 0em 0em; /* Add top padding to account for the fixed view counts */
    text-align: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 0em;
    height: 30vh;
    justify-content: center;
}

.header-content {
    position: relative;
    z-index: 1; /* Ensure the content is above the background */
}

mark{
    background-color: #00000033;
    color: white;
}

/* Greetings */
.dynamic-typing {
    font-size: 2.5em;
    font-weight: bold;
    color: #ffffff;
    display: inline-block;
    border-right: 2px solid;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    animation: typing 2s steps(30, end), blink-caret 0.75s step-end infinite;
}

.cursor {
    display: inline-block;
    width: 2px;
    animation: blink 0.7s infinite;
}

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

@keyframes blink-caret {
    from, to { border-color: transparent; }
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    50.01%, 100% { opacity: 0; }
}

.header-text h1 {
    margin: 0;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.logo-animation {
    position: absolute; /* Absolute position to stay within the header */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    z-index: -1; /* Ensure the logo animation is behind the content */
    pointer-events: none; /* Allow clicks to pass through */
}

.logo-animation img {
    width: 90px;
    height: 90px;
    animation: float 10s infinite, shrink 5s infinite alternate, replace 15s infinite;
}

.logo-animation img:nth-child(odd) {
    animation: float 10s infinite, shrink 5s infinite alternate, replace 15s infinite;
}

.logo-animation img:nth-child(even) {
    animation: float-reverse 10s infinite, grow 5s infinite alternate, replace 15s infinite;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes float-reverse {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(20px);
    }
    100% {
        transform: translateY(0);
    }
}

@keyframes shrink {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.8);
    }
}

@keyframes grow {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.2);
    }
}

@keyframes replace {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 0.1;
    }
    100% {
        opacity: 0.8;
    }
}

/* Navigation Styles */
.fixed-nav {
    width: 100%;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    margin: 0;
    background: #333;
    color: white;
    z-index: 2;
}

/* Box Styles */
.nav-box {
    width: auto; /* Adjust width to fit the nav */
    height: auto; /* Adjust height to fit the nav */
    background: linear-gradient(to right, #f7b733, #fc4a1a, #ffaf7b); /* Orange gradient */
    animation: ombreAnimation 5s infinite;
    margin: 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center; /* Center align the text */
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
}

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

nav {
    display: flex;
    justify-content: space-between;
    border: 2px solid #524c4ca4;
    padding: 0.3em;
    margin-top: 0.5em;
}

nav a {
    flex: 1;
    border-right: 1px solid #333;
    padding: 0.2em;
    color: #fff;
    margin: 0 1em;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.4s ease, transform 0.3s ease;
    font-size: 1.15em;
}

nav a:last-child {
    border-right: none;
}

nav a:hover {
    background:rgba(0, 0, 0, 0.1);
    color: #339cf7;
    transform: scale(1.1);
}

/* Main Content Styles */
main {
    padding: 1em;
    max-width: 1300px;
    margin: 0.5em auto;
    background: linear-gradient(to right, #eef5d3, #f9f9f9);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Common Styles */
section {
    margin-bottom: 2em;
    scroll-margin-top: 4em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h2 {
    font-size: 2em;
    margin-bottom: 1em;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 0.5em;
    color: #333;
    text-align: center;
}

#intro, #skills, #experience, #projects, #contact {
    padding: 1em;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Intro Section Styles */
.intro-container {
    background: linear-gradient(50deg, beige, #b7d0ae);
    color: saddlebrown;
    align-items: center;
    min-height: 10vh;
    padding: 10px;
    display: flex;
    width: 100%;
}

.profile-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 10%; /* Increased padding */
    display: flex;
    backdrop-filter: blur(10px);
}

.profile-image img {
    width: 200px;
    height: 200px;
    border-radius: 40%;
    object-fit: cover;
    object-position: 45% 20%;
    padding: 10px;
    margin-right: 50px; /* Increased margin */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.4s ease-in-out;
}

.profile-image img:hover {
    transform: scale(1.1);
}

.profile-details h1 {
    font-size: 2.5em; /* Increased font size */
    margin-bottom: 10px;
    font-weight: 500;
    font-family: sans-serif;
}

.profile-details .role {
    font-size: 1.2em;
    color: #213e64;
    margin-bottom: 10px;
}

.profile-details .one-liner {
    font-size: 1.2em;
    margin-bottom: 5px;
    line-height: 1.5;
}

.about-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Adjusted min width */
    gap: 15px; /* Increased gap */
}

.about-points p {
    font-size: 1.15em;
    margin: 10px 0;
    transition: transform 0.3s ease;
    padding: 12px 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
}

.about-points p:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
}

.highlight {
    font-weight: bold;
    color: #6495ed;
}

#about-display {
    position: relative;
    padding: 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
}

#about-description {
    display: block;
    font-size: 1em;
}

.about-name {
    display: block;
}

/* Intro Animations */
.profile-card {
    animation: fadeIn 1s ease-out;
}

.profile-image img {
    animation: slideInLeft 1s ease-out;
}

.profile-details {
    animation: slideInRight 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Skills Styles */
#skills {
    margin-top: 30px;
    text-align: center;
}
  
.card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
  
.card {
    background-color: #d9f140;
    border-radius: 5px;
    justify-content: center;
    padding: 10px;
    margin: 10px;
    width: 200px;
    cursor: pointer;
    text-align: center;
    top: 50%;
    left: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.card:nth-child(odd) {
    background-color: #e6f5ff;
}
  
.card:nth-child(even) {
    background-color: #f5f5f5;
}

.card:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
  
.card.active .hidden-list {
    display: block;
}

.card h3 {
    margin-bottom: 10px;
}
  
.hidden-list {
    display: none;
    list-style: none;
    padding: 0;
}

.skill {
    display: flex;
    align-items: center;
    margin: 0.5em;
    border-radius: 5px;
    background: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    transition: background 0.3s ease;
    position: relative;
}

.skill img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    padding: 5px;
    transition: opacity 0.3s ease;
}

.skill p {
    font-size: 0.8em;
    color: #fff;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    text-align: center;
}

.skill:hover {
    background: rgba(0, 0, 0, 0.8);
}

.skill:hover img {
    opacity: 0;
}

.skill:hover p {
    opacity: 1;
}

/* General Styles */
.experience-item, .project-item, .contact-info {
    background-color: #ffffff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Experience Styles */
.experience-item {
    text-align: center;
    border-radius: 10px;
    margin: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: height 0.3s ease, box-shadow 0.3s ease;
    padding: 30px;
}

.experience-item:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.have-border {
    border-bottom: 3px solid #4a90e2;
    margin-bottom: 10px;
    padding-bottom: 5px;
}

.experience-item .details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.show-more {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.show-more:hover {
    background-color: #3e8e41;
    transform: scale(1.05);
}

.experience-item.active .details {
    max-height: 100%;
    text-align: left;
    margin-top: 20px;
}

.experience-item ul {
    list-style: none;
    padding: 0;
    margin: 0 10px 20px 10px;
}

.experience-item ul li::before {
    content: "\2022";
    margin-right: 5px;
    color: #4a90e2;
}

.experience-item p {
    margin-bottom: 15px;
}

.experience-item p strong {
    margin-top: 15px;
}

/* Certifications Styles */
.experience-item.active .certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cert-item {
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cert-item:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}

.cert-item img {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

/* Projects Styles */
.projects-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}

.project-item {
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: calc(50% - 20px); /* Two items per row with gap */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.project-item ul {
    list-style-type: circle;
    padding: 10px;
}

.view-counts {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
     gap: 10px;
    padding: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    align-items: center;
    gap: 1rem;
    margin-top: 5px;
}

.view-counts ul {
    display: flex;
    flex-direction: column;
    list-style-type: none;
    gap: 5px;
    padding: 0;
    flex: 1;
}

.view-counts ul li {
    font-size: 14px;
    color: #333;
}

.view-counts .btn {
    flex-shrink: 0;
    white-space: nowrap;
    margin-top: 0;
}

.view-counts #today-views {
    font-weight: bold;
    color: #007bff;
}

.view-counts #total-views {
    font-weight: bold;
    color: #28a745;
}

.btn {
    display: inline-block;
    padding: 5px 10px;
    margin-top: 10px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
}

.db-note {
    display: block;
    margin-top: 0.25em;
    font-size: 0.85em;
    color: #888;
    font-style: italic;
}

/* Contact Styles */
#contact {
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 2em;
}

#contact h2 {
    font-size: 2em;
    color: #333;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 1.5em;
}

.contact-info a, .contact-info button {
    display: inline-block;
    transition: transform 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    margin: 0 15px;    
}

.contact-info a:hover,
.contact-info button:hover {
    transform: scale(1.1);
}

.contact-info img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    vertical-align: middle;
}

/* Footer Styles */
footer {
    background: #4a90e2; /* Matching header color */
    color: #fff;
    text-align: center;
    padding: 1em;
    position: relative;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        font-size: 0.5em;
    }
    header{
        height: auto;
        padding: 20px 0;
    }
    header h1{
        font-size: 1.8em;
    }
    .logo-animation{
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        opacity: 0;
        animation: fade-in 2s forwards;
    }
    .logo-animation img {
        width: 20px;
        height: 20px;
        margin: 5px;
    }
    @keyframes fade-in {
        from { opacity: 0.1; }
        to { opacity: 0.8; }
    }
    .nav-box {
        flex-direction: column;
        align-items: center;
        padding: 2px;
    }
    nav a {
        border-right: none;
        border-bottom: 1px solid #333;
    }
    section {
        scroll-margin-top: 100px;
    }
    #intro img {
        height: 50px;
        width: 50px;
        padding: 2px;
    }
    .profile-card {
        flex-direction: column; /* Stack image and details vertically */
        align-items: center; /* Center items horizontally */
    }
    .profile-image {
        margin-right: 0; /* Remove right margin */
        margin-bottom: 20px; /* Add bottom margin for spacing */
    }
    .profile-image img {
        margin: 0; /* remove default margin */
    }
    .profile-details {
        text-align: center; /* Center text in details */
    }
    .about-points {
        grid-template-columns: 1fr; /* Single column layout on mobile */
    }
    main {
        padding: 1.5em;
    }
    .card {
        width: calc(50% - 20px); /* Calculate width for two cards per row */
    }
    .skill{
        display: flex;
        flex-direction:row;
        align-content: center;
    }
    .skill img {
        width: 25px;
        height: 25px;
    }
    .skill p {
        font-size: 0.3em; /* Adjusted font size */
        opacity: 1;
        color: #181515;
    }
    .show-more, .btn{
        padding: 5px 10px;
        font-size: 1em;
    }
    .cert-item img {
        width: 20px;
        height: 30px;
        margin-right: 5px;
    }
    .cert-item {
        padding: 5px;
        margin: 1px;
    }    
    .projects-container {
        flex-direction: column;
    }
    .project-item {
        width: 100%;
    }
    .view-counts {
        flex-direction: column;
        align-items: flex-start;
    }
    .view-counts ul li {
        font-size: 1.2em;
    }
    .view-counts .btn {
        width: 100%;
        text-align: center;
    }    
    .contact-info a, .contact-info button {
        margin: 0 10px;    
    }
    .contact-info img {
        width: 30px;
        height: 30px;
    }
}
