* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

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

header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.intro {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto 30px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto 30px;
}

#search {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    outline: none;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.work-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

/* ===== Work Content Cards ===== */
.work-content {
    background: linear-gradient(135deg, #fff5d6, #fdf0e6);
    color: #2b2d42;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s, background 0.3s, color 0.3s;
}

.work-content:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, #4169e1, #8338ec);
    color: #fff;
}

.work-number {
    font-weight: bold;
    font-size: 0.9rem;
    color: #1e1f1f;
    margin-bottom: 5px;
}

.work-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.work-link:hover {
    color: #ff6f61;
}

.work-domain {
    font-size: 0.9rem;
    color: #555;
    margin-top: 4px;
}

.work-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

footer {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* ===== Butterfly Gradient Title ===== */
.butterfly-gradient {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(
        90deg,
        #ff6b6b,
        #ffdd59,
        #6bf178,
        #5bd3ff,
        #9b7bff,
        #ff7bd8
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: butterflyShift 6s linear infinite;
    display: inline-block;
    letter-spacing: 0.02em;
}

@media (prefers-reduced-motion: reduce) {
    .butterfly-gradient {
        animation: none;
        background-position: 0% 50%;
    }
}

@keyframes butterflyShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== Intro Section ===== */
.intro-nav {
    margin: 1rem 0;
    text-align: center;
}

.intro-nav a {
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
}

.intro-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d, #6bf178, #5bd3ff, #9b7bff);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.intro-nav a:hover {
    color: #ff6b6b;
}

.intro-nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.intro-contact {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #222;
    font-weight: 600;
    text-align: center;
}

.intro-contact i {
    color: #25d366;
    margin-right: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    h1 { font-size: 2.2rem; }
    .intro { font-size: 1rem; }
}

@media (max-width: 480px) {
    .works-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.8rem; }
}
