/* Global Styles */
:root {
    --primary-color: #1996a1;
    --secondary-color: #2c3e50;
    --text-color: #113837;
    --light-text: #777;
    --background-color: #fff;
    --light-bg: #f8f9fa;
    --dark-bg: #161b22;
    --border-color: #e0e0e0;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 15px;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style-type: none;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    font-size: 16px;
    text-align: center;
}

.btn:hover {
    background-color: #31c95c;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.small-btn {
    padding: 8px 16px;
    font-size: 14px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.secondary-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 2px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.outline-btn {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.outline-btn:hover {
    background-color: var(--light-bg);
    box-shadow: none;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    font-weight: 600;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: transparent;
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin-bottom: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--light-bg);
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.hero h2 {
    font-size: 2.2rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.highlight {
    color: var(--primary-color);
}

.hero-btns {
    margin-bottom: 30px;
}

.hero-btns .btn {
    margin-right: 15px;
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.2rem;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: center;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Skill buttons styling */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.skill-btn {
    padding: 8px 16px;
    border-radius: 50px;
    background-color: #4a89dc;
    color: white;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.skill-btn:hover {
    background-color: #3567b0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.skill-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}



.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.skill-btn {
    background-color: #cfd6db;
    border: 1px solid #ddd;
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skill-btn:hover {
    background-color: #333;
    color: #fff;
}

.skill-description {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-top: 15px;
}

.skill-description p {
    margin: 0;
    line-height: 1.6;
}


.skill-bars {
    display: none;
}

/* Projects Section */
.projects {
    background-color: var(--light-bg);
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    background: none;
    border: none;
    padding: 8px 20px;
    margin: 0 5px 10px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 20px;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 20px;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-content p {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.project-techs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 8px;
}

.project-techs span {
    background-color: #f0f0f0;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.project-links {
    display: flex;
    gap: 10px;
}

/* Project Modals */
.project-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    padding: 30px;
    border-radius: var(--border-radius);
    position: relative;
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

.project-app {
    margin-top: 30px;
}

/* Weather App Styles */
.weather-app {
    max-width: 100%;
}

.weather-container {
    background-color: #f8f9fa;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.weather-header {
    display: flex;
    padding: 20px;
    background-color: #4070f4;
}

.weather-header input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.weather-header button {
    padding: 12px 20px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.weather-header button:hover {
    background-color: #1a252f;
}

.loading {
    display: none;
    padding: 40px;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    display: none;
    text-align: center;
    padding: 30px;
    color: #e74c3c;
}

.weather-data {
    padding: 30px;
}

.weather-current {
    margin-bottom: 30px;
}

.weather-current h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.weather-current p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.weather-main {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.weather-main img {
    width: 100px;
    height: 100px;
    margin-right: 20px;
}

.temp-container h1 {
    font-size: 3rem;
    margin-bottom: 5px;
}

.weather-details {
    display: flex;
    justify-content: space-between;
    background-color: rgba(64, 112, 244, 0.1);
    padding: 20px;
    border-radius: 10px;
}

.detail {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-label {
    font-size: 0.9rem;
    color: var(--light-text);
    margin-bottom: 5px;
}

.forecast h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.forecast-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.forecast-item {
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.forecast-item p {
    font-weight: 500;
    margin-bottom: 10px;
}

.forecast-item img {
    width: 50px;
    height: 50px;
    margin: 10px auto;
}

.forecast-item .temp {
    font-size: 1.5rem;
    font-weight: 600;
}

/* Calculator Styles */
.calculator-app {
    max-width: 350px;
    margin: 0 auto;
}

.calculator {
    background-color: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.calculator-display {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: right;
}

#history {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    min-height: 24px;
    margin-bottom: 5px;
    overflow-x: auto;
    white-space: nowrap;
}

#result {
    font-size: 2.5rem;
    font-weight: 500;
    min-height: 60px;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: #ddd;
}

.calculator-buttons button {
    border: none;
    background-color: white;
    font-size: 1.5rem;
    padding: 20px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    outline: none;
}

.calculator-buttons button:hover {
    background-color: #f1f1f1;
}

.calculator-buttons button:active {
    background-color: #e0e0e0;
}

.btn-clear {
    color: #e74c3c;
}

.btn-operator {
    color: var(--primary-color);
}

.btn-equal {
    background-color: var(--primary-color) !important;
    color: white;
}

.btn-equal:hover {
    background-color: #3156c9 !important;
}

.zero {
    grid-column: span 2;
}

/* Todo List Styles */
.todo-app {
    max-width: 600px;
    margin: 0 auto;
}

.todo-container {
    background-color: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.todo-header {
    background-color: var(--primary-color);
    padding: 20px;
    color: white;
}

.todo-header h2 {
    margin-bottom: 15px;
}

.todo-form {
    display: flex;
}

.todo-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.todo-form button {
    padding: 12px 20px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.todo-form button:hover {
    background-color: #1a252f;
}

.todo-filters {
    display: flex;
    padding: 15px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
}

.todo-filter {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    border-radius: 20px;
    margin-right: 10px;
}

.todo-filter.active, .todo-filter:hover {
    background-color: rgba(64, 112, 244, 0.1);
    color: var(--primary-color);
}

.todo-list {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.todo-item:last-child {
    margin-bottom: 0;
}

.todo-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.todo-text {
    flex: 1;
    font-size: 1.1rem;
}

.completed .todo-text {
    text-decoration: line-through;
    color: var(--light-text);
}

.todo-delete {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.todo-delete:hover {
    opacity: 1;
}

.todo-summary {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: white;
    border-top: 1px solid var(--border-color);
    color: var(--light-text);
}

#clear-completed {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
}

#clear-completed:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact {
    background-color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(64, 112, 244, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-social h3 {
    margin-bottom: 15px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Media Queries */
@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
        text-align: center;
    }
    
    .about-image img {
        max-width: 250px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 30px 30px;
        transition: 0.4s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-filters {
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .weather-details {
        flex-direction: column;
        gap: 15px;
    }
    
    .forecast-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        padding: 20px;
    }
}