* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

body.homepage {
    background-color: #fff !important;
}

body.homepage .portfolio {
    background: transparent;
}

/* Featured Section Styles */
.featured-section {
    margin-bottom: 4rem;
}

.featured-section h2 {
    color: #1877f2;
    border-bottom: 3px solid #1877f2;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.regular-section h2 {
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.featured-item {
    position: relative;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(24, 119, 242, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Remove underlines from all links */
a {
    text-decoration: none;
}

.nav-menu a:hover {
    color: #1877f2;
}

.contact-link {
    background: #1877f2;
    color: white !important;
    padding: 8px 20px;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.contact-link:hover {
    background: #166fe5;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #1877f2;
    margin: 3px 0;
    transition: 0.3s;
}


/* Portfolio Section */
.portfolio {
    padding: 100px 0;
    background: white;
}

.portfolio h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #1877f2;
    margin-bottom: 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(24, 119, 242, 0.15);
}

.portfolio-image {
    height: 200px;
    background: linear-gradient(135deg, #1877f2, #42a5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    overflow: hidden;
    position: relative;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.placeholder-image {
    text-align: center;
    padding: 2rem;
    word-break: break-word;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    color: #1877f2;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.portfolio-info p {
    margin-bottom: 1rem;
    color: #666;
}

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

.tag {
    background: #e3f2fd;
    color: #1877f2;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}


/* Footer */
footer {
    background: #1877f2;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-brand .logo {
        height: 40px;
    }


    .portfolio h2 {
        font-size: 2rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    .portfolio {
        padding: 80px 0;
    }
}

@media (max-width: 480px) {
    .nav-brand .logo {
        height: 35px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .portfolio-item {
        margin: 0 10px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item {
    animation: fadeInUp 0.6s ease-out;
}