:root {
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.8);
    --surface-border: rgba(0, 0, 0, 0.06);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent-1: #2563eb;
    --accent-2: #7c3aed;
    --accent-3: #db2777;
}

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

body {
    font-family: 'Outfit', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.08), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(124, 58, 237, 0.08), transparent 30%);
    background-attachment: fixed;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 5rem;
    animation: fadeInDown 1s ease-out;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    text-decoration: none;
    color: inherit;
    animation: fadeInUp 0.8s ease-out backwards;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}

.card:nth-child(7) {
    animation-delay: 0.7s;
}

.card:nth-child(8) {
    animation-delay: 0.8s;
}

.card:nth-child(9) {
    animation-delay: 0.9s;
}

.card:nth-child(10) {
    animation-delay: 1.0s;
}

.card:nth-child(11) {
    animation-delay: 1.1s;
}

.card:nth-child(12) {
    animation-delay: 1.2s;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    flex-shrink: 0;
}

.card:nth-child(3n+1) .icon-box {
    background: linear-gradient(135deg, var(--accent-1), #10b981);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.card:nth-child(3n+2) .icon-box {
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    box-shadow: 0 4px 15px rgba(236, 72, 153, 0.3);
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 2rem;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--surface-border);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.card:hover .card-footer {
    color: #0f172a;
}

.arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.card:hover .arrow {
    transform: translateX(5px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.blob {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(124, 58, 237, 0.06) 100%);
    filter: blur(120px);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 3rem 1.5rem;
    }

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