* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    background: #F3F4F6;
    color: #111827;
    transition: background 0.5s, color 0.5s;
}
body.dark {
    background: #111827;
    color: #F3F4F6;
}
header {
    background: #111827;
    color: #F3F4F6;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.logo {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1E3A8A, #F87171);
    -webkit-background-clip: text;
    color: transparent;
}
.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}
.nav-links li {
    margin: 0 1.5rem;
}
.nav-links a {
    color: #F3F4F6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}
.nav-links a:hover {
    color: #F87171;
}
#theme-toggle, #motion-toggle {
    background: #1E3A8A;
    color: #F3F4F6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, background 0.3s;
}
#theme-toggle:hover, #motion-toggle:hover {
    transform: scale(1.1);
    background: #F87171;
}
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}
.hero {
    text-align: center;
    padding: 8rem 1rem;
    background: linear-gradient(135deg, #1E3A8A, #F87171);
    color: #F3F4F6;
    position: relative;
    overflow: hidden;
}
#three-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}
.hero h1 {
    font-size: 4rem;
    font-weight: 700;
}
.hero .typing {
    font-size: 1.8rem;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #34D399;
    animation: typing 3s steps(30) forwards, blink 0.5s step-end infinite;
}
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: #34D399;
    color: #111827;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
}
.btn.pulse {
    animation: pulse 1.5s infinite;
}
.btn:hover {
    background: #F87171;
    transform: scale(1.1);
}
.section {
    padding: 5rem 1rem;
    max-width: 1400px;
    margin: 0 auto;
}
h2 {
    font-size: 3rem;
    color: #1E3A8A;
    text-align: center;
    margin-bottom: 2rem;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.about-image img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.about-text p {
    font-size: 1.1rem;
}
.timeline {
    margin-top: 2rem;
}
.timeline-item {
    margin: 1rem 0;
    padding-left: 1.5rem;
    border-left: 3px solid #F87171;
}
.timeline-item span {
    font-weight: 600;
    color: #1E3A8A;
}
.filter-buttons {
    text-align: center;
    margin-bottom: 2rem;
}
.filter-buttons button {
    background: #F3F4F6;
    border: none;
    padding: 0.5rem 1.5rem;
    margin: 0.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
}
body.dark .filter-buttons button {
    background: #1E293B;
}
.filter-buttons button.active, .filter-buttons button:hover {
    background: #1E3A8A;
    color: #F3F4F6;
}
.slideshow {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}
.slides {
    display: flex;
    transition: transform 0.5s ease;
}
.slide {
    min-width: 100%;
    text-align: center;
}
.slide img {
    max-width: 100%;
    border-radius: 15px;
}
.slide-info {
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 0 0 15px 15px;
}
body.dark .slide-info {
    background: rgba(17, 24, 39, 0.8);
}
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #1E3A8A;
    color: #F3F4F6;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 50%;
}
.prev:hover, .next:hover {
    background: #F87171;
}
.prev { left: 10px; }
.next { right: 10px; }
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.project-card {
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
body.dark .project-card {
    background: rgba(17, 24, 39, 0.8);
}
.project-card:hover .card-inner {
    transform: scale(1.05);
}
.card-inner {
    transition: transform 0.3s;
}
.project-card img {
    max-width: 100%;
    border-radius: 10px;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.contact-links a {
    display: block;
    color: #1E3A8A;
    margin: 0.5rem 0;
    font-weight: 600;
}
.contact-links a:hover {
    color: #F87171;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 200;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in-out;
}
.modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: rgba(243, 244, 246, 0.95);
    backdrop-filter: blur(12px);
    margin: 5% auto;
    padding: 2.5rem;
    max-width: 900px;
    border-radius: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 16px 32px rgba(0, 0, 0, 0.1);
    animation: scaleIn 0.3s ease-in-out;
    position: relative;
}
body.dark .modal-content {
    background: rgba(17, 24, 39, 0.95);
}
.modal-content img {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.modal-content h3 {
    font-size: 2rem;
    color: #1E3A8A;
    margin-bottom: 1rem;
}
.modal-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.modal-content a {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #34D399;
    color: #111827;
    text-decoration: none;
    border-radius: 25px;
    margin: 0.5rem;
    font-weight: 600;
    transition: background 0.3s, transform 0.3s;
}
.modal-content a:hover {
    background: #F87171;
    transform: scale(1.05);
}
.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    color: #F87171;
    cursor: pointer;
    transition: transform 0.3s;
}
.close:hover {
    transform: scale(1.2);
}
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1E3A8A;
    color: #F3F4F6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 50%;
    cursor: pointer;
    display: none;
}
.back-to-top.show {
    display: block;
}
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}
@keyframes blink {
    50% { border-color: transparent; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s, transform 0.5s;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
.no-motion .fade-in, .no-motion .modal, .no-motion .modal-content {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
}
@media (max-width: 768px) {
    .hamburger { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: #111827;
    }
    .nav-links.show {
        display: flex;
    }
    .nav-links li {
        margin: 1rem 0;
    }
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .modal-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        margin: 10% 5%;
    }
}