/* Reset & Root Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #00171f;
    --primary-blue: #003459;
    --accent-blue: #007ea7;
    --text-dark: #00171f;
    --text-light: #666;
    --background: #ffffff;
}

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

body {
    background-color: var(--background);
    color: var(--text-dark);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* NAVIGATION */
nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 90px;
    background-color: var(--primary-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 20px;
}

.left {
    font-size: 1.7rem;
    color: white;
    font-weight: bold;
}

nav ul {
    display: flex;
    justify-content: center;
}

nav ul li {
    list-style: none;
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-blue);
}

/* HERO SECTION */
.first {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 0 9%;
    min-height: 80vh;
    align-items: center;
}

.leftsection {
    width: 100%;
    white-space: nowrap;
    font-size: 2.5rem;
}

.rightsection {
    width: 60%;
    display: flex;
    justify-content: center;
}

.rightsection img {
    border: 3px solid var(--primary-dark);
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    height: auto;
}

.myname,
#element {
    color: var(--primary-blue);
    font-weight: bold;
}

/* BUTTONS */
.button-group {
    margin: 50px 0;
}

.btn,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    display: inline-block;
}

.btn {
    background-color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
    color: white;
    margin-right: 15px;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-dark);
    font-weight: 500;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.btn-secondary:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* SECTIONS */
section {
    padding: 50px 10%;
    min-height: 100vh;
}

section h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-dark);
}

section p {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
}

/* ABOUT */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.about-content p {
    color: var(--primary-blue);
    margin-bottom: 20px;
    text-align: center;
}

.project-card {
    display: flex;
    align-items: center;
    border-left: 4px solid var(--primary-dark);
    border-top: 1px solid var(--primary-dark);
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 30px auto;
    padding: 20px;
    max-width: 1000px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.project-image {
    width: 45%;
    height: auto;
    object-fit: cover;
    border-right: 2px solid #f0f0f0;
}

.project-content {
    padding: 25px;
    flex: 1;
}

.project-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #222;
    text-align: center;
}

.project-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.demo-btn {
    display: flex;
    justify-content: center;
    background-color: var(--background);
    color: var(--primary-dark);
    padding: 10px 18px;
    margin: 15px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border: 1px solid var(--primary-dark);
}

.demo-btn:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* CONTACT */
.contact-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 50px;
}

.contact-info,
.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-info p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    color: var(--accent-blue);
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form textarea {
    resize: vertical;
}

/* SOCIAL LINKS & FOOTER */
.social-links {
    width: 100%;
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #ddd;
}

.social-links a {
    display: inline-block;
    margin: 0 15px;
    font-size: 2rem;
    color: var(--primary-dark);
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-blue);
    transform: translateY(-3px);
}

footer {
    background-color: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* SKILLS */
#skills {
    padding: 50px 10%;
    background-color: #f8f9fa;
}

.skill {
    margin-bottom: 15px;
}

.skill span {
    display: block;
    font-weight: 600;
    color: #00171f;
    margin-bottom: 5px;
}

.skill-bar {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b6685, #18547e);
    border-radius: 5px;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.skill-category {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.skill-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 10px;
}

.skill-header i {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-right: 15px;
}

.skill-header h3 {
    color: var(--primary-dark);
    font-size: 1.1rem;
}

/* ACHIEVEMENTS / CERTIFICATES */
.achievements-container {
    max-width: 1000px;
    margin: 40px auto 0;
}

.achievement-category {
    margin-bottom: 50px;
}

.achievement-category h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.achievement-category h2 i {
    color: var(--accent-blue);
}

.achievement-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.achievement-item {
    margin: 10px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-dark);
    border-top: 1px solid var(--primary-dark);
}

.achievement-icon {
    font-size: 1.5rem;
    color: var(--accent-blue);
    background: white;
    padding: 15px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
}

.achievement-content h3 {
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.achievement-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: left;
}

.achievement-date {
    background: var(--accent-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.view-certificate-btn {
    background: var(--primary-dark);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.view-certificate-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
    max-height: 90vh;
    overflow: hidden;
}

.image-viewer-container {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: auto;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    max-height: 70vh;
}

.certificate-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 2rem;
    color: #aaa;
    cursor: pointer;
    z-index: 1001;
}

.close-modal:hover {
    color: var(--primary-dark);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .first {
        flex-direction: column;
        text-align: center;
        padding: 50px 5%;
    }

    .leftsection,
    .rightsection {
        width: 100%;
    }

    .rightsection {
        margin-top: 30px;
    }

    .leftsection {
        font-size: 2rem;
    }

    section {
        padding: 60px 5%;
    }

    .contact-container {
        flex-direction: column;
    }

    .achievement-item {
        flex-direction: column;
        text-align: center;
    }

    .achievement-icon {
        align-self: center;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 15px;
    }

    .image-viewer-container {
        min-height: 400px;
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .image-viewer-container {
        min-height: 300px;
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .right {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background-color: var(--primary-dark);
    }

    .right.active {
        display: block;
    }

    .right ul {
        flex-direction: column;
        text-align: center;
    }

    .right ul li {
        margin: 15px 0;
    }

    .hamburger {
        display: block;
    }
}

/* Responsive for smaller screens */
@media (max-width: 768px) {
    .project-card {
        flex-direction: column;
        text-align: center;
    }

    .project-image {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #f0f0f0;
    }

    .project-content {
        padding: 20px;
    }

    .demo-btn {
        width: 80%;
    }
}