/* Profile image: circular with border */
.w3-alex {
    border-radius: 50%;
    border: 3px solid #ccc;
    display: block;
    margin: 0 auto;
}

/* Project card and research page figures */
.alex-image { width: 50%; }

.k1 { text-align: left; font-family: "Raleway", sans-serif; }

.myline {
    width: 100px;
    margin: 0 auto;
    border: 1px solid #ddd;
}

.w3-bold { font-weight: bold; }

/* Project card image area (used on research/detail pages) */
.image-test {
    width: 100%;
    height: 200px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

/* Horizontal project cards (home page) */
.project-card {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 12px 16px;
    gap: 16px;
    border-radius: 4px;
}

.project-thumb {
    width: 90px;
    height: 68px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 3px;
}

.project-info {
    flex: 1;
    min-width: 0;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.project-title {
    font-weight: bold;
    font-size: 15px;
    color: #008080;
}

.project-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}

.project-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

/* Responsive: collapse sidebar margin on tablets and phones */
@media screen and (max-width: 992px) {
    .w3-main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Dark mode */
body.dark-mode {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

body.dark-mode .w3-white,
body.dark-mode .w3-card {
    background-color: #2c2c2c !important;
    color: #e0e0e0 !important;
}

body.dark-mode .w3-light-grey {
    background-color: #1a1a1a !important;
}

body.dark-mode .w3-sidebar {
    background-color: #222 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .w3-bar-item,
body.dark-mode .w3-button,
body.dark-mode a {
    color: #e0e0e0 !important;
}

body.dark-mode .w3-text-teal {
    color: #4dd9d9 !important;
}

body.dark-mode .w3-hover-opacity:hover {
    opacity: 0.7;
}

body.dark-mode .project-title {
    color: #4dd9d9 !important;
}

body.dark-mode .project-desc,
body.dark-mode .project-date {
    color: #aaa !important;
}

body.dark-mode table.w3-striped tr:nth-child(even) {
    background-color: #333 !important;
}

body.dark-mode hr {
    border-color: #444;
}

/* Dark mode toggle button */
#dark-mode-toggle {
    position: fixed;
    top: 12px;
    right: 16px;
    z-index: 100;
    background: #008080;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 14px;
    font-family: "Raleway", sans-serif;
    opacity: 0.85;
}

#dark-mode-toggle:hover { opacity: 1; }
