* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.nav a {
    text-decoration: none;
    color: #555;
    margin-left: 30px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #2563eb;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1e3a5f, #2563eb);
    color: #fff;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.85;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: #fff;
    color: #2563eb;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Sections common */
section {
    padding: 80px 0;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: #1e3a5f;
}

/* About */
.about {
    background: #f8f9fa;
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-photo {
    min-width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c4d4e8, #2563eb);
}

.about-text p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.05rem;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.skill-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 35px 25px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.skill-card h3 {
    margin-bottom: 10px;
    color: #1e3a5f;
}

.skill-card p {
    color: #777;
    font-size: 0.95rem;
}

/* Works / Masonry Gallery */
.works {
    background: #f8f9fa;
}

.masonry {
    columns: 3;
    column-gap: 20px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.masonry-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.masonry-item:nth-child(2) { transition-delay: 0.1s; }
.masonry-item:nth-child(3) { transition-delay: 0.2s; }
.masonry-item:nth-child(4) { transition-delay: 0.05s; }
.masonry-item:nth-child(5) { transition-delay: 0.15s; }
.masonry-item:nth-child(6) { transition-delay: 0.25s; }
.masonry-item:nth-child(7) { transition-delay: 0.1s; }
.masonry-item:nth-child(8) { transition-delay: 0.2s; }
.masonry-item:nth-child(9) { transition-delay: 0.3s; }

.masonry-item img {
    width: 100%;
    display: block;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.4s ease;
}

.masonry-item img.loaded {
    opacity: 1;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    color: #fff;
    border-radius: 0 0 12px 12px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
    opacity: 1;
    transform: translateY(0);
}

.masonry-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.masonry-overlay p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Contact */
.contact-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.contact-form .btn {
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: #1e3a5f;
    color: #fff;
    text-align: center;
    padding: 30px 0;
}

.social-links {
    margin-bottom: 15px;
}

.social-links a {
    color: #93c5fd;
    text-decoration: none;
    margin: 0 12px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fff;
}

.footer p {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 1024px) {
    .masonry {
        columns: 2;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-photo {
        min-width: 180px;
        height: 180px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .masonry {
        columns: 1;
    }

    .nav a {
        margin-left: 15px;
        font-size: 0.9rem;
    }
}
