/* ========================
   Hero Section
   ======================== */
.hero-section {
    background: #0f4c75;
    color: white;
    padding: 3rem 2rem;
    margin: -1rem -1rem 2rem -1rem;
    border-radius: 0 0 24px 24px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.hero-content > p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.stat-item p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* ========================
   Section Headings
   ======================== */
h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 3rem 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h2:first-of-type {
    margin-top: 2rem;
}

/* ========================
   Frequent Visited Sites
   ======================== */
.frequent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.frequent-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border: 2px solid #e0e7ff;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    color: inherit;
}

.frequent-card:hover {
    border-color: #1b9aaa;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(27, 154, 170, 0.15);
}

.frequent-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.frequent-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
}

.frequent-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #718096;
}

/* ========================
   Flight of Ideas
   ======================== */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.idea-card {
    background: linear-gradient(135deg, #fef5e7 0%, #fef9f3 100%);
    border: 2px solid #f8e5c8;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.idea-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(248, 229, 200, 0.4);
    border-color: #f0d5a8;
}

.idea-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.idea-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
    flex: 1;
}

.idea-badge {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ========================
   Search & Filter Section
   ======================== */
.search-filter-section {
    margin: 1.5rem 0;
}

.search-box {
    margin-bottom: 1rem;
}

#project-search {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid #e0e7ff;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#project-search:focus {
    border-color: #1b9aaa;
    box-shadow: 0 4px 12px rgba(27, 154, 170, 0.15);
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid #e0e7ff;
    background: white;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

.filter-btn:hover {
    border-color: #1b9aaa;
    color: #1b9aaa;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: #1b9aaa;
    color: white;
    border-color: transparent;
}

/* ========================
   Project Grids
   ======================== */
.proj-grid,
.finished-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

/* ========================
   Project Cards (Ongoing & Finished)
   ======================== */
.proj-card,
.finished-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.proj-card:hover,
.finished-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.proj-card .thumb,
.finished-card .thumb {
    height: 180px;
    background: linear-gradient(135deg, #f5f7fb 0%, #e8ecf4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.proj-card .thumb img,
.finished-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.proj-card:hover .thumb img,
.finished-card:hover .thumb img {
    transform: scale(1.05);
}

.thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f4c75 0%, #1b9aaa 100%);
}

.thumb-icon {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    opacity: 0.9;
}

.proj-card .body,
.finished-card .body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.proj-card h3,
.finished-card h3,
.planned-card h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a202c;
}

.summary {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

/* Finished card specific */
.finished-card {
    opacity: 0.95;
}

.completed-badge {
    background: #d4f4dd;
    color: #276749;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ========================
   Planned Projects
   ======================== */
.planned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.planned-card {
    background: linear-gradient(135deg, #e6f7ff 0%, #f0f9ff 100%);
    border: 2px solid #bae7ff;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.planned-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(186, 231, 255, 0.4);
    border-color: #91d5ff;
}

.planned-card .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.planned-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.priority-badge {
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.priority-high {
    background: #fee;
    color: #c53030;
}

.priority-medium {
    background: #fef5e7;
    color: #c05621;
}

.priority-low {
    background: #e6f7ff;
    color: #0c5460;
}

.timeline-badge {
    background: #e0e7ff;
    color: #4c51bf;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================
   Badges
   ======================== */
.badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-danger {
    background: #fee;
    color: #c53030;
}

.badge-success {
    background: #d4f4dd;
    color: #276749;
}

/* ========================
   Tags
   ======================== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    background: #edf2f7;
    color: #4a5568;
    padding: 0.3rem 0.7rem;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #d1f5f8;
    color: #1b9aaa;
}

/* ========================
   Project Links
   ======================== */
.project-links {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.main-links,
.external-links,
.links-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.external-links {
    margin-top: 0.5rem;
}

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.link-btn:hover {
    background: white;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    color: #2d3748;
}

.link-icon {
    font-size: 1rem;
    line-height: 1;
}

.link-label {
    line-height: 1;
}

/* Specific link type colors */
.link-webpage:hover {
    border-color: #1b9aaa;
    color: #1b9aaa;
}

.link-github:hover {
    border-color: #24292e;
    color: #24292e;
}

.link-drive:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.link-external:hover {
    border-color: #48bb78;
    color: #48bb78;
}

.link-notes:hover {
    border-color: #ed8936;
    color: #ed8936;
}

/* ========================
   Project Detail Pages
   ======================== */
.project-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.project-detail h2 {
    color: #0f4c75;
    border-bottom: 3px solid #1b9aaa;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.project-detail h3 {
    color: #0f4c75;
    margin-top: 1.5rem;
}

.project-detail .tag {
    display: inline-block;
}

.project-detail ul {
    list-style: none;
    padding-left: 0;
}

.project-detail li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

/* Card Links */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover h3 {
    color: #1b9aaa;
}

.proj-card .card-footer,
.finished-card .card-footer {
    padding: 0 1.5rem 1.5rem;
}

/* ========================
   Research Network Cards
   ======================== */
.network-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.network-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 2px solid #c5e1a5;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.network-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(139, 195, 74, 0.3);
    border-color: #aed581;
}

.network-badge {
    display: inline-block;
    background: #8bc34a;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.network-meta {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #558b2f;
}

.network-meta strong {
    color: #33691e;
}

/* ========================
   Tools & Resources Cards
   ======================== */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.resource-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #e3f2fd;
    padding: 1.5rem;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(33, 150, 243, 0.15);
    border-color: #90caf9;
}

.resource-category {
    display: inline-block;
    background: #2196f3;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.resource-meta {
    display: flex;
    gap: 1rem;
    margin: 0.75rem 0;
    font-size: 0.85rem;
    color: #666;
    flex-wrap: wrap;
}

.resource-meta-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.resource-features, .resource-use-cases {
    margin: 1rem 0;
}

.resource-features h4, .resource-use-cases h4 {
    font-size: 0.9rem;
    color: #1976d2;
    margin-bottom: 0.5rem;
}

.resource-features ul, .resource-use-cases ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.resource-features li, .resource-use-cases li {
    padding: 0.25rem 0 0.25rem 1.2rem;
    position: relative;
    font-size: 0.85rem;
    color: #555;
}

.resource-features li:before, .resource-use-cases li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #2196f3;
    font-weight: bold;
}

/* ========================
   Collaboration Cards
   ======================== */
.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.collab-card {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 2px solid #ffcc80;
    border-radius: 20px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.collab-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(255, 152, 0, 0.25);
    border-color: #ffb74d;
}

.collab-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.collab-status {
    display: inline-block;
    background: #4caf50;
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
}

.collab-meta {
    margin: 0.75rem 0;
    font-size: 0.9rem;
    color: #e65100;
}

.collab-meta strong {
    color: #bf360c;
}

.collab-role {
    background: #fff9c4;
    border-left: 3px solid #fbc02d;
    padding: 0.75rem;
    margin: 1rem 0;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #f57f17;
}

.collab-objectives, .collab-deliverables {
    margin: 1rem 0;
}

.collab-objectives h4, .collab-deliverables h4 {
    font-size: 0.9rem;
    color: #e65100;
    margin-bottom: 0.5rem;
}

.collab-objectives ul, .collab-deliverables ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.collab-objectives li, .collab-deliverables li {
    padding: 0.25rem 0 0.25rem 1.2rem;
    position: relative;
    font-size: 0.85rem;
    color: #555;
}

.collab-objectives li:before, .collab-deliverables li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #ff9800;
    font-weight: bold;
}

/* ========================
   Responsive Design
   ======================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        margin: -1rem -0.5rem 1.5rem -0.5rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content > p {
        font-size: 1rem;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-item p {
        font-size: 0.85rem;
    }

    h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem;
    }

    .frequent-grid {
        grid-template-columns: 1fr;
    }

    .ideas-grid {
        grid-template-columns: 1fr;
    }

    .proj-grid,
    .finished-grid,
    .planned-grid,
    .network-grid,
    .resource-grid,
    .collab-grid {
        grid-template-columns: 1fr;
    }

    #project-search {
        max-width: 100%;
    }

    .filter-buttons {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .link-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
