/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ffffff;
    --background-dark: #000000;
    --background-light: #111111;
    --background-card: #1a1a1a;  /* New lighter background for cards */
    --text-color: #ffffff;
    --text-muted: #888888;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-dark);
    color: var(--text-color);
    line-height: 1.6;
}

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

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.highlight {
    color: var(--primary-color);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-muted);
}

.mobile-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Header Section */
.header {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.header-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* About Section */
.about {
    padding: 6rem 0;
    background-color: var(--background-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 4px;
    opacity: 0;
    transform: scale(0.95);
    animation: fadeInScale 0.8s ease 0.2s forwards;
}

.about-text p {
    font-size: 1.2rem;
    line-height: 1.8;
    font-weight: 500;
    color: var(--text-color);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

/* Make important phrases stand out */
.about-text p strong {
    color: var(--primary-color);
    font-weight: 600;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Skills Section */
.skills {
    padding: 6rem 0;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.skill-item {
    flex: 0 0 auto;
    width: 120px;  /* Fixed width for each skill item */
    background: var(--background-card);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i, 
.skill-item img {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

.skill-item span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 0.5rem;
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--background-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--background-dark);
    padding: 2rem;
    border-radius: 4px;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-card p {
    color: var(--text-muted);
}

.project-links {
    display: flex;
    justify-content: flex-start;
    margin-top: 20px;
    padding-left: 0;  /* Remove any default padding */
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #2d2d2d;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    margin-left: 0;  /* Remove the margin that was pushing it in */
}

.project-btn:hover {
    background-color: #404040;
}

.project-btn i {
    font-size: 1.1rem;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--background-light);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
}

/* Technologies Section */
.technologies-container {
    margin: 2rem 0;
    padding: 1rem 0;
}

.technologies-container h4 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.2rem;
}

.tech-icons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.tech-item {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.tech-item i {
    font-size: 3rem;
    color: var(--text-color);
}

.tech-item:hover {
    transform: translateY(-8px) scale(1.1);
}

/* Hide the text labels */
.tech-item span {
    display: none;
}
    
/* Certificates Section */
.certificates {
    padding: 6rem 0;
    background-color: var(--background-light);
}

.certificates-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
    background: var(--background-card); /* visually group the certificates */
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.certificate-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: transparent; /* remove card background for a single frame look */
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    width: auto;
}

.certificate-img {
    max-width: 280px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

.certificate-name {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* Style for the certificate "View Credential" button */
.certificate-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: #111111;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: transform 0.2s;
    cursor: pointer;
}

.certificate-btn:hover,
.certificate-btn:focus {
    transform: translateY(-2px) scale(1.04);
    color: #fff;
    text-decoration: none;
    outline: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu {
        display: block;
    }
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .about-image {
        margin-bottom: 2rem;
    }
    .contact-info {
        flex-direction: column;
    }
    .header-content h1 {
        font-size: 2.5rem;
    }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-dark);
        padding: 1rem;
        text-align: center;
    }
    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 1rem;
    }
    .skill-item {
        padding: 1rem;
    }
    .about-text p {
        font-size: 1rem;  /* Reduce text size on mobile */
        line-height: 1.6;
    }

    .about-image img {
        width: 100%;
        max-width: 300px;  /* Increase image size on mobile */
        margin: 0 auto;
        display: block;
    }

    .about-content {
        gap: 2rem;  /* Reduce gap between image and text */
    }

    .certificate-img {
        width: 80vw;
        max-width: 95vw;
    }
}

@media (min-width: 1200px) {
    .certificate-img {
        width: 180px;
        max-width: 220px;
    }
}