/* --- Global Styles --- */
html {
  scroll-behavior: smooth;
}

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

body {
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', Courier, monospace; /* Engineer vibe */
    line-height: 1.6;
}

.portfolio-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.highlight {
    color: #ff0000;
}

/* --- Navigation Fix --- */
.main-nav {
    display: flex;
    justify-content: space-between; /* Pushes Logo left and Nav right */
    align-items: center;
    padding: 2.5rem 0;
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.nav-links li {
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-links li a {
    color: #fff;
    text-decoration: none;
}

.nav-links li a:hover {
    text-decoration: none;
    color: #ff0000;
}

/* --- Hero Section --- */
.hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    min-height: 75vh;
    padding: 2rem 0;
}

.hero-text-content {
    flex: 1.5;
}

.hero-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #a1a1aa;
    margin-bottom: 1.5rem;
    font-weight: normal;
}

.hero-description {
    color: #71717a;
    max-width: 500px;
    font-size: 1rem;
}

/* --- Profile Image & Glow --- */
.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.image-glow {
    position: relative;
    display: inline-block;
}

.image-glow::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: rgba(255, 0, 0, 0.2);
    filter: blur(60px);
    z-index: -1;
}

.profile-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
}


/* --- Tools Use --- */
/* Container that hides the overflow */
.logo-slider {
    overflow: hidden;
    padding: 30px 0;
    background: rgb(0, 0, 0); /* Match your site background */
    white-space: nowrap;
    position: relative;
}

/* The moving row */
.tools-grid {
    display: flex;
    width: max-content; /* Vital: allows it to extend beyond screen width */
    animation: scroll 20s linear infinite;
}

/* Individual card styling */
.tools-card {
    flex: 0 0 auto;
    width: 150px; /* Adjust based on icon size */
    margin: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tools-card img {
    width: 50%;
    height: auto;
    filter: grayscale(100%); /* Optional: makes logos look uniform */
    transition: filter 0.3s ease;
}

.tools-card img:hover {
    filter: grayscale(0%); /* Brings color back on hover */
}

/* The Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Moves exactly half the width to loop */
    }
}

/* Pause animation on hover so people can look closer */
.logo-slider:hover .tools-grid {
    animation-play-state: paused;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    /* auto-fill ensures cards maintain size even if there are only 1 or 2 */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
    padding: 4rem 0;
}

.project-card {
    display: flex;
    flex-direction: column; /* Stack children vertically */
    border: 1px solid #27272a;
    padding: 1.5rem;
    background: #09090b; /* Adding a base color helps visibility */
    transition: all 0.3s ease;
}

.project-card:hover {
    border-color: #fff;
    transform: translateY(-5px); /* Subtle lift effect */
}

/* Header Alignment */
.project-header {
    display: flex;
    align-items: center; /* Vertically centers logo, title, and number */
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.project-header img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex-grow: 1; /* Pushes the project number to the right */
    color: #fafafa;
}

.project-number {
    font-size: 0.75rem;
    font-family: monospace; /* Looks cleaner for numbers */
    color: #52525b;
    letter-spacing: 0.1em;
}

/* Description & Auto-Alignment */
.project-desc {
    color: #a1a1aa;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1; /* Key: Takes up all space to push the footer down */
}

/* Footer / Button Area */
.tag-container {
    display: flex;
    justify-content: flex-end; /* Aligns button to the right */
    align-items: center;
    border-top: 1px solid #18181b;
    padding-top: 1rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #18181b;
    border: 1px solid #27272a;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tag a {
    color: #fff;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    font-size: 1.1rem;
}

.tag:hover {
    background: #fff;
}

.tag:hover a {
    color: #000;
}

/* About Me */
.project-card-about-me {
    backdrop-filter: blur(10px); /* Blur effect */
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 280px;
}

.project-card-about-me p {
  text-align: center;
  font-family: 'Courier New', Courier, monospace;
  font-size:1rem;
}



/* Make the center card slightly larger */
.project-card-about-me:nth-child(2) {
    transform: scale(1.1);
    border: 2px solid #ff0008; /* Optional: brand color border */
}

/* Image styling */
.project-card-about-me img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    display: block;
}

/* Hover effects */
.project-card-about-me:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    background: #fff;
    color:#000;
}

/* Hover effect specifically for the center card so it doesn't shrink */
.project-card-about-me:nth-child(2):hover {
    transform: scale(1.15) translateY(-10px);
}

/* --- Contacts --- */
.contacts-grid {
    padding: 60px 20px;
    background-color: #000000; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}


.logo img {
    max-width: 100%; 
    height: auto;
}

.contacts-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px; 
}


.contacts-grid ul li a img {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


.contacts-grid ul li a:hover img {
    transform: translateY(-5px);
    opacity: 0.8;
}


@media (max-width: 480px) {
    .contacts-grid ul {
        gap: 15px;
    }
    .contacts-grid ul li a img {
        width: 32px;
    }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        display: none; /* Usually hidden on mobile or turned into a burger menu */
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .projects-grid {
        flex-direction: column; 
        gap: 40px;            
    }

    .project-card-about-me {
        width: 90%;           
        max-width: 350px;     
    }
    
    .project-card-about-me:nth-child(2) {
        transform: scale(1); 
    }

    .project-card-about-me:nth-child(2):hover {
        transform: translateY(-10px);
    }
}