body {
    font-family: 'Inter', sans-serif;
    background-color: #F4F4F4;
    color: #3A3A3A;
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    height: 320px;
    max-height: 400px;
}
/* Adjusted timeline styles for better responsiveness on small screens */
.timeline-item {
    position: relative;
    padding-left: 3rem; /* Default spacing for mobile */
    padding-bottom: 2.5rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 1rem; /* Adjust line position for mobile */
    top: 2rem;
    bottom: 0;
    width: 2px;
    background-color: #4ECDC4;
    transform: translateX(-50%);
}
.timeline-item:last-child::before {
    display: none;
}
.timeline-icon {
    position: absolute;
    left: 1rem; /* Adjust icon position for mobile */
    top: 1.25rem;
    transform: translateX(-50%);
    z-index: 10;
}
/* Increase padding/positioning for medium screens and up (Tablet/Desktop) */
@media (min-width: 768px) {
    .timeline-item {
        padding-left: 4rem;
    }
    .timeline-item::before {
        left: 2rem;
    }
    .timeline-icon {
        left: 2rem;
    }
}

.card {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    padding: 1.5rem;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
}
.gradient-text {
    background: linear-gradient(to right, #FF6B6B, #45B7D1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Standard topic links (in lists) */
.topic-link {
    text-decoration: underline;
    cursor: pointer;
    color: #45B7D1; /* Energetic blue for links */
    transition: color 0.1s;
}
.topic-link:hover {
    color: #FF6B6B; /* Vibrate on hover */
}
/* New class for links inside the hierarchy blocks, just ensuring cursor change */
.topic-link-hierarchy {
    cursor: pointer;
    display: inline-block; /* Essential for padding/hover effect */
    transition: opacity 0.1s;
}
.topic-link-hierarchy:hover {
    opacity: 0.85;
}


/* Styles for the Hierarchical Diagram */
.hierarchy-level {
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
    margin: 0.5rem 0;
    position: relative;
}
.hierarchy-arrow-down {
    content: '▼';
    display: block;
    margin: 0.5rem auto;
    color: #FED766;
    font-size: 1.5rem;
}
/* Grid for the Past Projects Collection */
.project-collection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Default 2 columns on mobile */
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .project-collection-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 columns on tablet/desktop */
    }
}
.project-field {
    background-color: #F8F8F8;
    border: 1px solid #E0E0E0;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    cursor: pointer; /* Added for clickability */
}
.project-field:hover {
    background-color: #EFEFEF;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}
.project-field-icon {
    font-size: 1.25rem;
    margin-right: 0.5rem;
    color: #45B7D1; /* Energetic blue for icons */
}

/* Gallery Page Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
}

.portfolio-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.portfolio-info {
    padding: 1rem;
}

.portfolio-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #3A3A3A;
}

.portfolio-info p {
    font-size: 0.875rem;
    color: #6B7280;
}

/* === Portfolio Tree === */

#portfolio-structure-chart {
    width: 100%;
    height: 400px;
    margin: 0 auto;
}

.node {
    cursor: pointer;
}

.node circle {
    fill: #fff;
    /* Changed from steelblue to your theme color */
    stroke: #4ECDC4;
    stroke-width: 3px;
}

.node text {
    font: 14px sans-serif;
    paint-order: stroke;
    stroke: white;
    stroke-width: 3px;
}

.link {
    fill: none;
    /* Changed from #ccc to your theme color */
    stroke: #4ECDC4;
    stroke-width: 2px;
    opacity: 0.6; /* Soften the links slightly */
}

/* Tooltip for the new D3.js chart */
#tooltip {
    position: absolute;
    text-align: left;
    width: 250px;
    padding: 12px;
    font: 12px sans-serif;
    background: #333;
    color: white;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
}

#tooltip h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    /* Changed from lightsteelblue to your theme color */
    color: #4ECDC4;
}

/* === Gallery button === */

.gallery-button {
    display: inline-block;
    background-color: #FF6B6B; /* Energetic red from your theme */
    color: white;
    padding: 0.75rem 1.5rem; /* 12px 24px */
    border-radius: 0.5rem; /* 8px */
    font-weight: 600; /* semibold */
    text-decoration: none;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.gallery-button:hover {
    background-color: #e55a5a; /* A slightly darker shade for the hover effect */
    transform: translateY(-2px);
}