/* CSS Variables for Theme Support */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --nav-bg: #f8f9fa;
    --nav-text: #333333;
    --section-bg: #f8f9fa;
    --card-bg: #ffffff;
    --card-shadow: rgba(0, 0, 0, 0.1);
    --link-color: #0066cc;
    --link-hover: #0052a3;
    --border-color: #B8A3D1;
    --purple-accent: #B8A3D1;
    --nav-logo-color: #ffffff;
    --nav-link-color: #ffffff;
    --about-link-color: #7A6BA3;
}

[data-theme="dark"] {
    --bg-color: #4a4a4a;
    --text-color: #e0e0e0;
    --nav-bg: #5a5a5a;
    --nav-text: #e0e0e0;
    --section-bg: #4d4d4d;
    --card-bg: #5a5a5a;
    --card-shadow: rgba(0, 0, 0, 0.3);
    --link-color: #4da6ff;
    --link-hover: #66b3ff;
    --border-color: #7A6BA3;
    --purple-accent: #7A6BA3;
    --nav-logo-color: #e0e0e0;
    --nav-link-color: #e0e0e0;
    --about-link-color: #B8A3D1;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--purple-accent);
    box-shadow: 0 2px 10px var(--card-shadow);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--purple-accent);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-size: 2rem;
    font-weight: bold;
    color: var(--nav-logo-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--nav-link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease, opacity 0.3s ease;
    position: relative;
    opacity: 0.9;
}

.nav-link:hover {
    color: var(--nav-link-color);
    opacity: 1;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--nav-link-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--nav-text);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    background-color: transparent;
}

.social-icon:hover {
    color: var(--link-color);
    background-color: var(--section-bg);
    transform: translateY(-2px);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.theme-toggle {
    background: none;
    border: 3px solid var(--bg-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    color: var(--bg-color);
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Main Content */
main {
    margin-top: 70px;
}

/* Section Styles */
.section {
    padding: 4rem 2rem;
    background-color: var(--section-bg);
    transition: background-color 0.3s ease;
}

.section:nth-child(even) {
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--purple-accent);
}

/* About Section */
.about-content {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    flex-wrap: wrap;
}

.about-photo {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.profile-container {
    position: relative;
    display: inline-block;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid var(--border-color);
    box-shadow: 0 4px 20px var(--card-shadow);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.profile-container:hover .profile-img {
    transform: scale(1.05);
}

/* Geometry Shapes */
.geometry-shape {
    position: absolute;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.profile-container:hover .geometry-shape {
    opacity: 1;
}

/* Triangle */
.shape-1 {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 16px solid var(--purple-accent);
    top: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
}

.profile-container:hover .shape-1 {
    transform: translateX(-50%) translateY(-20px);
}

/* Triangle */
.shape-2 {
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-bottom: 24px solid var(--purple-accent);
    top: 20px;
    right: -15px;
    transform: translateX(0) rotate(0deg);
}

.profile-container:hover .shape-2 {
    transform: translateX(20px) rotate(45deg);
}

/* Triangle */
.shape-3 {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid var(--purple-accent);
    bottom: 30px;
    right: -20px;
    transform: translateX(0) rotate(0deg);
}

.profile-container:hover .shape-3 {
    transform: translateX(25px) rotate(45deg);
}

/* Triangle */
.shape-4 {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 12px solid var(--purple-accent);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
}

.profile-container:hover .shape-4 {
    transform: translateX(-50%) translateY(20px);
}

/* Triangle */
.shape-5 {
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 20px solid var(--purple-accent);
    top: 40px;
    left: -20px;
    transform: translateX(0) rotate(0deg);
}

.profile-container:hover .shape-5 {
    transform: translateX(-25px) rotate(-45deg);
}

/* Triangle */
.shape-6 {
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-bottom: 16px solid var(--purple-accent);
    top: 80px;
    left: -15px;
    transform: translateX(0) rotate(0deg);
}

.profile-container:hover .shape-6 {
    transform: translateX(-20px) rotate(-45deg);
}

.about-photo .social-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.about-text a {
    color: var(--about-link-color);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}

.about-text a:hover {
    opacity: 0.8;
}

/* Projects Section */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 4rem;
    margin-top: 3rem;
}

.project-item {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--border-color);
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px var(--card-shadow);
}

.project-item-reverse {
    flex-direction: row-reverse;
}

.project-image {
    flex: 0 0 400px;
    height: 300px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--card-shadow);
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--card-bg);
    transition: opacity 0.3s ease; /* no transform scaling */
}

/* remove hover zoom */
.project-item:hover .project-image img {
    transform: none;
}

.project-content {
    flex: 1;
    padding: 1rem;
}

.project-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.project-description {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

.project-link {
    color: var(--about-link-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
    margin-top: 1.5rem;
    display: inline-block;
    margin-right: 1.5rem;
}

.project-link:hover {
    opacity: 0.8;
}

/* Hobbies Section */
.interests-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.interest-tab {
    padding: 0.75rem 2rem;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.interest-tab:hover {
    background-color: var(--purple-accent);
    color: var(--bg-color);
    border-color: var(--purple-accent);
    transform: translateY(-2px);
}

.interest-tab.active {
    background-color: var(--purple-accent);
    color: var(--bg-color);
    border-color: var(--purple-accent);
}

.interests-content {
    margin-top: 2rem;
}

.interest-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.interest-tab-content.active {
    display: block;
}

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

.interest-item {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--card-shadow);
    text-align: center;
    transition: transform 0.3s ease;
    border: 2px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.interest-item:hover {
    transform: translateY(-5px);
}

.interest-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.interest-item p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

.teaching-experience {
    text-align: left;
    margin-top: 2rem;
}

.teaching-experience h4 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-weight: 600;
}

.teaching-experience h4:first-child {
    margin-top: 1rem;
}

.teaching-experience ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.teaching-experience li {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.teaching-experience li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--purple-accent);
    font-weight: bold;
}

.hcssim-link {
    color: #E6C200;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.hcssim-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.yellow-pig-icon {
    height: 1em;
    width: auto;
    vertical-align: middle;
    display: inline-block;
    margin-left: 0.3rem;
}

/* Music Section */
.music-videos {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.music-video-item {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--card-shadow);
    border: 2px solid var(--border-color);
}

.music-video {
    flex: 0 0 500px;
    width: 500px;
    position: relative;
    padding-bottom: 35%; /* Reduced height - approximately 16:9 but shorter */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px var(--card-shadow);
}

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

.music-description {
    flex: 1;
    padding: 1rem;
}

.music-description h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.music-description p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Art Section */
.art-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.art-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--card-shadow);
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.art-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.art-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--card-bg);
    transition: opacity 0.3s ease; /* no transform scaling */
}

/* remove hover zoom */
.art-item:hover .art-image img {
    transform: none;
}

.art-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    opacity: 0;
}

.art-item:hover .art-overlay {
    background-color: rgba(255, 255, 255, 0.85);
    opacity: 1;
}

.art-description {
    padding: 2rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.art-item:hover .art-description {
    opacity: 1;
}

.art-description a {
    color: var(--about-link-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.art-description a:hover {
    opacity: 0.8;
}

.art-description h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.art-description p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
}

[data-theme="dark"] .art-overlay {
    background-color: rgba(74, 74, 74, 0);
}

[data-theme="dark"] .art-item:hover .art-overlay {
    background-color: rgba(74, 74, 74, 0.85);
}

/* Footer */
footer {
    background-color: var(--nav-bg);
    padding: 2rem;
    text-align: center;
    color: var(--text-color);
    border-top: 2px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu {
        gap: 1rem;
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .nav-right {
        order: 2;
    }
    
    .social-icons {
        gap: 0.5rem;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
    }
    
    .social-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .about-photo {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .profile-img {
        width: 300px;
        height: 300px;
    }
    
    .projects-list {
        gap: 2rem;
    }
    
    .project-item,
    .project-item-reverse {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .project-image {
        flex: 0 0 auto;
        width: 100%;
        height: 250px;
        background-color: var(--card-bg);
        border: 2px solid var(--border-color);
    }
    
    .project-content {
        padding: 1rem 0;
    }
    
    .project-content h3 {
        font-size: 1.5rem;
    }
    
    .interests-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .interest-tab {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .music-video-item {
        flex-direction: column;
        padding: 1.5rem;
    }
    
    .music-video {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
    
    .art-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-menu {
        gap: 0.5rem;
        font-size: 0.9rem;
    }
    
    .nav-logo {
        font-size: 1.4rem;
        font-weight: bold;
    }
    
    .social-icons {
        gap: 0.4rem;
    }
    
    .social-icon {
        width: 30px;
        height: 30px;
    }
    
    .social-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .profile-img {
        width: 250px;
        height: 250px;
    }
    
    .interests-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .interest-tab {
        width: 100%;
        max-width: 200px;
    }
    
    .music-video-item {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .music-description h3 {
        font-size: 1.3rem;
    }
    
    .music-description p {
        font-size: 1rem;
    }
    
    .art-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .art-description {
        padding: 1.5rem;
    }
    
    .art-description h3 {
        font-size: 1.2rem;
    }
    
    .art-description p {
        font-size: 0.9rem;
    }
    
    .project-image {
        height: 200px;
    }
}

