/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2d3748;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

.name {
    font-size: 3rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.contact {
    font-size: 1rem;
    color: #718096;
    margin-top: 0.5rem;
}

.notice {
    font-size: 1rem;
    color: #4a5568;
    margin-top: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Category Sections */
.category-section {
    margin-bottom: 3rem;
}

/* Hide Skills section */
#skills {
    display: none;
}

.category-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.card:hover::before {
    transform: scaleY(1);
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

.card-preview {
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #718096;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f7fafc;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #edf2f7;
    color: #1a202c;
    transform: rotate(90deg);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4 {
    color: #1a202c;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-body h1 {
    font-size: 1.8rem;
}

.modal-body h2 {
    font-size: 1.5rem;
}

.modal-body h3 {
    font-size: 1.3rem;
}

.modal-body h4 {
    font-size: 1.1rem;
}

.modal-body p {
    margin-bottom: 1rem;
    color: #4a5568;
    line-height: 1.7;
}

.modal-body ul,
.modal-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    color: #4a5568;
}

.modal-body li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.modal-body strong {
    color: #1a202c;
    font-weight: 600;
}

.modal-body code {
    background: #f7fafc;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #2d3748;
}

.modal-body pre {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.modal-body pre code {
    background: none;
    padding: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .name {
        font-size: 2.2rem;
    }

    .tagline {
        font-size: 1rem;
    }

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

    .modal-content {
        max-height: 95vh;
        margin: 1rem;
    }

    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }

    .name {
        font-size: 1.8rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.2rem;
    }
}
