body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 200 200'%3E%3Cpolygon fill='%23FAFAFA' points='100 0 0 100 100 100 100 200 200 100 200 0'/%3E%3C/svg%3E");
    color: #333;
    line-height: 1.6;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

footer {
    text-align: center;
    padding: 30px;
    margin-top: 20px;
}

footer .copyright {
    font-size: 0.9em;
    color: #777;
    margin: 0;
}

.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.logo a {
    text-decoration: none;
    color: #333;
    font-size: 1.5em;
    font-weight: bold;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #007BFF;
}

.page-content {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

main section {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

main section h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2em;
}

main section#skills {
    background-color: #ffffff;
}

#presentation {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
    border-radius: 8px;
    color: #fff;
    margin-bottom: 48px;
}

#projects-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.project-card {
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    width: 250px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    border-color: #007BFF;
}

.technologies span {
    background-color: #e7e7e7;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin: 5px 5px 0 0;
    display: inline-block;
}

.project-links a {
    margin-top: 15px;
    text-decoration: none;
    color: #007BFF;
    font-weight: bold;
}

.project-links a:hover {
    text-decoration: underline;
}

#hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

#hamburger-btn .line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

#theme-change {
    cursor: pointer;
    transition: transform 0.2s ease;
}

#theme-change:hover {
    transform: scale(1.2);
}

#contact {
    background-color: #ffffff;
    padding: 40px 30px;
    border-radius: 8px;
}

.contact-header {
    text-align: center;
    margin-bottom: 40px;
}

#contact-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-info, .contact-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.info-item i {
    font-size: 1.2em;
    color: #007BFF;
    width: 20px;
    text-align: center;
}

.info-item span, .info-item a {
    text-decoration: none;
    color: #555;
    font-size: 1.1em;
}

.info-item a:hover {
    text-decoration: underline;
}

.social-links-contact a:hover {
    transform: scale(1.2);
    color: #007BFF;
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    resize: none;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007BFF;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
    outline: none;
}

#contact-form button {
    padding: 12px 20px;
    background: linear-gradient(90deg, #007BFF 0%, #0056b3 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

#contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.about-me-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
}

.about-me-text{
    flex: 1 1 300px;
}

.about-me-text p {
    margin-top: 0;
    line-height: 1.7;
}

.about-me-highlights {
    flex: 1 1 280px;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid #007BFF;
}

.dark-mode .about-me-highlights {
    background-color: #252525;
    border-left-color:#4dabf7 ;
}

.about-me-highlights h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.about-me-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-me-highlights li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-weight: 500;
}

.about-me-highlights li:last-child {
    margin-bottom: 0;
}

.about-me-highlights i {
    color: #007BFF;
    font-size: 1.1em;
}

.dark-mode .about-me-highlights i {
    color: #4dabf7;
}

#form-status {
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    min-height: 1.2em;
}

.social-links {
    text-align: center;
    margin-top: 30px;
}

.social-links a {
    font-size: 2em;
    color: #333;
    margin: 0 10px;
}

#loader {
    text-align: center;
    padding: 40px;
    font-size: 1.1em;
    color: #888;
}

#projects-container .status-error {
    text-align: center;
    font-size: 1.1rem;
    padding: 2rem 1rem;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

#form-status.status-success {
  color: #155724;
}

#form-status.status-error {
  color: #721c24;
}

#form-status.status-warning {
  color: #856404;
}

body.dark-mode {
    background-color: #121212;
    background-color: #000000;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='30' viewBox='0 0 1000 120'%3E%3Cg fill='none' stroke='%23222' stroke-width='10' %3E%3Cpath d='M-500 75c0 0 125-30 250-30S0 75 0 75s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 45c0 0 125-30 250-30S0 45 0 45s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 105c0 0 125-30 250-30S0 105 0 105s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 15c0 0 125-30 250-30S0 15 0 15s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500-15c0 0 125-30 250-30S0-15 0-15s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3Cpath d='M-500 135c0 0 125-30 250-30S0 135 0 135s125 30 250 30s250-30 250-30s125-30 250-30s250 30 250 30s125 30 250 30s250-30 250-30'/%3E%3C/g%3E%3C/svg%3E");
    color: #E0E0E0;
}

.dark-mode .main-header {
    background-color: #1E1E1E;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark-mode .logo a,
.dark-mode .main-nav a {
    color: #E0E0E0;
}

.dark-mode .main-nav a:hover {
    color: #4dabf7;
}

.dark-mode #hamburger-btn .line {
    background-color: #e0e0e0;
}

.dark-mode main section,
.dark-mode #contact {
    background-color: #1E1E1E;
}

.dark-mode #loader {
    color: #aaa;
}

.dark-mode .project-card {
    background-color: #252525;
    border-color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark-mode .project-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border-color: #4dabf7;
}

.dark-mode .technologies span {
    background-color: #333;
    color: #e0e0e0;
}

.dark-mode .project-links a {
    color: #4dabf7;
}

.dark-mode .project-links a:hover {
    text-decoration-color: #4dabf7;
}

.dark-mode .social-links a {
    color: #E0E0E0;
}

.dark-mode .copyright {
    color: #888;
}

.dark-mode .info-item i {
    color: #4dabf7;
}

.dark-mode .info-item span, .dark-mode .info-item a {
    color: #e0e0e0;
}

.dark-mode .social-links-contact a {
    color: #E0E0E0;
}

.dark-mode .form-group input,
.dark-mode .form-group textarea {
    background-color: #252525;
    border-color: #444;
    color: #E0E0E0;
}

.dark-mode .form-group input:focus,
.dark-mode .form-group textarea:focus {
    border-color: #4dabf7;
    box-shadow: 0 0 5px rgba(77, 171, 247, 0.3);
}

.dark-mode #contact-form button {
    background: linear-gradient(90deg, #4dabf7 0%, #228be6 100%);
}

.dark-mode #contact-form button:hover {
    background-color: #228be6;
}

.dark-mode #form-status.status-error {
    color: #f8d7da;
    background-color: #2c1a1f;
    border-color: #582a2e;
}

.dark-mode #form-status.status-success {
    color: #73d991;
}

.dark-mode #form-status-error {
    color: #f68084;
}

.dark-mode #form-status.status-warning {
    color: #f7b995;
}

.skills-subtitle {
    text-align: center;
    font-size: 1.1em;
    color: #333;
    margin-top: -20px;
    margin-bottom: 40px;
}

.skills-showcase {
    max-width: 900px;
    margin: 0 auto;
}

.skill-category {
    margin-bottom: 40px;
}

.skill-category h3 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.6em;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.skill-category h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e0c3fc 0%, #8ec5fc 100%);
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.skill-item {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 120px;
    height: 110px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.dark-mode .skill-item {
    background-color: #252525;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.dark-mode .skill-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.skill-item i {
    font-size: 3.5em;
    color: #333;
    transition: transform 0.3s ease;
}

.dark-mode .skill-item i {
    color: #E0E0E0;
}

.skill-name {
    position: absolute;
    bottom: 10px;
    font-size: 0.9em;
    font-weight: 500;
    color: #333;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(5px);
}

.category-description {
    text-align: center;
    max-width: 700px;
    margin: -15px auto 30px;
    color: #333;
    font-size: 1em;
    line-height: 1.5;
}

.dark-mode .category-description {
    color: #E0E0E0;
}

.dark-mode .skill-name {
    color: #E0E0E0;
}

.skill-item:hover i {
    transform: translateY(-10px);
}

.skill-item:hover .skill-name {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode .skills-subtitle {
    color: #E0E0E0;
}

.dark-mode .skill-category h3::after {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
}

.hidden-on-load {
    opacity: 0;
    transform: translateY(20px);
}

.hidden-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hidden-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode #presentation {
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
}

.dark-mode main section#skills {
    background-color: #1e1e1e;
}

@keyframes shake {
  0%   { transform: scale(1.2) translateX(0); }
  20%  { transform: scale(1.2) translateX(-4px); }
  40%  { transform: scale(1.2) translateX(4px); }
  60%  { transform: scale(1.2) translateX(-4px); }
  80%  { transform: scale(1.2) translateX(4px); }
  100% { transform: scale(1.2) translateX(0); }
}

.shake {
  animation: shake 0.4s ease;
}

@media (max-width: 768px) {
    #hamburger-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
        transition: right 0.4s ease-in-out;
        z-index: 1000;
    }
    
    .dark-mode .main-nav {
        background-color: #1E1E1E;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
    }

    .main-nav.is-active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        padding-top: 100px;
        align-items: center;
    }

    .main-nav li {
        margin: 15px 0;
    }

    .main-nav a {
        font-size: 1.5rem;
    }

    #hamburger-btn.is-active .line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    #hamburger-btn.is-active .line:nth-child(2) {
        opacity: 0;
    }
    #hamburger-btn.is-active .line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .about-me-container {
        flex-direction: column;
        align-items: center;
    }
}