/* === style.css  === */

/* Basic Reset & Body Styles */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; position: relative; min-height: 100%; }

/* Define default variables on the root (html tag) */
:root {
    --default-accent-color-fallback: #b22222;
    --default-name-color: #333333;
    --current-accent-color: var(--default-name-color);

    --profile-bg-default-gradient: linear-gradient(to bottom right, #dcdcdc, #ffffff);
    --profile-current-bg: var(--profile-bg-default-gradient);

    --topic-hover-bg-default: linear-gradient(to bottom right, rgba(238, 238, 238, 0.5), rgba(238, 238, 238, 0));
    --topic-hover-bg: var(--topic-hover-bg-default);
}

body {
    font-family: 'Inter', sans-serif; line-height: 1.6; color: #4a4a4a; background-color: #fff;
    padding: 0; font-weight: 400; min-height: 100vh; overflow-x: hidden;
}

/* Profile Section */
.profile-section {
    width: 750px; /* Adjusted width */
    height: 100vh; position: fixed; top: 0; left: 0;
    padding: 60px 75px; /* Adjusted padding */
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: var(--profile-current-bg);
    transition: background 0.8s ease-in-out;
    z-index: 10;
    overflow: hidden;
}

/* Profile Image - 600px */
.profile-image-container {
    width: 450px; /* Adjusted size */
    height: 450px; /* Adjusted size */
    margin-bottom: 25px; /* Adjusted margin */
    background-color: #fff;
    padding: 8px; /* Adjusted padding */
    border-radius: 38px; /* Adjusted radius */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12); /* Adjusted shadow */
    overflow: hidden; position: relative; z-index: 1;
    flex-shrink: 0;
}
.profile-image {
    display: block; width: 100%; height: 100%; object-fit: cover;
    border-radius: 24px; /* Adjusted radius */
    transition: opacity 0.4s ease-in-out;
    /* IMPORTANT: For sharp display at 600x600px, the source image file
       (adder-oaks-profile.jpg) should be high resolution (e.g., 1200x1200px minimum,
       ideally 1500x1500px+) and saved with high JPG quality. */
}

/* Main Content Container */
.container {
    margin-left: 750px; /* Match profile section width */
    max-width: none; background-color: #ffffff; padding: 70px 60px 60px 60px;
    box-shadow: -4px 0px 15px rgba(0, 0, 0, 0.05); border-left: 1px solid #e8e0d4;
    min-height: 100vh; position: relative; z-index: 1;
}

/* Centered Heading Area */
.main-heading { text-align: center; margin-bottom: 50px; }
.main-heading h1 {
    font-family: 'Playfair Display', serif; font-size: 3rem;
    font-weight: 700; margin-bottom: 10px;
    color: var(--current-accent-color);
    letter-spacing: 0.5px; transition: color 0.6s ease-in-out;
}

/* === Global Link Styles === */
a, a:visited { color: #005f73; text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus { color: var(--current-accent-color); text-decoration: none; }
/* ======================================== */

/* Content Sections */
.content-sections { max-width: 750px; margin: 0 auto; padding-bottom: 30px; }

/* Topic Block, Header, Text */
.topic-block { margin-bottom: 15px; }
.topic-header {
    display: flex; align-items: center; padding: 16px 10px;
    cursor: pointer; border-bottom: none; position: relative; background: transparent;
    transition: background 0.2s ease-in-out; border-radius: 4px; margin-bottom: 4px;
}

/* Topic Icon - Keep Size */
.topic-icon {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    margin-right: 22px;
    object-fit: cover; flex-shrink: 0; border: 1px solid #f0f0f0;
}
.topic-header-text { flex-grow: 1; }

/* Topic Title - Static Color */
.topic-title {
    font-family: 'Playfair Display', serif; font-size: 1.4rem;
    font-weight: 500; line-height: 1.4; margin-bottom: 0; color: #333;
    transition: color 0.2s ease;
}

/* Topic Header Hover Background and Side Indicator */
.topic-header::before {
    content: ''; position: absolute; left: 0; top: 15%; bottom: 15%; width: 4px;
    opacity: 0; transition: opacity 0.2s ease, background-color 0.2s ease; border-radius: 2px;
}
.topic-header:hover { background: var(--topic-hover-bg); }
.topic-header:hover::before { opacity: 1; }

/* Specific Hover Styles for Side Indicator ONLY */
.topic-block[data-color="#005f73"] .topic-header:hover::before { background-color: #005f73; }
.topic-block[data-color="#4a0e6f"] .topic-header:hover::before { background-color: #4a0e6f; }
.topic-block[data-color="#8a3b00"] .topic-header:hover::before { background-color: #8a3b00; }
.topic-block[data-color="#0b6e4f"] .topic-header:hover::before { background-color: #0b6e4f; }
.topic-block[data-color="#2a4d69"] .topic-header:hover::before { background-color: #2a4d69; }
.topic-block[data-color="#c84630"] .topic-header:hover::before { background-color: #c84630; }
.topic-block[data-color="#555555"] .topic-header:hover::before { background-color: #555555; }
.topic-block[data-color="#778899"] .topic-header:hover::before { background-color: #778899; } /* Added for Contact */

/* Detailed Info */
.detailed-info {
    opacity: 0; max-height: 0; overflow: hidden; margin-left: 20px;
    padding: 0 20px 0 20px; border-left: 3px solid #eee;
    background-color: transparent; border-radius: 0 4px 4px 0;
    transform: translateY(-10px);
    transition:
        opacity 0.45s ease-in-out, transform 0.45s ease-in-out, max-height 0.5s ease-in-out,
        padding 0.45s ease-in-out, margin-top 0.45s ease-in-out, border-color 0.45s ease-in-out,
        background-color 0.45s ease-in-out;
}
.detailed-info.active {
    opacity: 1; max-height: 1500px; padding: 25px 20px 25px 20px;
    margin-top: 8px; background-color: #ffffff;
    border-left: 3px solid var(--current-accent-color);
    transform: translateY(0);
}
.detailed-info p { margin-bottom: 16px; font-size: 1rem; line-height: 1.75; color: #555; }
.detailed-info ul { margin-bottom: 16px; padding-left: 25px; }
.detailed-info li { margin-bottom: 8px; font-size: 1rem; color: #555;}

/* Links INSIDE Detailed Info - Static Accent Color */
.detailed-info a, .detailed-info a:visited { color: var(--current-accent-color); text-decoration: none; }
.detailed-info a:hover, .detailed-info a:focus { color: var(--current-accent-color); }

/* Responsive Design Adjustments */
@media (max-width: 1400px) { /* Adjusted breakpoint */
    .profile-section {
        width: 100%; height: auto; position: fixed; top: 0; left: 0;
        padding: 20px 30px; border-bottom: 1px solid #e8e0d4; 
        z-index: 100; overflow: visible;
    }
    .profile-image-container { /* Reduce image size */
        width: 180px; height: 180px; padding: 4px; border-radius: 24px; margin-bottom: 0; margin-right: 0;
    }
    .profile-image { border-radius: 20px; }
    
    /* Make profile section a row layout with centered image */
    .profile-section {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .container {
        width: 100%; margin-left: 0; margin-top: 220px; /* Add top margin to prevent overlap */
        padding: 30px 40px; box-shadow: none; border-left: none; min-height: auto; z-index: 1;
    }
    .main-heading { margin-bottom: 45px; }
    .main-heading h1 { font-size: 2.8rem; }
    .content-sections { max-width: 100%; padding-bottom: 15px; }
    .topic-icon { width: 60px; height: 60px; margin-right: 20px; } /* Adjust icon size */
    .topic-title { font-size: 1.3rem; }
    .detailed-info { margin-left: 15px; padding: 0 15px 0 15px; border-left-width: 2px; }
    .detailed-info.active { padding: 20px 15px 20px 15px; margin-top: 6px; border-left-width: 2px; }
    .detailed-info p, .detailed-info li { font-size: 0.95rem; }
}

@media (max-width: 768px) {
    .profile-section {
        padding: 15px 20px;
    }
    .profile-image-container {
        width: 150px; height: 150px; padding: 4px; border-radius: 22px;
    }
    .profile-image { border-radius: 18px; }
    .container { 
        margin-top: 180px; /* Adjust top margin for smaller header */
        padding: 25px 30px; 
    }
    .main-heading h1 { font-size: 2.6rem; }
    .topic-icon { width: 55px; height: 55px; margin-right: 18px; }
    .topic-title { font-size: 1.2rem; }
}

@media (max-width: 576px) {
    .profile-section { 
        padding: 10px 15px;
    }
    .profile-image-container {
        width: 120px; height: 120px; padding: 3px; border-radius: 20px;
    }
    .profile-image { border-radius: 16px; }
    .container { 
        margin-top: 140px; /* Adjust top margin for smaller header */
        padding: 20px 20px; 
    }
    .main-heading { margin-bottom: 35px; }
    .main-heading h1 { font-size: 2.2rem; }
    .topic-icon { width: 50px; height: 50px; margin-right: 15px; border-radius: 6px; }
    .topic-title { font-size: 1.1rem; line-height: 1.35; }
    .topic-block { margin-bottom: 10px; }
    .detailed-info { margin-left: 10px; padding: 0 10px 0 10px; border-left-width: 2px; }
    .detailed-info.active { padding: 15px 10px 15px 10px; margin-top: 5px; border-left-width: 2px; }
    .detailed-info p, .detailed-info li { font-size: 0.9rem; line-height: 1.6; }
}