body {
    font-family: "Inter", sans-serif;
    background-color: #F7F7F7;
    color: #1A1A1A;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-weight: 500;
    letter-spacing: -0.3px;
}

.bio {
    font-size: 20px;
    text-align: justify;
    max-width: 700px;
    margin: auto;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.navbar {
    background-color: #0F62FE;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
}

.navbar-brand, .nav-link {
    font-weight: 600;
}

.nav-link:hover, .navbar-brand:hover {
    color: #FFB100 !important;
}

.navbar-toggler {
    border: none !important;
}

.navbar-toggler-icon {
    filter: invert(100%);
}

.hero {
    min-height: 250px;
    height: 35vh;
    background: rgba(0, 0, 0, 0.4);
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
}

.gold {
    color: #FFB100;
}

th {
    text-align: center;
}

.table-layout-fixed {
    table-layout: fixed;
    width: 100%;
}

.profile-pic {
    width: 100%;
    max-width: 530px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .profile-pic {
        max-width: 300px;
    }
}

@keyframes icon-fade {
    0% { opacity: 1; } 
    50% { opacity: 0.2; } 
    100% { opacity: 1; }
}

.navbar-brand .bi-house-fill {
    display: inline-block; 
    animation: icon-fade 1.5s ease-in-out infinite;
}

.fix-indent {
    margin-bottom: 35px !important;
}

img {
    filter: grayscale(0%) brightness(110%);
    transition: filter 0.25s ease;
}

@media (hover: hover) {
    img:hover {
        filter: grayscale(20%) brightness(100%);
    }
}

.section-card {
    border-left: 4px solid #FFB100;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-body {
    padding: 1.5rem;
    text-align: justify;
}

.section-card:hover {
    transform: translateX(15px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

footer {
    background-color: #0F62FE;
    color: white;
}

.story {
    text-align: justify;
    color: #444;
    max-width: 800px;
    margin: auto;
    padding: 20px;
}

.story p {
    text-indent: 2em;
    line-height: 1.75;
    transition: color 0.2s ease;
}

.story p:hover {
    color: #000;
}

.story-title {
    font-family: "Merriweather", Serif !important;
    font-size: 2.6rem;
    font-weight: 600;
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    opacity: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.story-title::after {
    content: "";
    display: block;
    width: 60%;
    max-width: 580px;
    height: 3px;
    background: #999;
    margin: 10px auto 0;
    border-radius: 2px;
}

.story-title:hover {
    opacity: 0.5;
    transform: translateY(-3px);
}

#display-dark {
    border: 3px solid #FFB100;
}

#caption-dark {
    text-align: center;
    font-size: 20px;
    margin-top: 2px;
}

#scrollTopBtn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #FFB100;
    color: white;
    border: 2px solid #007BFF;
    display: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s, transform 0.2s, border-color 0.3s;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

#scrollTopBtn:hover {
    background-color: #e69900;
    transform: scale(1.1);
    border-color: #0056b3;
}

.invention {
    border-bottom: -100px;
}

.dark-mode {
    background-color: #1E1E1E;
    color: #EEEEEE;
}

.dark-mode .navbar,
.dark-mode footer {
    background-color: #00008B !important;
}

.dark-mode p,
.dark-mode .story {
    color: #BBB;
}

.dark-mode .story p:hover {
    color: #FFF;
}

.dark-mode .card {
    background-color: #444;
}

.dark-mode .story-title {
    color: #FFF;
}

.dark-mode th {
    background-color: #DDD;
    color: #000;
    border: #DDD;
}

.dark-mode td {
    background-color: #555;
    color: #DDD !important;
}

.dark-mode .striped {
    background-color: #333 !important;
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 85%;
    height: 0;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

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

#darkToggle {
    margin-top: 3px;
}

.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 2rem;
}

@media (max-width: 992px) {
    .hero-title { font-size: 2.5rem; }
    .story-title { font-size: 2.2rem; }
    .bio { font-size: 18px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .story-title { font-size: 1.8rem; }
    .bio { font-size: 18px; padding: 0 1rem; margin-bottom: 1.2rem; }
    .section-card:hover { transform: none; }
    .row > [class*='col-'] { margin-bottom: 1.5rem; }
    .row:first-of-type > .col-md-4:last-child { margin-bottom: 2.5rem; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.6rem; }
    .story-title { font-size: 1.5rem; }
    .bio { font-size: 17px; padding: 0 0.8rem; margin-bottom: 1rem; }
}