/* Basic styles - keeping minimal for compatibility */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000; 
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    display: inline;
    margin: 0 10px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
}

/* Footer styles */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

footer p {
    margin: 5px 0;
}

/* Section styles */
section {
    padding: 2rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* Experience section styles */
.exp-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin: 20px auto;
    max-width: 1200px;
}

.exp-card {
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: left;
    box-sizing: border-box;
}

.exp-picture {
    width: 150px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.exp-card h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.5rem;
}

.exp-card p {
    margin-bottom: 15px;
    font-weight: bold;
}

.exp-card ul {
    padding-left: 20px;
    margin: 10px 0;
}

.exp-card li {
    margin: 8px 0;
    line-height: 1.6;
}

/* Experience card animation */
.exp-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 0.6s ease-out;
}

.exp-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Certificate section styles */
#certificate {
    padding: 2rem;
    text-align: center;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.certificate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 0.6s ease-out;
    height: 400px;
    min-height: 400px;
}

.certificate-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.certificate-container.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.certificate-picture {
    width: 150px;
    height: 150px;
    object-fit: scale-down;
    object-position: center;
    margin-bottom: 15px;
    border-radius: 10px;
    flex-shrink: 0;
    background: #f8f9fa;
    padding: 15px;
    box-sizing: border-box;
    border: 1px solid #e9ecef;
}

.certificate-container p {
    text-align: center;
    margin: 15px 0;
    font-weight: bold;
    font-size: 1rem;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.3;
}

.cert-btn {
    display: inline-block;
    margin-top: auto;
    padding: 12px 24px;
    background-color: #87CEEB;
    color: black;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    align-self: center;
}

.cert-btn:hover {
    background-color: rgb(5, 120, 196);
    color: white;
}



section {
    padding: 2rem;
    text-align: center;
}

h1, h2 {
    color: #333;
}

.project-grid {
    display: block;          /* Set display to block for vertical layout */
    margin: 0 auto;         /* Center the grid in the container */
}

.project-row {
    display: flex;           /* Enable flexbox for each project row */
    align-items: center;     /* Center items vertically */
    margin: 1rem 0;         /* Add vertical space between rows */
    opacity: 0;             /* Start with hidden */
    transform: translateY(20px); /* Start slightly below */
    transition: opacity 1s ease-out, transform 1s ease-out; /* Transition effect */
}

/* Class to apply when the project row is in the viewport */
.fade-in {
    opacity: 1;
    transform: translateY(0); /* Return to original position */
}

.project-card {
    background-color: #fff;
    padding: 1.5rem;        /* Maintain padding for inner content */
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 40%;             /* Set width to 40% for the card */
    min-width: 600px;       /* Optional: Set a maximum width for the cards */
    min-height: 400px;
    margin-right: 20px;     /* Space between card and description */
}

.project-desc {
    width: 60%;             /* Set width to 60% for the description */
    padding: 1.5rem;        /* Optional padding for description */
    background-color: #f9f9f9; /* Optional background color */
    min-height: 450px;
    border-radius: 10px;    /* Optional border radius */
}




footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}


/* Style the home section */
#home {
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background-color: #f4f4f4;
}

/* Container for the profile picture and text */
.profile-container {
    display: flex;
    align-items: center;
}

/* Style the circular profile picture */
.profile-picture {
    width: 300px;
    height: 300px;
    border-radius: 50%;  /* Makes the image circular */
    object-fit: cover;   /* Ensures the image fits inside the circle */
    margin-right: 20px;  /* Space between image and text */
    border: 4px solid #333;  /* Optional: Add a border around the circle */
}

/* Style for the intro text */
.intro-text {
    max-width: 1000px;  /* Limits the width of the text block */
}

.intro-text h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.intro-text p {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Style the call-to-action button */
.cta {
    padding: 10px 20px;
    margin: 10px;
    background-color: #007BFF;
    color: #fff;
    text-decoration: none;
}

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

/* Responsive Design for Mobile Devices */
@media screen and (max-width: 768px) {
    /* Reset body and html for mobile */
    html, body {
        width: 100%;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    
    /* Ensure all sections fit within viewport */
    section {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    #my_exp, #certificate, #my_achievement, #contact {
        width: 100%;
        margin: 0;
        padding: 1rem 10px;
        box-sizing: border-box;
    }
    
    /* Home section adjustments */
    #home {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Profile container - stack vertically on mobile */
    .profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* Profile picture - smaller on mobile */
    .profile-picture {
        width: 200px;
        height: 200px;
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    /* Intro text adjustments */
    .intro-text {
        max-width: 100%;
    }
    
    .intro-text h1 {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .intro-text h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .intro-text p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    
    /* Header and navigation adjustments */
    header {
        width: 100%;
        padding: 0.5rem 0;
        margin: 0;
        box-sizing: border-box;
    }
    
    nav {
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    nav ul {
        margin: 0;
        padding: 0;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 5px;
    }
    
    nav ul li a {
        font-size: 1rem;
    }
    
    /* Footer adjustments */
    footer {
        width: 100%;
        padding: 15px 10px;
        margin: 0;
        box-sizing: border-box;
    }
    
    footer p {
        font-size: 0.9rem;
        margin: 5px 0;
    }
    
    /* Experience section adjustments */
    .exp-grid {
        width: 100%;
        margin: 0;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .exp-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto 20px auto;
        padding: 15px;
        box-sizing: border-box;
    }
    
    .exp-picture {
        width: 120px;
        height: auto;
    }
    
    /* Project cards adjustments */
    .project-row {
        flex-direction: column;
        align-items: center;
        margin: 10px 0;
    }
    
    .project-card {
        width: 100%;
        min-width: auto;
        max-width: 350px;
        margin: 0 10px 20px 10px;
        box-sizing: border-box;
    }
    
    .project-desc {
        width: 100%;
        max-width: 350px;
        min-width: auto;
        min-height: auto;
        margin: 0 10px;
        box-sizing: border-box;
    }
    
    /* Certificate adjustments */
    .certificate-container {
        width: 100%;
        max-width: 350px;
        margin: 0 auto 20px auto;
        padding: 15px;
        box-sizing: border-box;
        height: auto;
        min-height: 350px;
    }
    
    .certificate-picture {
        width: 150px;
        height: 150px;
        object-fit: scale-down;
        object-position: center;
        background: #f8f9fa;
        padding: 15px;
        box-sizing: border-box;
        border: 1px solid #e9ecef;
    }
    
    .medium-logo {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    /* Section padding adjustments */
    section {
        padding: 1rem;
    }
}

/* =========================
   ANIMATION & FADE EFFECTS
   ========================= */

/* Global fade-in class */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Initial hidden state for animated elements */
.profile-picture,
.intro-text,
.my_skill,
.skill-picture,
.skill_text ul li,
.exp-card,
.certificate-container,
.project-row {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease-out, transform 0.6s ease-out;
}

/* Profile picture specific animations */
.profile-picture {
    transition: opacity 2.5s ease-out, transform 0.6s ease-out;
}

/* Skill elements */
.skill-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    margin-bottom: 20px;
    border: 4px solid rgb(51, 51, 51);
}

.skill_text ul {
    padding-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.skill_text li {
    margin: 5px 0;
    list-style-position: inside;
}

/* Experience grid and cards */
.exp-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    min-height: 50vh;
    justify-content: center;
}

.exp-card {
    background: white;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.exp-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.exp-picture {
    width: 150px;
    height: auto;
    margin-bottom: 10px;
    display: block;
}

/* Certificate styles */
.certificate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.certificate-picture {
    width: 250px;
    height: 250px;
    margin-bottom: 10px;
    border-radius: 10px;
    max-width: 500px;
    height: auto;
}

.certificate-picture-small {
    width: 300px;
    height: 300px;
    object-fit: cover;
}

.medium-logo {
    width: 600px;
    height: auto;
    object-fit: contain;
}

.cert-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #87CEEB;
    color: black;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cert-btn:hover {
    background-color: rgb(5, 120, 196);
}

/* Project achievements */
#my_achievement {
    text-align: center;
}

.project-row {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.project-card {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.project-desc {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Contact section */
#contact {
    text-align: center;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-links h2 {
    margin-bottom: 20px;
}

.contact-links ul {
    list-style-type: none;
    padding: 0;
}

.profile-icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    transition: transform 1s ease, opacity 1s ease;
}

.icon {
    width: 80px;
    height: 80px;
    border-radius: 20%;
    object-fit: cover;
    transition: transform 1s ease, opacity 1s ease;
    margin: 5px;
}

.linkedin-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 1s ease, opacity 1s ease;
    margin: 5px;
}

.social-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.linkedin-logo {
    opacity: 0;
    transform: translateX(20px);
}

.icon.move-left {
    transform: translateX(-10px);
}

.linkedin-logo.move-right {
    transform: translateX(50px);
}

.icon.visible,
.linkedin-logo.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive YouTube iframe */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 10px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================
   UTILITY CLASSES
   ========================= */

/* Typography utilities */
.my_skill {
    margin-bottom: 10px;
}

.nickname {
    opacity: 0.7;
    color: #333;
}

/* List and content styling */
h3 {
    margin: 10px 0;
}

ul {
    padding-left: 20px;
    margin: 10px 0;
}

li {
    margin: 5px 0;
    padding-left: 0;
    text-indent: 0;
}

ul ul {
    padding-left: 20px;
}

.certificate-container p {
    text-align: center;
    margin: 0;
}

.medium-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

/* Extra small devices (iPhone SE, etc.) */
@media screen and (max-width: 480px) {
    html, body {
        width: 100%;
        overflow-x: hidden;
    }
    
    header {
        padding: 0.3rem 0;
    }
    
    nav {
        padding: 0 5px;
    }
    
    nav ul li a {
        font-size: 0.9rem;
    }
    
    footer {
        width: 100%;
        padding: 10px 5px;
        margin: 0;
        box-sizing: border-box;
    }
    
    footer p {
        font-size: 0.8rem;
        margin: 3px 0;
    }
    
    #home {
        padding: 15px;
    }
    
    .profile-picture {
        width: 150px;
        height: 150px;
    }
    
    .intro-text h1 {
        font-size: 1.5rem;
    }
    
    .intro-text h2 {
        font-size: 1rem;
    }
    
    .intro-text p {
        font-size: 0.9rem;
    }
    
    /* Experience section for very small screens */
    .exp-grid {
        padding: 0 5px;
    }
    
    .exp-card {
        max-width: 300px;
        padding: 10px;
    }
    
    .exp-picture {
        width: 100px;
    }
    
    /* Project cards for very small screens */
    .project-card {
        max-width: 300px;
        margin: 0 5px 15px 5px;
    }
    
    .project-desc {
        max-width: 300px;
        margin: 0 5px;
    }
    
    .certificate-container {
        max-width: 300px;
        padding: 5px;
    }
    
    .certificate-picture {
        width: 150px;
        height: 150px;
        object-fit: scale-down;
        object-position: center;
        background: #f8f9fa;
        padding: 15px;
        box-sizing: border-box;
        border: 1px solid #e9ecef;
    }
    
    .medium-logo {
        max-width: 250px;
    }
}

/* =========================
   MOBILE HEADER & FOOTER FIX
   ========================= */

/* Ensure full width on all screen sizes */
html, body {
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Header full width fix */
header {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

nav {
    width: 100%;
    box-sizing: border-box;
}

/* Footer full width fix */
footer {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Mobile specific header/footer fixes */
@media screen and (max-width: 768px) {
    html, body {
        width: 100% !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    header {
        width: 100% !important;
        padding: 0.5rem 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    nav {
        padding: 0 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    nav ul {
        margin: 0 !important;
        padding: 0 !important;
        justify-content: center !important;
    }
    
    nav ul li {
        margin: 0 5px !important;
    }
    
    nav ul li a {
        font-size: 1rem !important;
    }
    
    footer {
        width: 100% !important;
        padding: 15px 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    footer p {
        font-size: 0.9rem !important;
        margin: 5px 0 !important;
    }
    
    /* Experience cards mobile styling */
    .exp-grid {
        gap: 15px !important;
        margin: 15px auto !important;
        padding: 0 10px !important;
    }
    
    .exp-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 15px 0 !important;
        padding: 15px !important;
    }
    
    .exp-picture {
        width: 120px !important;
        margin-bottom: 10px !important;
    }
    
    .exp-card h3 {
        font-size: 1.3rem !important;
        margin-bottom: 10px !important;
    }
    
    /* Certificate grid mobile styling */
    .certificate-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 15px 10px !important;
    }
    
    .certificate-container {
        padding: 15px !important;
    }
    
    .certificate-picture {
        width: 150px !important;
        height: 150px !important;
    }
    
    .certificate-container p {
        font-size: 0.9rem !important;
    }
    
    .cert-btn {
        padding: 8px 16px !important;
        font-size: 0.9rem !important;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    header {
        padding: 0.3rem 0 !important;
    }
    
    nav {
        padding: 0 5px !important;
    }
    
    nav ul li a {
        font-size: 0.9rem !important;
    }
    
    footer {
        width: 100% !important;
        padding: 10px 5px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    footer p {
        font-size: 0.8rem !important;
        margin: 3px 0 !important;
    }
    
    /* Certificate grid for very small screens */
    .certificate-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 10px 5px !important;
    }
    
    .certificate-container {
        padding: 15px !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        height: auto !important;
        min-height: 320px !important;
    }
    
    .certificate-picture {
        width: 120px !important;
        height: 120px !important;
        object-fit: scale-down !important;
        object-position: center !important;
        background: #f8f9fa !important;
        padding: 12px !important;
        box-sizing: border-box !important;
        border: 1px solid #e9ecef !important;
    }
}
