/* CSS Variables for Theming */
:root {
    /* Light Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --accent-color: #fca61f;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #222222;
    --footer-text: #ffffff;
}

/* Dark Theme Colors */
.dark {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --text-primary: #f0f0f0;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    --accent-color: #fca61f;
    --border-color: #333333;
    --card-bg: #252525;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    --nav-bg: rgba(18, 18, 18, 0.95);
    --footer-bg: #0a0a0a;
    --footer-text: #f0f0f0;
}

/* Base Styles */
* {
    padding: 0;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    width: 100%;
    height: auto;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(252, 166, 31, 0.1);
}

.light-icon, .dark-icon {
    font-size: 1.4rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.light .dark-icon {
    display: block;
    opacity: 1;
}

.light .light-icon {
    display: none;
    opacity: 0;
}

.dark .light-icon {
    display: block;
    opacity: 1;
}

.dark .dark-icon {
    display: none;
    opacity: 0;
}

/* Navigation */
nav {
    z-index: 4;
    position: sticky;
    top: 0;
    width: 100%;
    height: 10vh;
    backdrop-filter: blur(10px);
    background-color: var(--nav-bg);
    transition: background-color 0.3s ease;
}

.nav-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-container .logo img {
    width: 140px;
    height: 38px;
}

.nav-container .links a {
    font-size: 1.3rem;
    color: var(--text-primary);
    text-decoration: none;
    margin: 0 20px;
    transition: 0.3s linear;
}

.nav-container .links a:hover {
    color: var(--accent-color);
}

.nav-right {
    display: flex;
    align-items: center;
}

.contact-btn {
    width: 150px;
    height: 40px;
    border-radius: 20px;
    background-color: var(--accent-color);
    color: white;
    font-size: 1.2rem;
    transition: 0.3s linear;
    font-weight: 700;
    box-shadow: 1px 1px 10px var(--accent-color);
    border: none;
    outline: none;
    cursor: pointer;
}

.contact-btn:hover {
    background-color: var(--bg-primary);
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.hamburg, .cancel {
    cursor: pointer;
    display: none;
    font-size: 1.5rem;
    color: var(--text-primary);
}

nav .dropmenu {
    position: absolute;
    top: 0;
    backdrop-filter: blur(10px);
    width: 100%;
    height: auto;
    transform: translateY(-300px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: 0.3s linear;
    background-color: var(--nav-bg);
    z-index: 5;
}

.dropmenu a {
    font-size: 1.4rem;
    text-align: center;
    width: 100%;
    color: var(--text-primary);
    padding: 10px 0;
    text-decoration: none;
    transition: 0.3s linear;
}

.dropmenu a:hover {
    background-color: var(--accent-color);
    color: white;
}

.dropmenu button {
    width: 100%;
    height: 45px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Home Section */
section {
    width: 100%;
    min-height: 100vh;
    padding: 80px 0;
}

section .content {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0 20px;
}

.content .main-content {
    width: 50%;
    display: flex;
    flex-direction: column;
    margin: 0 10%;
    position: relative;
}

.main-content h1 {
    font-size: clamp(2rem, 1rem + 5vw, 6rem);
    color: var(--text-primary);
}

.main-content span {
    font-size: clamp(2rem, 1rem + 5vw, 6rem);
    font-weight: 700;
    color: var(--accent-color);
}

.main-content p {
    font-size: clamp(1rem, 0.8rem + 1vw, 1.2rem);
    margin-top: 10px;
    color: var(--text-secondary);
}

.main-content .buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 5% 0;
}

.main-content .buttons button {
    height: 40px;
    width: 160px;
    border-radius: 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 700;
    transition: 0.2s linear;
    cursor: pointer;
}

.buttons button:hover {
    box-shadow: 2px 2px 30px var(--accent-color);
    transform: translateY(-2px);
}

.content .image {
    width: 50%;
    display: flex;
    margin-top: 5px;
    justify-content: center;
}

.image img {
    margin-top: 40px;
    width: min(500px, 100%);
    height: auto;
    filter: drop-shadow(0 0 400px var(--accent-color));
}

/* Social Links */
.social-links {
    margin-top: 20px;
    display: flex;
    gap: 20px;
}

.social-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: var(--card-bg);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent-color);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50%;
}

.social-icon:hover {
    transform: translateY(-5px);
}

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

.social-icon img {
    height: 40px;
    width: 40px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
}

.social-icon:hover img {
    filter: brightness(0) invert(1);
    transform: scale(0.9);
}

#codeforces:hover img {
    background-color: #000;
}

/* About Section */
.about-section {
    background-color: var(--bg-secondary);
    padding: 100px 0;
    transition: background-color 0.3s ease;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-container h2 {
    text-align: center;
    font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 50px;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: flex-start;
}

.about-text {
    flex: 1;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.title-accent {
    height: 32px;
    width: 4px;
    background-color: var(--accent-color);
    border-radius: 999px;
}

.section-title h3 {
    color: var(--text-primary);
    font-size: clamp(1.5rem, 1rem + 2vw, 1.8rem);
    font-weight: bold;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1rem);
}

/* Tabs Styling */
.tabs-container {
    margin: 30px 0;
    position: relative;
}

.tabs-container input[type="radio"] {
    display: none;
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-label {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-label:hover {
    color: var(--accent-color);
}

#tab1:checked ~ .tabs-header label[for="tab1"],
#tab2:checked ~ .tabs-header label[for="tab2"],
#tab3:checked ~ .tabs-header label[for="tab3"] {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

.tabs-content {
    position: relative;
    min-height: 250px;
}

.tab-panel {
    position: absolute;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    animation: fadeOut 0.3s ease forwards;
}

#tab1:checked ~ .tabs-content #skills-panel,
#tab2:checked ~ .tabs-content #education-panel,
#tab3:checked ~ .tabs-content #achievements-panel {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(10px); }
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.skill-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.skill-icon {
    color: var(--accent-color);
    font-size: 20px;
    margin-top: 4px;
}

.skill-card h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 16px;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.skill-tags span {
    padding: 8px 16px;
    background-color: var(--card-bg);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tags span:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: -38px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

.timeline-item h4 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 16px;
}

.timeline-item .institution {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 5px;
}

.timeline-item .period {
    color: var(--text-muted);
    font-size: 12px;
}

/* Achievements */
.achievement-group {
    margin-bottom: 25px;
}

.achievement-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.achievement-icon {
    color: var(--accent-color);
    font-size: 18px;
}

.achievement-header h4 {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.achievement-list {
    list-style: none;
    padding-left: 5px;
}

.achievement-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.list-icon {
    color: var(--accent-color);
    font-size: 16px;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.cta-button {
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    text-align: center;
}

.cta-button.primary {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 4px 10px rgba(252, 166, 31, 0.3);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(252, 166, 31, 0.4);
}

.cta-button.secondary {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.cta-button.secondary:hover {
    background-color: rgba(252, 166, 31, 0.1);
    transform: translateY(-2px);
}

/* Image Section */
.about-image {
    flex: 1;
    position: relative;
}

.image-container {
    position: relative;
}

.image-container img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

.image-accent {
    position: absolute;
    bottom: -16px;
    right: -16px;
    width: 100px;
    height: 100px;
    background-color: var(--accent-color);
    z-index: -1;
    border-radius: 10px;
}

.stat-card {
    position: absolute;
    background-color: var(--card-bg);
    backdrop-filter: blur(4px);
    padding: 16px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    text-align: center;
}

.stat-card.top-left {
    top: 16px;
    left: 16px;
}

.stat-card.bottom-right {
    bottom: 16px;
    right: 16px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Projects Section */
.projects-section {
    background-color: var(--bg-primary);
    padding: 100px 0;
    transition: background-color 0.3s ease;
}

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.projects-container h2 {
    text-align: center;
    font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem);
    color: var(--text-primary);
    margin-bottom: 50px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.project-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-size: clamp(1.2rem, 1rem + 1vw, 1.4rem);
    color: var(--text-primary);
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    font-size: clamp(0.8rem, 0.7rem + 0.5vw, 0.9rem);
    margin-bottom: 15px;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-tech span {
    padding: 5px 10px;
    background-color: var(--bg-secondary);
    border-radius: 15px;
    font-size: clamp(0.7rem, 0.6rem + 0.5vw, 0.8rem);
    color: var(--text-secondary);
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-btn {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: clamp(0.8rem, 0.7rem + 0.5vw, 0.9rem);
}

.project-btn:first-child {
    background-color: var(--accent-color);
    color: white;
}

.project-btn:last-child {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(252, 166, 31, 0.3);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    text-align: center;
    padding: 40px 0;
    margin-top: 50px;
    transition: background-color 0.3s ease;
}

.footer-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo img {
    width: 100px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

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

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-social {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.footer-social a {
    text-decoration: none;
    font-size: 24px;
    color: var(--footer-text);
    transition: 0.3s;
}

.footer-social i {
    text-decoration: none;
    font-size: 2rem;
}

.footer-social a:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

.footer-social a.linkedin:hover {
    color: #0077b5;
}

.footer-social a.gmail:hover {
    color: #dd4b39;
}

.footer-social a.github:hover {
    color: #1dbf73;
}

.footer-text {
    font-size: 14px;
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .content {
        padding: 0 40px;
    }

    .main-content {
        margin: 0 5%;
    }

    .about-content {
        gap: 30px;
    }

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

@media (max-width: 768px) {
    .links {
        display: none;
    }

    .nav-container .contact-btn {
        display: none;
    }

    .hamburg {
        display: block;
        position: absolute;
        right: 20px;
    }

    .nav-container .logo {
        position: absolute;
        left: 20px;
    }

    .nav-right {
        position: absolute;
        right: 70px;
    }

    .content {
        flex-direction: column-reverse;
        padding: 0 20px;
        text-align: center;
    }

    .content .main-content,
    .content .image {
        width: 100%;
        margin: 20px 0;
    }

    .main-content .buttons {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .about-text,
    .about-image {
        width: 100%;
    }

    .image-accent {
        width: 80px;
        height: 80px;
        bottom: -10px;
        right: -10px;
    }

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

    .skill-tags {
        justify-content: center;
    }

    .project-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content h1,
    .main-content span {
        font-size: clamp(1.8rem, 1rem + 4vw, 2.5rem);
    }

    .main-content p {
        font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1rem);
    }

    .buttons button {
        width: 140px;
        font-size: 1rem;
    }

    .social-links {
        gap: 15px;
    }

    .social-icon {
        width: 50px;
        height: 50px;
    }

    .social-icon img {
        height: 30px;
        width: 30px;
    }

    .about-container,
    .projects-container {
        padding: 0 15px;
    }

    .project-image {
        height: 180px;
    }

    .tabs-header {
        flex-wrap: wrap;
    }

    .tab-label {
        padding: 8px 12px;
        font-size: 13px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }
}