/* Add these @font-face declarations at the very top of your CSS file */
@font-face {
    font-family: 'CustomFont';
    src: url('fonts/your-font-file.ttf') format('truetype');
    /* Add more src lines for different font file formats if you have them */
}

@font-face {
    font-family: 'Clash Grotesk';
    src: url('fonts/ClashGrotesk-Variable.ttf') format('truetype');
    font-weight: 200 700;  /* Variable font weight range */
}

/* Add this at the very top of your CSS file */
html {
    scroll-behavior: smooth !important;  /* Added !important to ensure it takes precedence */
}

/* Reset default styles - removes browser default margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;  /* Makes sure padding doesn't affect total width */
}

/* Navigation styling */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: transparent;
    padding: 1rem 0;
    z-index: 1000;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-links a {
    color: white;          /* Default color is white */
    text-decoration: none;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ff7300;  /* Hover color matches active color */
}

/* Basic body styling */
body {
    font-family: 'Clash Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: black;  /* Fallback color */
}

/* Introduction section - full-screen landing area */
.introduction {
    height: 100vh;
    background: linear-gradient(135deg, 
            rgba(255, 115, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.95) 25%,
            rgba(0, 0, 0, 1) 50%,
            rgba(0, 0, 0, 0.95) 75%,
            rgba(255, 115, 0, 0.2) 100%);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite,
               fadeIn 1s ease-out forwards; /* Add fadeIn animation */
    padding: 2rem;
    padding-top: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

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

/* Add fadeIn keyframes animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Update the children elements of introduction to have original staggered animations */
.introduction > * {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.introduction .memoji {
    animation-delay: 0.2s;
}

.introduction h1 {
    animation-delay: 0.4s;
}

/* Group the h2 and location animation together */
.introduction .intro-details {
    animation-delay: 0.6s;
}

.introduction .social-icons {
    animation-delay: 0.8s;
}

.introduction .visitor-counter {
    animation-delay: 1.0s;
}

/* Add this new class */
.intro-details {
    text-align: center;
}

/* Update existing styles to remove individual delays */
.introduction h2,
.introduction .location {
    margin-bottom: 0.5rem;
}

/* Introduction text styling */
.introduction h1 {
    color: #ff7300;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    font-weight: 600;
    font-size: 2.5rem;  /* Slightly larger for the name */
}

.introduction h2 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    font-weight: 500;
    font-size: 1.5rem;  /* Smaller than h1 */
}

/* Update animation delay for the new structure */
.introduction h2 {
    animation-delay: 0.5s;
}

/* Social icons styling */
.social-icons {
    margin-top: 2rem;
    display: flex;
    gap: 1.5rem;  /* Adds space between icons */
}

.icon {
    width: 35px;
    height: 35px;
    transition: all 0.3s ease;  /* Changed to all to transition both transform and filter */
    filter: brightness(0) invert(1);  /* Makes icon white */
}

.icon:hover {
    transform: scale(1.1);
    filter: invert(48%) sepia(75%) saturate(2122%) hue-rotate(346deg) brightness(103%) contrast(101%);  /* Makes icon #ff7300 */
    fill: #ff7300;  /* Ensures the SVG is filled with the color */
}

/* Resume section container */
.resume {
    margin: 0;
    padding: 4rem 2rem;   /* Increased padding for better vertical spacing */
    background-color: white;
}

/* Makes section headings consistent */
.education h1,
.certifications h1,
.projects h1 {
    display: inline-block;
    vertical-align: top;
    margin-left: 10rem;
    position: absolute;
    font-weight: 600;
    color: #ff7300;
    margin-bottom: 2rem;  /* Added bottom margin for headings */
}

/* Container for sections */
.education,
.certifications,
.projects {
    position: relative;
    margin-bottom: 4rem;  /* Space between sections */
}

/* Add orange line spacers between sections */
.certifications::after,
.projects::after {
    content: '';
    display: block;
    width: 80%;          /* Increased width to cover headings */
    height: 2px;
    background-color: #ff7300;
    position: absolute;
    bottom: -2rem;       
    left: 15%;          /* Adjusted left position to start from headings */
    transform: none;    /* Remove transform since we're not centering */
    opacity: 0.7;       
}

/* Remove the line after the last section */
.education::after {
    display: none;
}

/* Makes lists consistent and aligned */
.education-list,
.certification-list,
.project-list {
    display: inline-block;
    vertical-align: top;
    max-width: 600px;
    margin-left: 30rem;
    padding-top: 0.5rem;  /* Add slight padding at top of lists */
}

/* Makes items consistent */
.education-item,
.certification-item,
.project-item {
    margin-bottom: 2.5rem;  /* Increased space between items */
}

.education-item:last-child,
.certification-item:last-child,
.project-item:last-child {
    margin-bottom: 0;  /* Remove margin from last items */
}

/* Headings spacing */
.education-item h2,
.certification-item h2,
.project-item h2 {
    color: #2d3748;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;  /* Increased space after headings */
    font-weight: 400;
}

/* Institution spacing */
.education-item h4.institution {
    margin-bottom: 0.4rem;  /* Space between institution and date */
}

/* Project description spacing */
.project-item p {
    margin-bottom: 0.8rem;  /* Space between description and link */
    line-height: 1.6;  /* Improved line height for readability */
}

/* Media queries for resume section */
@media screen and (max-width: 1024px) {
    .education-list,
    .certification-list,
    .project-list {
        margin-left: 25rem;    /* Adjusted for medium screens */
    }

    .education h1,
    .certifications h1,
    .projects h1 {
        margin-left: 10rem;    /* Adjusted for medium screens */
    }
}

@media screen and (max-width: 768px) {
    .education h1,
    .certifications h1,
    .projects h1 {
        position: static;
        margin-left: 0;
        text-align: center;
        margin-bottom: 2rem;
    }

    .education-list,
    .certification-list,
    .project-list {
        margin-left: 0;
        padding: 0 1rem;
    }

    .resume {
        padding: 3rem 1.5rem;  /* Adjusted padding for mobile */
    }

    .education,
    .certifications,
    .projects {
        margin-bottom: 3rem;  /* Reduced section spacing on mobile */
    }

    .education-item,
    .certification-item,
    .project-item {
        margin-bottom: 2rem;  /* Reduced item spacing on mobile */
    }

    .certifications::after,
    .projects::after {
        width: 90%;     /* Even wider line on mobile */
        left: 5%;       /* Center on mobile */
        bottom: -1.5rem;
    }
}

/* Style the project link */
.project-item a {
    display: inline-block;
    color: #4299e1;
    text-decoration: none;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.project-item a:hover {
    text-decoration: underline;
}

/* About Me Section */
.about-me {
    background-color: #121212;
    padding: 4rem 2rem;
    position: relative;
    margin-bottom: 0;
}

.about-content {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    padding-right: 8rem;
    position: relative;
}

.about-text-container {
    flex: 1;
    padding-left: 2rem;
    color: #ffffff;
}

.about-me h1 {
    font-weight: 600;
    color: #ff7300;
    margin-bottom: 2rem;
    margin-left: 0;
}

.about-text {
    max-width: 800px;
    margin-left: 0;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 8rem;
}

.about-text p {
    color: #e0e0e0;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 1.5rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-text strong {
    color: #ff7300;
    font-weight: 600;
}

/* Add this to your existing styles */
.memoji {
    width: 200px;
    height: 200px;
    object-fit: contain;
    margin-bottom: 2rem;
}

/* Add these media queries at the end of your CSS file */

/* General responsive adjustments */
@media screen and (max-width: 1024px) {
    .education-list,
    .certification-list,
    .project-list {
        margin: 0 auto;
        max-width: 90%;
    }
}

/* Tablet and smaller screens */
@media screen and (max-width: 768px) {
    /* Navigation adjustments */
    .navbar {
        background-color: rgba(0, 0, 0, 0.9);
    }

    /* Introduction section */
    .introduction p {
        padding: 0 1rem;
        font-size: 0.9rem;
    }

    .memoji {
        width: 150px;
        height: 150px;
    }

    /* About section */
    .about-content {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding-right: 0;
    }

    .about-text-container {
        padding-left: 0;
    }

    .about-text-container::before {
        display: none;
    }

    .profile-image {
        margin-left: 0;
    }

    .about-me h1 {
        text-align: center;
    }

    .about-text {
        padding: 0 1rem;
    }

    /* Resume section */
    .education h1,
    .certifications h1,
    .projects h1 {
        position: static;
        margin-left: 0;
        text-align: center;
        margin-bottom: 2rem;
    }

    .education-list,
    .certification-list,
    .project-list {
        margin-left: 0;
        padding: 0 1rem;
    }

    .visitor-counter {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Mobile screens */
@media screen and (max-width: 480px) {
    /* Navigation */
    .nav-links {
        gap: 1rem;
    }

    .nav-links a {
        font-size: 1rem;
        padding: 0.3rem 0.7rem;
    }

    /* Introduction */
    .introduction h1 {
        font-size: 1.5rem;
    }

    .introduction p {
        font-size: 0.85rem;
    }

    .memoji {
        width: 120px;
        height: 120px;
    }

    /* Social icons */
    .social-icons {
        gap: 1rem;
    }

    .icon {
        width: 30px;
        height: 30px;
    }

    /* About section */
    .profile-image {
        width: 120px;
        height: 120px;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    /* Resume section */
    .certification-item h2,
    .project-item h2 {
        font-size: 1.1rem;
    }

    .certification-item .date,
    .project-item p {
        font-size: 0.8rem;
    }
}

/* Handle very small screens */
@media screen and (max-width: 320px) {
    .introduction h1 {
        font-size: 1.3rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.2rem 0.5rem;
    }
}

/* Handle landscape orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .introduction {
        padding-top: 1rem;
    }

    .memoji {
        width: 100px;
        height: 100px;
        margin-bottom: 1rem;
    }

    .introduction h1 {
        margin-bottom: 0.5rem;
    }

    .social-icons {
        margin-top: 1rem;
    }
}

/* Ensure smooth transitions when resizing */
* {
    transition: all 0.3s ease-in-out;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Add this with your other styles */
.visitor-counter {
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 115, 0, 0.1);
    border: 1px solid #ff7300;
    border-radius: 5px;
    color: #ffffff;
    font-size: 0.9rem;
    display: inline-block;
}

#visitor-count {
    color: #ff7300;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Update the institution styling */
.education-item h4.institution {
    color: #4a5568;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

/* Update existing styles to remove the old institution class */
.education-item .date,
.certification-item .date,
.project-item p {
    color: #718096;
    font-size: 0.9rem;
}

/* Add vertical separator line */
.about-text-container::before {
    content: '';
    position: absolute;
    left: calc(200px + 8rem + 2rem);  /* Image width + left margin + half of gap */
    top: 50%;                         /* Start from middle */
    transform: translateY(-50%);      /* Center vertically */
    height: 80%;                      /* Reduce height to 80% */
    width: 2px;
    background-color: #ff7300;
}

/* Add base animation styles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add animation classes */
.about-me,
.certifications,
.projects,
.education {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Back to 0.8s */
}

.about-me.visible,
.certifications.visible,
.projects.visible,
.education.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Remove the introduction from this list */
.certification-item,
.project-item,
.education-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Back to 0.8s */
}

.certification-item.visible,
.project-item.visible,
.education-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Update the skills grid styles */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Change to 4 columns */
    gap: 1.5rem;
    padding: 2rem;
    margin-top: 2rem;
    max-width: 1200px; /* Add max-width for better layout control */
    margin-left: auto;
    margin-right: auto;
}

/* Update the skill tile size */
.skill-tile {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 200px;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

/* Update the glowing border effect */
.skill-tile::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        #ff7300,
        transparent 30%,
        transparent 70%,
        #ff7300
    );
    animation: rotate 3s linear infinite; /* Changed to 3s for smoother rotation */
    opacity: 0;
    transition: opacity 0.3s ease-in-out; /* Slightly slower fade in */
}

/* Update the hover effect */
.skill-tile:hover::before {
    opacity: 0.6; /* Reduced opacity for subtler glow */
}

/* Update the hover transition */
.skill-tile:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease-in-out;
}

/* Add inner background to cover the rotating gradient */
.skill-tile::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #1a1a1a;
    border-radius: 10px;
    z-index: 1;
}

/* Add the rotation animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Add media query for responsive layout */
@media screen and (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on smaller screens */
        padding: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 0.8rem;  /* Tighter gap between tiles */
        padding: 0.8rem;  /* Less padding around grid */
    }

    .skill-tile {
        min-height: 100px;  /* Much shorter tiles */
        padding: 0.8rem;  /* Less padding inside tiles */
    }

    .skill-icon {
        width: 30px;  /* Smaller icons */
        height: 30px;
        margin-bottom: 0.3rem;  /* Less space below icon */
    }

    .skill-tile h3 {
        font-size: 0.9rem;  /* Smaller heading */
        margin: 0;  /* Remove margin */
    }

    .skill-tile p {
        display: none;  /* Hide descriptions on mobile */
    }

    /* Adjust the glowing border effect for mobile */
    .skill-tile::before {
        animation: none;  /* Disable rotation animation on mobile */
    }

    .skill-tile:hover {
        transform: none;  /* Disable hover effect on mobile */
    }
}

/* Add even more compact styling for very small screens */
@media screen and (max-width: 320px) {
    .skills-grid {
        gap: 0.5rem;  /* Even tighter gap */
        padding: 0.5rem;  /* Less padding */
    }

    .skill-tile {
        min-height: 80px;  /* Even shorter tiles */
        padding: 0.5rem;  /* Less padding */
    }

    .skill-icon {
        width: 25px;  /* Even smaller icons */
        height: 25px;
    }

    .skill-tile h3 {
        font-size: 0.8rem;  /* Smaller text */
    }
}

.skill-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    filter: brightness(1); /* Ensure icons are visible */
}

.skill-tile h3 {
    color: #ffffff;
    margin: 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 2;
}

.skill-tile p {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    z-index: 2;
}

/* Make sure all content stays above the background effects */
.skill-tile .skill-icon,
.skill-tile h3,
.skill-tile p {
    position: relative;
    z-index: 2; /* Higher than the ::after pseudo-element */
}

/* Add new location styles */
.location {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.location img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);  /* Makes the icon white */
}

/* Add this with your introduction text styling */
.introduction h3 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    font-weight: 400;  /* Lighter weight than h2 */
    font-size: 1.1rem;  /* Smaller than h2 */
    opacity: 0.9;  /* Slightly more subtle than h2 */
}

/* Update animation delay for the new structure */
.introduction h3 {
    animation-delay: 0.6s;
}

/* Remove about-me from the general fade-in animations */
.certifications,
.projects,
.education {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Remove fade-in animation from about-me section */
.about-me {
    opacity: 1;
    transform: none;
}

/* Add fade-in animation specifically for skills grid */
.skills-grid {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.skills-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Update the skills grid styles for mobile */
@media screen and (max-width: 480px) {
    .skills-grid {
        gap: 1rem;  /* Reduce gap between tiles */
        padding: 1rem 0.5rem;  /* Reduce padding around grid */
    }

    .skill-tile {
        min-height: 160px;  /* Reduce tile height */
        padding: 1rem;  /* Reduce padding inside tiles */
    }

    .skill-icon {
        width: 35px;  /* Make icons smaller */
        height: 35px;
        margin-bottom: 0.5rem;  /* Reduce space below icon */
    }

    .skill-tile h3 {
        font-size: 1rem;  /* Smaller heading */
        margin: 0.3rem 0;  /* Reduce margins */
    }

    .skill-tile p {
        font-size: 0.8rem;  /* Smaller description text */
        line-height: 1.3;  /* Tighter line height */
    }
}

