/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: #2A2A2A;
    background-image: url('assets/images/bc1.jpg');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    line-height: 1.8;
    padding: 16px;
}

/* Dynamic Navigation */
.dynamic-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.6); /* Changed to .6 transparency */
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 16px;
    z-index: 10;
    border-bottom: 1px solid #444;
}

.dynamic-nav a {
    color: #ffffff;
    text-decoration: none;
    padding: 10px 16px;
    margin: 0 10px;
    font-weight: 500;
}

.dynamic-nav a:hover,
.dynamic-nav a.active {
    color: #ffcc00;
    font-weight: bold;
    border-bottom: 2px solid #ffcc00;
}

/* Hamburger Menu */
.hamburger-menu {
    display: flex;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 11;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(50, 50, 50, 0.8);
    border-radius: 8px;
    padding: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Hamburger Bars */
.hamburger-menu div {
    width: 30px;
    height: 4px;
    background-color: #fff;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Show Hamburger Menu on Small Screens */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }

    .dynamic-nav {
        display: none;
    }
}

/* Transformations for Animated Arrow */
.hamburger-menu.active div:nth-child(1) {
    transform: rotate(28deg) translate(4px, 4px);
}

.hamburger-menu.active div:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active div:nth-child(3) {
    transform: rotate(-28deg) translate(4px, -4px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(50, 50, 50, 0.9);
    padding-top: 50px;
    text-align: center;
    flex-direction: column;
    overflow-y: auto;
    z-index: 10;
}

.mobile-nav a {
    display: block;
    color: #ffffff;
    padding: 16px;
    font-size: 21px;
    text-decoration: none;
}

.mobile-nav a:hover {
    color: #ffcc00;
}

.mobile-nav.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header Styling with Animation Setup */
header {
    text-align: center;
    padding: 48px 32px;
    margin: 48px auto 64px;
    background: rgba(255, 255, 255, 0.6); /* Restored transparency */
    border-radius: 12px;
    max-width: 1000px;
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 1s ease, transform 1s ease;
}

header p {
    margin-top: 16px;
    font-size: 19px;
    color: #333;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Logo Container and Logo Styling */
.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0;
}

.full-logo {
    max-width: 100%;
    height: auto;
    width: 380px; /* Default width */
}

@media (max-width: 768px) {
    .full-logo {
        width: 280px;
        margin-top: 16px; /* Adds space above the logo */
    }
}

@media (max-width: 480px) {
    .full-logo {
        width: 250px;
        margin-top: 24px; /* More space for small screens */
    }
}

/* Section Styling */
section {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 32px auto;
    padding: 40px 32px;
    background-color: rgba(255, 255, 255, 0.6); /* Restored transparency */
    color: #2A2A2A;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section + section {
    margin-top: 64px;
}

/* Enhanced Heading Styling */
h2 {
    color: #232366;
    font-weight: 700;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    margin-bottom: 32px;
    font-size: 24px;
    border-bottom: 2px solid #2E2E6A;
    padding-bottom: 8px;
    text-align: center;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
    padding: 16px;
    border-radius: 8px;
}

/* Paragraph and List Styling */
p {
    margin-bottom: 24px;
    line-height: 1.8;
    font-size: 18px;
    text-align: justify;
    padding: 0 8px;
}

/* Improved Readability for "About Me" Section on Mobile */
#about p {
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
    padding: 0 16px; /* Adds padding for small screens */
}

section ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 16px;
}

section ul li {
    margin-bottom: 24px;
    font-size: 18px;
    line-height: 1.8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding-left: 24px;
    position: relative;
}

section ul li:before {
    content: '•';
    position: absolute;
    left: 0;
    color: #2E2E6A;
    font-size: 24px;
    top: 0;
}

/* Timeline Styling */
.timeline {
    display: flex;
    flex-direction: column;
    border-left: 4px solid #2E2E6A;
    padding-left: 32px;
    margin-top: 32px;
}

.timeline-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    margin-bottom: 40px;
    position: relative;
    padding-left: 24px;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-item .date {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    display: block;
    position: relative;
    padding-left: 24px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.timeline-item .date::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 10px;
    height: 10px;
    background-color: #2E2E6A;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.timeline-item h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #2E2E6A;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.timeline-item p {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

/* Contact Section Styling */
#contact p {
    font-size: 18px;
    text-align: center;
    margin-bottom: 16px;
}

#contact a {
    color: #E63946;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    padding: 8px 16px;
    margin: 8px;
    border-radius: 5px;
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.8);
}

#contact a:hover {
    color: #D62828;
}

/* Responsive Styles */
@media (max-width: 768px) {
    section {
        margin: 24px 16px;
        padding: 32px;
    }
    h2 {
        font-size: 22px;
    }
    #about p {
        font-size: 18px;
        line-height: 1.7;
        text-align: justify;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    header p {
        font-size: 16px;
    }
    section {
        padding: 24px;
        margin: 24px;
    }
    h2 {
        font-size: 21px;
    }
    #about p {
        font-size: 16px;
        line-height: 1.5;
        padding: 0 8px;
    }
}
