:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --background-light: #ecf0f1;
    --text-color: #333;
    --accent-color: #3498db;
    --white: #ffffff;
    --background-dark: #1a2632;
    --text-color-dark: #f5f5f5;
    --dark-secondary: #253746;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: var(--background-light);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: var(--background-dark);
    color: var(--text-color-dark);
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    background-color: var(--white);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: background-color 0.3s, box-shadow 0.3s;
}

body.dark .container {
    background-color: var(--dark-secondary);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1);
}

.profile-header {
    text-align: center;
    padding: 3rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    transition: background-color 0.3s, color 0.3s;
}

body.dark .profile-header {
    background-color: var(--dark-secondary);
}

.profile-picture {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid var(--primary-color);
}

.profile-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.profile-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: var(--white);
    transition: background-color 0.3s, color 0.3s;
}

body.dark nav {
    background-color: var(--dark-secondary);
}

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

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link.active {
    background-color: var(--accent-color);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

body.dark .nav-link {
    color: var(--text-color-dark);
}

.counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

body.dark .counter {
    color: rgba(255, 255, 255, 0.8);
}

#theme-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

body.dark #theme-toggle {
    color: var(--text-color-dark);
}

#theme-toggle:hover {
    color: var(--white);
}

.section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 2rem;
    transition: background-color 0.3s, color 0.3s;
}

body.dark .section {
    background-color: var(--dark-secondary);
}

.section + .section {
    margin-top: 0;
}

.section:last-child {
    margin-bottom: 0;
}

body.dark .section,
body.dark .section-content {
    box-shadow: none;
    border: none;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

.container {
    border: none;
    box-shadow: none;
}

.section-content p,
.section-content ul {
    margin-bottom: 0;
    border: none;
}

.section-content > *:last-child {
    margin-bottom: 0;
}

.section-content > * {
    padding-bottom: 0;
}

.section-content {
    padding: 1.5rem;
    margin: 0 auto;
    max-width: 800px;
}

.section-content p,
.section-content ul {
    margin-bottom: 0;
    border: none;
}

.section-content ul,
.section-content li {
    margin: 0;
    padding: 0;
}

.responsive-image {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: none;
}

body.dark .responsive-image {
    box-shadow: none;
}

.contact-links {
    margin: 2rem 0;
    padding: 0 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}

.contact-link i {
    margin-right: 0.5rem;
}

.contact-link.email {
    background-color: #f44336;
    color: white;
}

.contact-link.linkedin {
    background-color: #0077B5;
    color: white;
}

.contact-link.github {
    background-color: #333;
    color: white;
}

.contact-link.medium {
    background-color: #12100E;
    color: white;
}

.contact-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

body.dark .contact-link {
    box-shadow: none;
}

.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.posts-container p {
    text-align: center;
    font-size: 1rem;
    color: var(--text-color);
}

body.dark .posts-container p {
    color: var(--text-color-dark);
}

.post {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark .post {
    background-color: var(--dark-secondary);
}

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

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

.post:hover .post-thumbnail {
    filter: brightness(1);
}

.post-content {
    padding: 1rem;
}

.post-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Responsive Design Media Queries */
@media screen and (max-width: 768px) {
    .container {
        margin: 0;
        border-radius: 0;
        width: 100%;
    }

    .profile-header {
        padding: 2rem 1rem;
    }

    .profile-picture {
        width: 120px;
        height: 120px;
    }

    .profile-header h1 {
        font-size: 2rem;
    }

    .profile-header p {
        font-size: 1rem;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .section-content {
        padding: 1rem;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .posts-container {
        grid-template-columns: 1fr;
    }

    .certifications-container .certification-images {
        flex-direction: column;
        align-items: center;
    }

    .certifications-container .certification-images img {
        width: 200px;
        margin-bottom: 1rem;
    }
}

/* Improve touch targets for mobile */
@media (max-width: 480px) {
    .contact-link {
        padding: 1.25rem;
        font-size: 0.9rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* Typography adjustments for smaller screens */
@media screen and (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}