/* ===== Sections ===== */
.section {
    padding: 80px 0;
    position: relative;
}

.section:nth-child(even) {
    background: #f9fafb;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.highlight {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.highlight:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.highlight i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.highlight h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.highlight p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: var(--gradient-primary);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.image-overlay {
    text-align: center;
}

.image-overlay i {
    font-size: 8rem;
    color: white;
    opacity: 0.3;
}

/* ===== Experience Section ===== */
.timeline {
    position: relative;
    padding-left: 50px;
}

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

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--primary-color);
}

.timeline-date {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(5px);
    box-shadow: var(--box-shadow-hover);
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content ul {
    list-style: none;
}

.timeline-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.6;
}

.timeline-content li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== Education Section ===== */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.education-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: var(--transition);
}

.education-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 1.5rem;
    color: white;
}

.education-card h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.education-card h4 {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.education-card .date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.education-card .grade {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* ===== Skills Section ===== */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.skill-category h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.skill-category h3 i {
    color: var(--primary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ===== Projects Section ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.project-header {
    background: var(--gradient-primary);
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.project-header i {
    font-size: 1.5rem;
}

.project-header h3 {
    font-size: 1.3rem;
}

.project-card>p {
    padding: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

.project-tech {
    padding: 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: #f3f4f6;
    color: var(--text-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.project-links {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
}

.btn-play,
.btn-details {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-play {
    background: var(--gradient-primary);
    color: white;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.btn-details {
    background: #f3f4f6;
    color: var(--text-color);
}

.btn-details:hover {
    background: var(--gradient-primary);
    color: white;
}

/* ===== Awards Section ===== */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.award-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: var(--transition);
}

.award-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-hover);
}

.award-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.award-card h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.award-card p {
    color: var(--text-light);
}

/* ===== Contact Section ===== */
.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .btn {
    align-self: center;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ===== Modals ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    border-radius: 15px;
    animation: slideIn 0.3s ease;
}

.modal-header {
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 2rem;
}

/* ===== Tetris Game Styles ===== */
.game-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
}

#tetrisCanvas {
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: #1a1a2e;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-board,
.level-board,
.lines-board,
.next-piece,
.controls {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 10px;
}

.score-board h3,
.level-board h3,
.lines-board h3,
.next-piece h3,
.controls h3 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    font-size: 1rem;
}

.score-board p,
.level-board p,
.lines-board p {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

#nextCanvas {
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.controls p {
    font-size: 0.9rem;
    margin: 0.25rem 0;
    color: var(--text-color);
}

.controls kbd {
    background: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    border: 1px solid #ddd;
    font-family: monospace;
}

.btn-game {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-game:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--dark-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-item::before {
        left: -18px;
    }

    .education-grid,
    .skills-grid,
    .projects-grid,
    .awards-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }

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

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1rem;
    }

    .timeline {
        padding-left: 25px;
    }

    .timeline-item::before {
        left: -11px;
        width: 10px;
        height: 10px;
        border-width: 2px;
        box-shadow: 0 0 0 2px var(--primary-color);
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Additional Mobile Optimizations ===== */
img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    .timeline {
        padding-left: 25px;
    }

    .timeline-item::before {
        left: -31px;
        width: 10px;
        height: 10px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}