/* --- Variables & Base Reset --- */
:root {
    --color-primary: #1A237E; /* Deep Indigo/Navy */
    --color-accent: #FFB300; /* Amber Gold */
    --color-background: #ffffff;
    --color-card-bg: #ffffff;
    --color-text: #343a40;
    --color-subtle: #6c757d;
    --color-border: #E0E0E0;
    --shadow-light: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* FIX 1 & 4: Sticky Footer Setup + Background Gradient */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    /* Gradient Background */
    background: linear-gradient(135deg, #f5f7fa 0%, #eef1f8 100%); 
    padding-top: 80px; /* Increased slightly to prevent nav overlap */
    
    /* Flex column to push footer down */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; /* Ensure container takes width on mobile */
}

/* FIX 1: Main expands to fill space */
.main {
    flex: 1; /* This pushes the footer to the bottom */
    display: flex; /* Enables vertical centering for content inside main */
    flex-direction: column;
    justify-content: center; /* Vertically center content if page is short */
}

.divider {
    border-top: 1px solid var(--color-border);
    margin: 20px 0;
}

/* --- Header (Navbar) --- */
.header {
    background-color: rgb(215, 222, 250);
    box-shadow: var(--shadow-light);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

/* FIX 2: Mobile Responsive Nav */
.header__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    flex-wrap: wrap; /* Allows items to wrap on small screens */
    gap: 10px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
}

.nav {
    display: flex;
    flex-wrap: wrap; /* Responsive buttons */
    justify-content: center;
    gap: 5px;
}

/* --- Buttons --- */
.btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
    text-align: center;
    display: inline-block;
}

.btn--primary {
    background-color: rgba(61, 181, 61, 0.541);
    color: rgb(0, 0, 0);
    border-radius: 15px;
    border: 1px solid rgba(75, 5, 5, 0.763);
}
.btn-home-primary1 {
    background-color: rgba(61, 181, 61, 0.541);
    color: rgb(0, 0, 0);
    border-radius: 15px;
    border: 2px solid rgba(75, 5, 5, 0.763);
}
.btn-home-primary2{
    background-color: rgba(0, 128, 0, 0);
    color: black;
    border-radius:15px;
    border: 2px solid var(--color-primary);
}
.btn-home-primary2:hover{
    border-radius:25px;
}

.btn--primary:hover, .btn-home-primary1:hover {
    background-color: rgba(0, 128, 0, 0.566);
    color: black;
    border-radius: 25px;
    border-color: var(--color-primary);
}

.nav-button {
    background-color: rgba(255, 68, 0, 0);  
    color: rgba(0, 0, 0, 0.788);
    border: 0px solid var(--color-accent);
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
    text-align: center;
}

.nav-button:hover {
    background-color: rgba(255, 68, 0, 0.155);    
    border: 0px solid var(--color-accent);
}

.nav-logo {
    color: red;
    font-size: 1.2rem;
    margin-right: 5px;
}

/* --- Section Structure --- */
.section {
    padding: 30px 0 20px 0;
    width: 100%;
}

.section__title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.section__subtitle {
    font-size: 1.1rem;
    color: var(--color-subtle);
    margin-bottom: 30px;
}

.grid {
    display: grid;
    gap: 30px;
}

.card {
    background: rgba(237, 235, 235, 0.507);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 25px;
    transition: box-shadow 0.3s;
    box-shadow: 0 0 15px rgba(0, 0, 255, 0.495);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    border-color: rgba(224, 15, 15, 0.714);
    box-shadow: 2px 2px 4px green;
}

.skill-card__title, .profile-card__title {
    margin-bottom: 15px;
    color: var(--color-primary);
}
.hero__role-animated img {
    max-width: 100%;
    height: auto;
    display: block;
}

.skill-item {
    display: inline-block;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* --- Coding Profiles Section --- */
.profile-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.profile-card {
    text-align: center;

}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.metric-item {
    padding: 15px 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid var(--color-accent);
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
}

.star {
    color: var(--color-accent);
    font-size: 1.8rem;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--color-subtle);
}

/* --- FIX 2: Responsive Skills Grid --- */
.skills-grid {
    /* Auto-fit: Creates as many columns as fit, minimum width 200px */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
}

/* --- Certifications --- */
.certs__list {
    list-style-type: none;
    padding-left: 0;
}

.certs__list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    padding-left: 30px;
    position: relative;
}

.certs__list li::before {
    content: '🏅';
    position: absolute;
    left: 0;
}

.cert-link {
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- Footer --- */
.footer {
    background-color: rgb(200, 201, 246);
    color: #210202;
    padding: 15px 0;
    text-align: center;
    font-size: 0.9rem;
    margin-top: auto; /* Safety net for flex layout */
}

/* --- Hero Section --- */
.section--hero-enhanced {
    padding: 50px 0; 
    text-align: left;
    width: 100%;
}

/* FIX 3: Robust Typewriter Effect */
.hero__name {
    /* overflow: hidden;
    white-space: nowrap; 
    border-right: 3px solid rgb(78, 52, 2);
    font-family: 'Courier New', Courier, monospace;
    font-size: 3.5rem;
    width: 0;
    animation: typing 3s steps(14) forwards, blink 0.75s step-end infinite;
    max-width: 100%; */
    font-size: 4.5rem;
}

/* @keyframes typing {
    from { width: 0 }
    to { width: 14ch } 
}

@keyframes blink {
    from, to { border-color: rgb(5, 5, 226)}
    50% { border-color: transparent }
} */

.hero__role {
    font-size: 1.4rem;
    margin-bottom: 40px;    
}

.hero__summary-box {
    max-width: 750px;
    padding: 20px;
    border-left: 5px solid rgb(3, 96, 3);
    background-color: rgba(255, 255, 255, 0.8);
    box-shadow: 2px 3px 15px rgba(0, 0, 255, 0.793);
    margin-bottom: 42px;
}

.hero__summary-box:hover{
    box-shadow: var(--shadow-hover);
    border-color: rgba(224, 15, 15, 0.43);
    box-shadow: 2px 2px 8px blueviolet;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;      
    margin-top: 15px;
}

.hero-text {
    flex: 1;
}

.hero-image {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Blob Morphing Animation --- */

.profile-image-container {
    position: relative;
    width: 300px; /* Slightly larger area for the blob to move */
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-pic {  
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 2;
    border: 4px solid rgba(255,255,255,0.1);
    animation: morph 8s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.blob-cont {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.6;
}

.blob-1 { width: 200px; height: 200px; background: var(--primary); top: 0; left: 10%; animation: float 6s infinite; }
.blob-2 { width: 250px; height: 250px; background: var(--secondary); bottom: 10%; right: 10%; animation: float 8s infinite reverse; }

/* This is the magic part. 
   It changes the 4 corners (top-left, top-right, bottom-right, bottom-left)
   independently for both X and Y axes to create the 'liquid' effect.
*/
@keyframes morph {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
    100% { transform: translate(0, 0); }
}

/* Optional: Slight hover effect */
.profile-pic:hover {
    box-shadow: 0 0 30px rgba(255, 179, 0, 0.6); /* Gold glow on hover */
    transform: scale(1.02);
}

@keyframes rotate-border {
    0% {
        background-position: 0% 50%;
        transform: rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
        transform: rotate(360deg);
    }
}

.profile-pic {  
    width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: 2;
    border: 4px solid rgba(255, 255, 255, 0.1);
    animation: morph 10s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.profile-pic:hover {
    transform: scale(1.02);
}

/* --- Projects Page --- */
.project-card {
    background: rgba(255, 255, 255, 0.8);
    border-left: 5px solid #3498db;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tech-stack {
    display: inline-block;
    background: #e0e0e0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px; /* Adds space when wrapping */
    color: #000000;
}

/* --- Contact Page --- */
.contact-container {    
    max-width: 600px;
    width: 100%;
    margin: 50px auto;
    background: rgb(255, 255, 255);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.contact-list { list-style: none; padding: 0; }
.contact-item {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap; /* Fix for mobile overflow */
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

/* --- Mobile Media Queries --- */
@media (max-width: 900px) {
    .hero-layout {
        flex-direction: column-reverse;
        text-align: center;
        gap: 30px;
    }

    .hero__name {
        font-size: 2.5rem; /* Smaller font for mobile */
        margin: 0 auto; /* Center the typewriter */
        border-right: 3px solid rgb(78, 52, 2);
    }
    
    .hero-text {
        width: 100%;
    }

    /* Adjust animated image size for mobile */
    .profile-image-container {
        width: 220px;
        height: 220px;
    }
    .profile-pic {
        width: 200px;
        height: 200px;
    }

    .header__content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav {
        width: 100%;
    }
    
    .nav-button {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
}