/* styles.css */

/* =======================================================
   PREMIUM GREEN & WHITE THEME — TEXT & ACCENTS
   ======================================================= */
:root {
    --color-dark: #2e5c3e;
    /* deep green – primary */
    --color-medium: #4a8b5c;
    /* fresh medium green */
    --color-light: #a1c9ab;
    /* soft light green */
    --color-bg: #d4e8d9;
    /* Slightly deeper light green */

    --text-main: #1a2e1f;
    /* dark green, high readability */
    --text-muted: #3a5a40;
    /* muted green for secondary text */

    --card-bg: #ffffff;
    --card-border: rgba(74, 139, 92, 0.25);
    --card-shadow: 0 15px 30px rgba(46, 92, 62, 0.08);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f2f9f4;
    /* changed from pure white to a very light green tint */

    background-image:
        radial-gradient(circle at 15% 20%, var(--color-bg) 0%, transparent 60%),
        radial-gradient(circle at 85% 80%, var(--color-bg) 0%, transparent 60%);
    /* expanded gradient coverage */

    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

main {
    flex: 1;
    animation: fadeIn 0.8s ease-out;
    /* Page load animation */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* ---------------- HEADER & NAV ---------------- */
header {
    /* No heavy gradient behind hero, keep it clean */
    background: transparent;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.8rem 5%;
    /* Increased navigation height */
    background-color: var(--color-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-links a {
    color: #edf7ef;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.25s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--color-light);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #ffffff;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* ---------------- HERO SECTION ---------------- */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7rem 5% 6rem;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.hero-content {
    flex: 1;
    max-width: 50%;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.blob-img {
    width: 450px;
    height: 450px;
    object-fit: cover;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morph 8s ease-in-out infinite;
    box-shadow: 0 15px 35px rgba(97, 130, 100, 0.2);
    border: 5px solid var(--color-light);
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
    line-height: 1.1;
}

.role-text {
    font-size: 1.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 90%;
}

#datetime-display {
    color: var(--color-dark);
    font-size: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(97, 130, 100, 0.1);
    border: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

/* ---------------- CONTACT INFO ---------------- */
.contact-info {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.contact-info a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--color-dark);
}

/* ---------------- LAYOUT CONTAINERS & SECTION CARDS ---------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section-card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    padding: 3rem;
    margin: 3rem auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(97, 130, 100, 0.15);
}

/* ---------------- ACADEMIC GRID (HOME) ---------------- */
.academic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 1rem;
}

.academic-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.academic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 45px rgba(97, 130, 100, 0.15);
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-bg);
    padding-bottom: 1rem;
}

.card-header i {
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 1rem;
    display: block;
}

.card-header h3 {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.institution {
    color: var(--color-medium);
    font-weight: 700;
    font-size: 1.05rem;
}

.duration {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-style: italic;
}

.achievement-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.achievement-list li {
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.achievement-list li i {
    color: var(--color-medium);
    margin-top: 5px;
    font-size: 0.9rem;
}

.subjects-taken h4 {
    color: var(--color-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.subject-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.subject {
    background: var(--color-bg);
    color: var(--color-dark);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
}

.decoration-quote {
    text-align: center;
    margin-top: 4rem;
    font-size: 1.4rem;
    color: var(--color-dark);
    font-weight: 600;
    font-style: italic;
    opacity: 0.8;
}

.decoration-quote i {
    margin: 0 10px;
    color: var(--color-medium);
}

.bg-light,
.contact-form,
.placeholder-content {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    padding: 3rem;
    margin: 3rem auto;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Green accent strip on the left side of cards */
.bg-light::before,
.contact-form::before,
.placeholder-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--color-medium);
}

.bg-light:hover,
.contact-form:hover,
.placeholder-content:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(97, 130, 100, 0.15);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--color-dark);
    position: relative;
    letter-spacing: -1px;
}

h2::after {
    content: '';
    width: 80px;
    height: 6px;
    background: var(--color-medium);
    display: block;
    margin: 0.8rem auto 0;
    border-radius: 10px;
}

h3 {
    color: var(--color-dark);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ---------------- ABOUT SECTION ---------------- */
.about-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    background: transparent;
    padding: 2rem 0;
    position: relative;
}

.img-wrapper {
    flex-shrink: 0;
    position: relative;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-dark);
    box-shadow: 0 15px 35px rgba(97, 130, 100, 0.1);
    transition: all 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.02);
}

.about-text {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
}

.detail-box {
    border: 2px solid var(--color-dark);
    padding: 0.8rem 1.5rem;
    margin-bottom: 1rem;
    background: transparent;
    color: var(--color-dark);
    font-weight: 700;
    font-size: 2rem;
    display: block;
    width: 100%;
}

.detail-box.subtitle {
    font-size: 1.5rem;
    font-weight: 600;
}

.detail-box.info {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.6;
}

.detail-box.info a {
    color: var(--color-dark);
    text-decoration: none;
}

.hidden {
    display: none !important;
    opacity: 0;
}

#hobbies-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-bg);
    /* Very light green */
    border-left: 5px solid var(--color-dark);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    animation: slideDown 0.4s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

#hobbies-section ul {
    margin-left: 2rem;
    margin-top: 0.8rem;
    color: var(--text-main);
    font-weight: 600;
}

#hobbies-section li {
    margin-bottom: 0.5rem;
}

#hobbies-section li::marker {
    color: var(--color-dark);
}

/* Buttons */
.btn {
    background: var(--color-dark);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(97, 130, 100, 0.2);
    font-family: inherit;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-medium);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 25px rgba(97, 130, 100, 0.3);
}

.btn:hover::before {
    opacity: 1;
}

/* ---------------- TABLE STYLING ---------------- */
.education-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
}

.education-table th,
.education-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid rgba(97, 130, 100, 0.1);
}

.education-table th {
    background: var(--color-light);
    /* Light Green Header */
    color: var(--text-main);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.education-table tr {
    transition: all 0.3s ease;
}

.education-table tbody tr:hover {
    background-color: var(--color-bg);
    /* Very light green on hover */
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(97, 130, 100, 0.05);
}

/* ---------------- FORM STYLING ---------------- */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    color: var(--color-dark);
    font-weight: 700;
    font-size: 1rem;
    margin-left: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: #ffffff;
    border: 2px solid var(--color-light);
    border-radius: 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9cbda0;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-dark);
    box-shadow: 0 0 0 4px rgba(97, 130, 100, 0.1);
    transform: translateY(-2px);
}

/* ---------------- FOOTER ---------------- */
footer {
    text-align: center;
    padding: 3rem;
    background: var(--color-dark);
    /* Dark Green Footer */
    color: #d1dfd2;
    /* Lighter text for footer */
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-top: auto;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    position: relative;
    padding: 0.2rem 0;
    transition: color 0.3s;
    margin: 0 0.5rem;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-light);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.footer-links a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ---------------- SKILLS SECTION ---------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    justify-items: center;
    margin-top: 3rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circular-progress {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(var(--color-dark) var(--progress), var(--color-light) 0deg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(97, 130, 100, 0.1);
}

.circular-progress::before {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-bg);
}

.progress-value {
    position: relative;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
}

.skill-name {
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-top: 1rem;
        gap: 1rem;
    }

    nav {
        display: flex;
        flex-direction: column;
    }

    .hero {
        flex-direction: column;
        /* Stacks text on top of the image */
        padding: 3rem 5% 4rem;
        /* Reduces the huge top spacing on mobile */
        text-align: center;
        /* Centers the text */
        gap: 2.5rem;
        /* Adds space between the text and the photo */
    }

    .hero-content {
        max-width: 100%;
        /* Overrides the 50% restriction from desktop */
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Centers the button and contact info */
    }

    .hero-image {
        justify-content: center;
        /* Centers the image */
        width: 100%;
    }

    .blob-img {
        width: 280px;
        /* Shrinks the image to fit mobile screens safely */
        height: 280px;
    }

    .hero h1 {
        font-size: 3rem;
        text-align: center;
    }

    .contact-info {
        text-align: left;
        /* Keeps the icons and text aligned neatly */
        display: inline-block;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
        padding: 2rem;
    }

    /* --> ADD THESE NEW RULES FOR THE PERSONAL DETAIL PAGE <-- */
    .about-section {
        flex-direction: column;
        /* Stacks the photo on top of the text card */
        text-align: center;
        /* Centers the text */
        gap: 2rem;
        /* Adds breathing room between photo and card */
        padding: 1rem;
        /* Prevents it from touching the screen edges */
    }

    .profile-pic {
        width: 240px;
        /* Shrinks the photo so it fits perfectly on phones */
        height: 240px;
    }

    .about-card {
        padding: 2rem 1.5rem;
        /* Slightly smaller padding for mobile screens */
        width: 100%;
        /* Ensures the green box doesn't overflow */
    }

    .about-card h2 {
        text-align: center;
        /* Centers your name on mobile */
    }

    .social-icons {
        justify-content: center;
        /* Centers your social media buttons */
        flex-wrap: wrap;
        /* Allows icons to wrap to a new line if needed */
    }

    .gallery-title {
        text-align: center;
        /* Centers the "My Gallery" text */
    }

    /* --> END OF PERSONAL DETAIL RULES <-- */

    .bg-light,
    .contact-form,
    .placeholder-content {
        padding: 2rem;
    }

    footer {
        flex-direction: column;
        gap: 1.5rem;
    }
}

/* =======================================================
   CERTIFICATES PAGE SPECIFIC STYLES
   ======================================================= */

.certificates-page .hero h1 {
    color: var(--color-dark);
    text-transform: uppercase;
    font-size: 3.5rem;
}

.certificates-page h2.section-title {
    text-align: left;
    color: var(--color-dark);
    font-size: 2.8rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.certificates-page h2.section-title::after {
    display: none;
    /* Keep the clean look from the image */
}

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

.certificate-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.certificate-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.certificate-img-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: transparent;
    /* Remove background so it doesn't show as a frame */
    padding: 10px;
    /* Add small padding for breathing room */
}

/* Removed .portrait aspect-ratio to allow natural fit */

.certificate-card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    /* Slight rounding for the image itself */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for the certificate paper effect */
}

/* Modal / Lightbox Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    /* Force the image to stretch to fill the screen safely */
    width: 90vw;
    height: 85vh;
    object-fit: contain;
    /* Keeps aspect ratio perfect, prevents stretching/squishing */
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #fff;
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-light);
    text-decoration: none;
    cursor: pointer;
}

.certificate-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    cursor: pointer;

    /* ADD THIS LINE: Stops short landscape cards from stretching to match tall portrait cards */
    align-self: start;
}

/* GitHub Section */
.github-section {
    background-color: var(--color-dark);
    color: white;
    padding: 5rem 5%;
    text-align: center;
    margin-top: 4rem;
}

.github-section h2 {
    color: white;
    font-size: 3rem;
    margin-bottom: 3rem;
}

.github-section h2::after {
    background: white;
}

.github-mockup {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.github-mockup img {
    width: 100%;
    display: block;
}

/* =======================================================
   ACADEMIC PAGE (TIMELINE) STYLES
   ======================================================= */

.academic-container {
    max-width: 900px;
    margin: 4rem auto 6rem;
    padding: 0 2rem;
    flex: 1;
}

.academic-title {
    text-align: center;
    color: var(--color-dark);
    font-size: 3.5rem;
    margin-bottom: 4rem;
    font-weight: 800;
}

.timeline {
    position: relative;
    padding: 0;
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 70px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    transition-delay: calc(var(--anim-order, 0) * 0.3s);
    z-index: 2;
}

.timeline-item.show {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 46px;
    bottom: -4rem;
    left: 20px;
    width: 4px;
    background: var(--color-medium);
    z-index: 1;
    border-radius: 3px;
    transform-origin: top;
    transform: scaleY(0);
}

.timeline-item.show::before {
    animation: drawLine 0.4s linear forwards;
    animation-delay: calc((var(--anim-order, 0) * 0.9s) + 0.5s);
}

@keyframes drawLine {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    position: absolute;
    left: -1px;
    top: 0;
    width: 46px;
    height: 46px;
    background: #ffffff;
    border: 3px solid var(--color-medium);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-dark);
    font-size: 1.3rem;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.15) rotate(5deg);
    background: var(--color-dark);
    color: #ffffff;
    border-color: var(--color-dark);
}

.timeline-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(46, 92, 62, 0.08);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--card-border);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(46, 92, 62, 0.15);
}

.timeline-content h3 {
    color: var(--color-dark);
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
}

.timeline-content ul {
    list-style-type: none;
    padding: 0;
}

.timeline-content li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.timeline-content li::before {
    content: '•';
    color: var(--color-medium);
    font-size: 1.8rem;
    position: absolute;
    left: 0;
    top: -7px;
}

/* =======================================================
   PERSONAL DETAIL PAGE STYLES
   ======================================================= */

.about-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.profile-pic {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.about-card {
    background-color: var(--color-light);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.about-card h1 {
    color: var(--color-dark);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    line-height: 1.1;
}

.about-card h2 {
    color: var(--color-dark);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: left;
    letter-spacing: normal;
}

.about-card h2::after {
    display: none;
}

.social-icons {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 2;
}

.social-icon {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stars-decor {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    z-index: 1;
    pointer-events: none;
}

.gallery-section {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
    margin-bottom: 6rem;
}

.gallery-title {
    color: var(--color-dark);
    font-size: 2.5rem;
    font-weight: 800;
    text-align: left;
    margin-bottom: 2rem;
}

.gallery-title::after {
    display: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background-color: white;
    border: 2px solid var(--color-dark);
    padding: 4px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

/* =======================================================
   PROJECTS PAGE STYLES
   ======================================================= */

.projects-header {
    text-align: center;
    color: var(--color-dark);
    font-size: 3.5rem;
    margin: 3rem 0 1rem;
    font-weight: 800;
}

.projects-container {
    max-width: 1200px;
    margin: 2rem auto 6rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.project-card {
    display: flex;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(46, 92, 62, 0.08);
    border: 1px solid var(--card-border);
    gap: 3rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: slideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.project-card:nth-child(2) {
    animation-delay: 0.2s;
}

.project-card:nth-child(3) {
    animation-delay: 0.4s;
}

.project-card:nth-child(4) {
    animation-delay: 0.6s;
}

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

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(46, 92, 62, 0.15);
}

.project-gallery {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 50%;
}

.project-gallery .img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #eef5f0;
    border-radius: 8px;
    border: 2px dashed rgba(74, 139, 92, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-medium);
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.project-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-info h2 {
    color: var(--color-dark);
    font-size: 2.2rem;
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.project-info h2::after {
    display: none;
}

.project-buttons {
    margin-top: auto;
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.8rem;
    background-color: var(--color-bg);
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--color-medium);
    color: white;
    transform: translateY(-3px);
}

@media (max-width: 900px) {
    .project-card {
        flex-direction: column;
        gap: 2rem;
    }

    .project-gallery {
        max-width: 100%;
    }

    .project-info h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 600px) {
    .projects-header {
        font-size: 2.5rem;
    }

    .project-buttons {
        flex-direction: column;
    }

    .btn-outline {
        width: 100%;
    }
}

/* Reduce gap between title and certificates */
.certificates-page .hero {
    padding-bottom: 1rem;
}

.certificates-page #certificates.container {
    padding-top: 0;
}

/* =======================================================
   SHOW MORE / SHOW LESS FEATURE
   ======================================================= */
.project-desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* Number of lines to show before cutting off */
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.project-desc.expanded {
    -webkit-line-clamp: unset;
    /* Removes the limit when expanded */
}

.show-more-btn {
    background: none;
    border: none;
    color: var(--color-medium);
    /* Uses your existing green theme color */
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.show-more-btn:hover {
    color: var(--color-dark);
    text-decoration: underline;
}

/* Add this anywhere above your media queries */
.hamburger {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

/* ---------------- RESPONSIVE DESIGN (MOBILE) ---------------- */
@media (max-width: 768px) {
    nav {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 5%;
        position: relative;
    }

    .hamburger {
        display: block;
        margin-left: auto;
        color: var(--color-light);
        /* IMPORTANT: High z-index keeps the hamburger/X button visibly hovering ABOVE the sidebar */
        z-index: 1001;
        position: relative;
    }

    .nav-links {
        /* 1. Change from absolute to fixed so it follows the screen */
        position: fixed;
        top: 0;
        /* 2. Hide it completely off the right side of the screen */
        right: -250px;
        width: 250px;
        height: 100vh;
        /* Full screen height */
        background-color: var(--color-dark);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 80px;
        /* Pushes links down so they don't hide behind the X button */
        gap: 0;
        /* 3. Smooth sliding animation */
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        margin-top: 0;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.4);
        /* Nice shadow on the left edge */
        z-index: 1000;
        /* Sits underneath the hamburger icon */

        /* Remove old dropdown logic */
        max-height: none;
        overflow-y: auto;
    }

    /* When Javascript adds the 'active' class, this slides the menu onto the screen */
    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        /* Ensures the tap area spans the whole sidebar */
    }

    .nav-links a {
        display: block;
        padding: 1.5rem 0;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 1.1rem;
        /* Slightly larger text for easier finger tapping */
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links a::after {
        display: none;
    }
}

/* =======================================================
   CERTIFICATES PAGE STYLES
   ======================================================= */

.certificates-page .hero {
    padding-top: 4rem;
    padding-bottom: 2rem;
    justify-content: center;
}

.certificates-page .hero h1 {
    text-align: center;
    width: 100%;
    font-size: 3.5rem;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0;
}

.certificate-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.certificate-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(46, 92, 62, 0.15);
}

.certificate-img-container {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: #f8fbf9;
}

.certificate-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.certificate-card:hover .certificate-img-container img {
    transform: scale(1.05);
}

/* Specific adjustment for portrait orientation images if needed */
.certificate-img-container.portrait img {
    object-fit: contain;
}

/* =======================================================
   MODAL STYLES (Image Zoom)
   ======================================================= */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 25, 15, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    animation: zoomIn 0.3s ease;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #edf7ef;
    padding: 15px 0;
    font-size: 1.2rem;
    font-weight: 500;
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%);
    animation: fadeInText 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

@keyframes fadeInText {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-light);
    text-decoration: none;
    cursor: pointer;
}

/* Responsive adjustments for Certificates */
@media (max-width: 768px) {
    .certificate-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .certificate-img-container {
        height: 200px;
    }
    
    .modal-content {
        max-width: 95%;
    }
}