:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --accent-color: #0077b5;
    --secondary-bg: #f4f4f4;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
}

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

/* Enhanced Header with Animations */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--bg-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: padding 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

header.scrolled {
    padding: 0.7rem 2rem;
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    flex: 1;
    justify-content: space-between;
    align-items: center;
}

.logo {
    margin-right: auto;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    max-height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}

nav ul {
    list-style-type: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.3rem 0;
}

/* Underline animation for nav links */
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent-color);
}

nav a:hover::after {
    width: 100%;
}

/* Enhanced Dark Mode Toggle */
#dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    margin-left: auto;
    transition: transform 0.3s ease, color 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#dark-mode-toggle:hover {
    color: var(--accent-color);
    transform: rotate(15deg);
}

#dark-mode-toggle i {
    transition: transform 0.5s ease;
}

body.dark-mode #dark-mode-toggle i {
    transform: rotate(360deg);
}

/* Intro Section with Animated Particles */
#intro {
    text-align: center;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

/* Particle background effect */
.particle-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.particle {
    position: absolute;
    background-color: rgba(0, 119, 181, 0.1);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(var(--x1), var(--y1)); }
    50% { transform: translate(var(--x2), var(--y2)); }
    75% { transform: translate(var(--x3), var(--y3)); }
}

.headshot {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 2rem auto;
    display: block;
    border: 4px solid var(--bg-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    animation: fadeInDown 1s ease-out;
}

.headshot:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: fadeInUp 1s ease-out;
    position: relative;
    display: inline-block;
}

/* Subtle underline for main heading */
h1::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    animation: expandWidth 1.5s ease-out forwards;
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 60px; }
}

h2 {
    font-size: 0.8rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 1rem;
    animation: fadeInUp 1.2s ease-out;
}

#intro p {
    animation: fadeInUp 1.4s ease-out;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* Typing effect for intro text */
.typed-cursor {
    opacity: 1;
    animation: typedjsBlink 0.7s infinite;
}

@keyframes typedjsBlink {
    50% { opacity: 0.0; }
}

/* Enhanced Social Links */
.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 1.6s ease-out;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-bg);
    color: var(--text-color);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-5px);
    background-color: var(--accent-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.social-icon i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-icon:hover i {
    transform: scale(1.1);
}

/* Enhanced Section Styling */
section {
    padding: 4rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

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

h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

/* Enhanced Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.project-item {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Match v1 styling for main index page project items only */
#intro ~ #projects .project-item {
    background-color: var(--bg-color);
    border: 1px solid var(--accent-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

#intro ~ #projects .project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Remove grey background from projects section on main index page */
#intro ~ #projects {
    background-color: transparent;
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: var(--accent-color);
    transition: height 0.3s ease;
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.project-item:hover::before {
    height: 100%;
}

.project-item h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 10px;
}

.project-item h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.project-item:hover h4::after {
    width: 80px;
}

.project-item p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    color: var(--text-color);
    transition: color 0.5s ease;
}

.project-item .button {
    align-self: flex-start;
    margin-top: auto;
}

/* Project filters - DISABLED per user request */
.project-filters {
    display: none !important;
}

/* Enhanced Button Styling */
.button {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    font-weight: 500;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: left 0.3s ease;
    z-index: -1;
}

.button:hover {
    background-color: #005582;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.button:hover::before {
    left: 0;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

.button-container .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button-container .button:hover {
    background-color: #005582;
    transform: translateY(-3px);
}

/* Enhanced Writing Section */
.writing-item {
    background-color: var(--secondary-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.5s ease;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
    overflow: hidden;
    position: relative;
}

.writing-item::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.writing-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.writing-item:hover::before {
    opacity: 1;
}

.writing-item h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

/* Enhanced Footer */
footer {
    background-color: var(--secondary-bg);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    position: relative;
    transition: background-color 0.5s ease;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

footer p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    transition: color 0.5s ease;
}

#easter-egg {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.6s ease, color 0.3s ease;
}

#easter-egg:hover {
    color: var(--accent-color);
    transform: rotate(360deg);
}

/* Back to top button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-md);
    border: none;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    transform: translateY(-5px);
    background-color: #005582;
}

/* Enhanced Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease, background-color 0.5s ease;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

#contact-form {
    display: flex;
    flex-direction: column;
}

#contact-form label {
    margin-top: 10px;
}

#contact-form input,
#contact-form textarea {
    margin-top: 5px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0,119,181,0.1);
}

#contact-form textarea {
    height: 100px;
    resize: vertical;
}

#contact-form button {
    margin-top: 20px;
    padding: 10px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#contact-form button:hover {
    background-color: #005582;
    transform: translateY(-3px);
}

/* Enhanced Mobile Menu */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

#mobile-menu-toggle:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    nav {
        flex-wrap: wrap;
        position: relative;  
    }

    .logo {
        order: 1;
    }

    #mobile-menu-toggle {
        display: block;
        order: 2;
    }

    #dark-mode-toggle {
        order: 3;
    }

    #nav-menu {
        display: none;
        width: 100%;
        order: 4;
        flex-direction: column;
        padding: 1rem 0;
        position: absolute; 
        top: 100%;  
        left: 0;  
        background-color: var(--bg-color);  
        box-shadow: var(--shadow-md); 
        z-index: 10000;
    }

    #nav-menu.show {
        display: flex;
    }

    #nav-menu li {
        margin: 0;
        padding: 0.5rem 1rem; 
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    #nav-menu li:last-child {
        border-bottom: none;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .headshot {
        width: 150px;
        height: 150px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-color);
    min-width: 160px;
    box-shadow: var(--shadow-md);
    z-index: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.3s forwards;
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.dropdown-content li {
    float: none;
    color: black;
    padding: 0;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content li a {
    display: block;
    padding: 12px 16px;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease;
}

.dropdown-content li a:hover {
    background-color: var(--secondary-bg);
    color: var(--accent-color);
    padding-left: 20px;
}

.dropdown-content li a::after {
    display: none;
}

@media screen and (max-width: 768px) {
    .dropdown-content {
        position: static;
        transform: none;
        left: 0;
        right: 0;
        display: none;
        background-color: var(--bg-color);
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }
}

/* Dark Mode Enhancements */
body.dark-mode {
    --bg-color: #121212;
    --text-color: #f0f0f0;
    --secondary-bg: #1e1e1e;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.25);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.3);
}

body.dark-mode .dropdown-content {
    background-color: var(--bg-color);
    box-shadow: 0px 8px 16px 0px rgba(255,255,255,0.1);
}

body.dark-mode .dropdown-content li {
    color: var(--text-color);
}

body.dark-mode .dropdown-content li:hover {
    background-color: var(--secondary-bg);
}

body.dark-mode #nav-menu li {
    border-color: rgba(255,255,255,0.05);
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lazy Loading Images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Preserve all your existing special link styles */
.penn-state-link {
    text-decoration: none;
    color: #0312a0; 
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.penn-state-link:hover {
    color: #0312a0;
    border-bottom: 2px solid #0312a0;
}

/* Dark mode styles for Penn State links */
body.dark-mode .penn-state-link {
    color: #6b9cff;
}

body.dark-mode .penn-state-link:hover {
    color: #8bb3ff;
    border-bottom: 2px solid #8bb3ff;
}

.middlesex-link {
    text-decoration: none;
    color: #006400; 
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.middlesex-link:hover {
    color: #004d00; 
    border-bottom: 2px solid #004d00;
}

.mit-link {
    text-decoration: none;
    color: #8B0000; 
    font-weight: bold;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.mit-link:hover {
    color: #600000; 
    border-bottom: 2px solid #600000;
}

.linkedin-link {
    color: #0A66C2; 
    text-decoration: none; 
    font-weight: bold; 
    transition: color 0.3s ease; 
}

.linkedin-link:hover {
    color: #004182; 
    text-decoration: underline; 
}

/* Enhanced About Page Carousel */
#about .image-carousel {
    position: relative;
    width: 250px; 
    max-width: 100%;
    margin: 0px 0; 
    float: left; 
    margin-right: 20px; 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

#about .image-carousel:hover {
    box-shadow: var(--shadow-lg);
}
  
#about .image-carousel .headshot {
    display: none;
    width: 100%;
    height: auto;
    border-radius: 20%; 
    margin: 0;
    border: none;
    box-shadow: none;
    transition: transform 0.5s ease;
}

#about .image-carousel .headshot.active {
    display: block;
}

#about .image-carousel .headshot:hover {
    transform: scale(1.03);
}
  
#about .image-carousel .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px; 
    transition: background 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 2;
}

#about .image-carousel:hover .arrow {
    opacity: 0.7;
}
  
#about .image-carousel .arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
}

#about .image-carousel .arrow:active {
    transform: translateY(-50%) scale(0.95);
}
  
#about .image-carousel .left-arrow {
    left: 5px;
}
  
#about .image-carousel .right-arrow {
    right: 5px;
}

/* Add indicator dots for carousel */
#about .image-carousel .indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

#about .image-carousel .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

#about .image-carousel .indicator.active {
    background-color: white;
    transform: scale(1.3);
}
  
#about::after {
    content: "";
    display: table;
    clear: both;
}
  
#about p {
    overflow: hidden;
}
  
@media (prefers-color-scheme: dark) {
    #about .image-carousel .arrow {
        background: rgba(255, 255, 255, 0.5);
        color: black;
    }
    
    #about .image-carousel .arrow:hover {
        background: rgba(255, 255, 255, 0.7);
    }
}

/* Enhanced Skills Section */
#skills {
    padding: 20px;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease, background-color 0.5s ease;
}

#skills:hover {
    box-shadow: var(--shadow-md);
}

#skills h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    transition: color 0.5s ease;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.skills-list {
    width: calc(25% - 20px);
    margin-bottom: 20px;
    padding-left: 20px;
}

.skills-list li {
    margin-bottom: 10px;
    color: #555;
    transition: color 0.5s ease;
}

.dark-mode #skills {
    background-color: #2a2a2a;
}

.dark-mode #skills h3 {
    color: #f0f0f0;
}

.dark-mode .skills-list li {
    color: #c0c0c0;
}

@media (max-width: 768px) {
    .skills-list {
        width: calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .skills-list {
        width: 100%;
    }
}

/* Writing Page Styles */
#writing {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.latest-post {
    background-color: var(--secondary-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.latest-post h2 {
    margin-top: 0;
}

body.dark-mode .latest-post {
    background-color: var(--secondary-bg);
}

/* Article and Writing Piece Styles */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 80px; 
}

.writing-piece {
    background-color: var(--secondary-bg);
    color: var(--text-color);
    padding: 40px;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.writing-piece header {
    background-color: transparent;
    padding: 0;
    margin-bottom: 30px;
    border: none;
    position: relative;
    z-index: 1;
}

.writing-piece h1 {
    color: var(--text-color);
    font-size: 2.5em;
    margin: 0 0 10px 0;
}

.writing-piece .meta {
    color: var(--text-color);
    font-size: 0.9em;
    margin: 0;
    opacity: 0.7;
}

.writing-piece .content p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

.writing-piece .featured-image {
    margin-bottom: 30px;
}

.writing-piece .featured-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.featured-image figcaption {
    text-align: center;
    font-style: italic;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 10px;
    font-size: 0.9em;
}

.writing-piece *,
.writing-piece header,
.writing-piece header * {
    box-sizing: border-box;
    outline: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .writing-piece {
        padding: 20px;
    }

    .writing-piece h1 {
        font-size: 1.8em;
    }

    .writing-piece .meta {
        font-size: 0.8em;
    }
}

/* Enhanced Writing Page Styles */
.writing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.writing-column h2 {
    margin-top: 0;
}

.writing-column ul {
    list-style-type: none;
    padding: 0;
}

.writing-column li {
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.writing-column li:hover {
    transform: translateX(5px);
}

.writing-column li a,
.writing-grid a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.writing-column li a:hover,
.writing-grid a:hover {
    color: #005a8a;
}

.reading-list {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

.reading-list:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.reading-list ul {
    list-style-type: none;
    padding: 0;
}

.reading-list li {
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.reading-list li:hover {
    transform: translateX(5px);
}

.book-description {
    display: block;
    font-size: 0.9em;
    color: #666;
    margin-top: 0.25rem;
    transition: color 0.5s ease;
}

body.dark-mode .reading-list {
    background-color: #2a2a2a;
}

body.dark-mode .book-description {
    color: #b0b0b0;
}

@media (max-width: 768px) {
    .writing-grid {
        grid-template-columns: 1fr;
    }
}

/* Form validation styles */
#contact-form input.valid,
#contact-form textarea.valid {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

#contact-form input.invalid,
#contact-form textarea.invalid {
    border-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header, footer, button, .social-links, #back-to-top {
        display: none !important;
    }
    
    .container {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    main {
        width: 100%;
    }
    
    section {
        page-break-inside: avoid;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Preserve all other styles */
.essay-list, .coming-soon, .article-content, .writing-piece {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

.essay-list:hover, .coming-soon:hover, .writing-piece:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Coming Soon Image Styling */
.coming-soon {
    text-align: center;
    padding: 50px 20px;
    margin: 20px 0;
    background-color: var(--secondary-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.coming-soon img,
.coming-soon-image {
    max-width: 100%;
    width: 50%;
    max-width: 300px;
    height: auto;
    margin: 0 auto 20px auto;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}

.coming-soon h3 {
    color: var(--text-color);
    font-size: 24px;
    margin-bottom: 15px;
}

.coming-soon p {
    color: var(--text-color);
    opacity: 0.8;
    font-size: 16px;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .coming-soon-image {
        max-width: 350px;
    }
}

@media (max-width: 768px) {
    .coming-soon {
        padding: 30px 15px;
    }
    
    .coming-soon img,
    .coming-soon-image {
        width: 70%;
        max-width: 250px;
    }
}
/* Progress bar styles */
#progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 1010;
}

#progress-bar {
    height: 100%;
    width: 0;
    background-color: var(--accent-color);
    transition: width 0.2s ease;
}

body.dark-mode #progress-bar {
    background-color: var(--accent-color);
}

/* Hero section styles */
#hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    overflow: hidden;
}

.parallax-section {
    position: relative;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(120deg, rgba(240, 240, 240, 0.1) 0%, rgba(240, 240, 240, 0.05) 100%);
    transform: translateZ(-1px) scale(1.5);
    z-index: -1;
}

body.dark-mode .parallax-section::before {
    background-image: linear-gradient(120deg, rgba(30, 30, 30, 0.1) 0%, rgba(30, 30, 30, 0.05) 100%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero-text {
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.5s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.hero-text .tagline {
    font-size: 1.8rem;
    font-weight: 300;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

/* Enhanced section styles */
.content-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.alt-bg {
    background-color: var(--secondary-bg);
}

.section-divider {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.content-section:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.content-section:hover .section-title::after {
    width: 120px;
}

.section-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Highlight quote styles */
.highlight-quote {
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background-color: rgba(var(--accent-color-rgb), 0.05);
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    position: relative;
    border-radius: 0 8px 8px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-quote:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.dark-mode .highlight-quote {
    background-color: rgba(var(--accent-color-rgb), 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.highlight-quote p {
    margin: 0;
    position: relative;
}

.highlight-quote p::before,
.highlight-quote p::after {
    content: '"';
    color: rgba(var(--accent-color-rgb), 0.3);
    font-size: 2rem;
    line-height: 0;
    position: absolute;
}

.highlight-quote p::before {
    left: -15px;
    top: 15px;
}

.highlight-quote p::after {
    right: -15px;
    bottom: 0;
}

/* Signature style */
.signature {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.8rem;
    text-align: right;
    margin-top: 2rem;
    color: var(--accent-color);
}

/* Experience grid layout */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.experience-item {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.experience-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.experience-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .experience-item {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

body.dark-mode .experience-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.experience-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

/* Education grid layout */
.education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.education-item, .certificate-item {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.education-item.visible, .certificate-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.education-item:hover, .certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .education-item, 
body.dark-mode .certificate-item {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

body.dark-mode .education-item:hover, 
body.dark-mode .certificate-item:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.education-logo, .certificate-logo {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-right: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.education-details, .certificate-details {
    flex: 1;
}

.education-details h3, .certificate-details h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.edu-year {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.subsection-title {
    font-size: 2rem;
    margin: 3rem 0 2rem;
    text-align: center;
}

.certificates-container {
    margin-top: 4rem;
}

/* Skills category styles */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skills-category {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.skills-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .skills-category {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

body.dark-mode .skills-category:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.skills-category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(var(--accent-color-rgb), 0.2);
}

.skills-category-title i {
    margin-right: 0.5rem;
}

/* Modern Skills Carousel */
.skills-carousel-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 60px;
}

.skills-carousel {
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.skills-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
    width: 400%; /* 4 cards × 100% each */
}

.skill-card {
    flex: 0 0 25%; /* Each card takes 25% of track width (100% ÷ 4 cards) */
    width: 25%;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary-bg) 100%);
    padding: 2.5rem;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0.7;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
    box-sizing: border-box;
}

.skill-card.active {
    opacity: 1;
    transform: scale(1);
}

.skill-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-right: 1rem;
    padding: 0.8rem;
    background: rgba(var(--accent-color-rgb), 0.1);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
}

.skill-card-header h3 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--text-color);
    font-weight: 600;
}

.skill-card-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.8rem;
}

.skill-card-content li {
    padding: 0.8rem 1rem;
    background: rgba(var(--accent-color-rgb), 0.05);
    border-radius: 8px;
    color: var(--text-color);
    font-weight: 500;
    transition: transform 0.3s ease, background-color 0.3s ease;
    position: relative;
    padding-left: 2.5rem;
}

.skill-card-content li::before {
    content: '→';
    position: absolute;
    left: 1rem;
    color: var(--accent-color);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.skill-card-content li:hover {
    transform: translateX(5px);
    background: rgba(var(--accent-color-rgb), 0.1);
}

.skill-card-content li:hover::before {
    transform: translateX(3px);
}

.skills-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.skills-nav-btn:hover {
    background-color: #005582;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.skills-prev {
    left: 0;
}

.skills-next {
    right: 0;
}

.skills-indicators {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.skill-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    background: transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.skill-indicator.active {
    background-color: var(--accent-color);
    transform: scale(1.2);
}

.skill-indicator:hover {
    background-color: rgba(var(--accent-color-rgb), 0.5);
    transform: scale(1.1);
}

/* Dark mode adjustments */
body.dark-mode .skill-card {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--secondary-bg) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .skill-card-content li {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .skill-card-content li:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .writing-column li a,
body.dark-mode .writing-grid a {
    color: #6b9cff;
}

body.dark-mode .writing-column li a:hover,
body.dark-mode .writing-grid a:hover {
    color: #8bb3ff;
}

/* Announcement Banner */
.announcement-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 50%, #f59e0b 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.banner-content {
    display: flex;
    align-items: center;
}

.banner-text strong {
    display: block;
    font-size: 1.2rem;
    color: #92400e;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.banner-text p {
    margin: 0;
    color: #a16207;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Dark Mode Banner */
body.dark-mode .announcement-banner {
    background: linear-gradient(135deg, #374151 0%, #4b5563 50%, #6b7280 100%);
    border-color: #6b7280;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.2);
}

body.dark-mode .banner-text strong {
    color: #f3f4f6;
}

body.dark-mode .banner-text p {
    color: #d1d5db;
}

/* Mobile Banner */
@media (max-width: 768px) {
    .banner-text strong {
        font-size: 1.1rem;
    }
    
    .banner-text p {
        font-size: 0.9rem;
    }
}

/* Enhanced Search Functionality */
.search-container {
    margin-bottom: 2rem;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 119, 181, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-box input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-color);
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.5rem;
}

.search-result {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result:hover {
    background: #f8fafc;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.search-result h3 a {
    color: var(--accent-color);
    text-decoration: none;
}

.search-result p {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-result .meta {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.6;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-result .category-badge {
    background: var(--accent-color);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Dark mode search styles */
body.dark-mode .search-box input {
    border-color: #374151;
    background: var(--secondary-bg);
}

body.dark-mode .search-box input:focus {
    border-color: #6b9cff;
    box-shadow: 0 0 0 3px rgba(107, 156, 255, 0.1), 0 4px 12px rgba(255, 255, 255, 0.05);
}

body.dark-mode #search-results {
    background: var(--secondary-bg);
    border-color: #374151;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .search-result {
    border-bottom-color: #374151;
}

body.dark-mode .search-result:hover {
    background: #1f2937;
}

/* Enhanced Reading Experience */
.writing-piece,
.article-content {
    line-height: 1.7;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.writing-piece h1,
.article-content h1 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.writing-piece h2,
.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--accent-color);
    line-height: 1.3;
}

.writing-piece p,
.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
    word-spacing: 0.1em;
}

.writing-piece .meta,
.article-content .meta {
    font-style: italic;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--secondary-bg);
    padding-bottom: 1rem;
}

/* Enhanced Visual Elements */
.latest-post {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, rgba(0, 119, 181, 0.05) 100%);
    border: 1px solid rgba(0, 119, 181, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.latest-post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.15);
}

.writing-column {
    background: var(--secondary-bg);
    padding: 1.5rem;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 119, 181, 0.1);
}

.writing-column:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.1);
}

.writing-column h2 {
    background: linear-gradient(135deg, var(--accent-color), #005a8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid var(--accent-color);
    margin-bottom: 1rem;
}

/* Enhanced Readability */
.reading-list {
    background: linear-gradient(135deg, #f9f9f9 0%, rgba(0, 119, 181, 0.02) 100%);
    border: 1px solid rgba(0, 119, 181, 0.1);
}

.reading-list li {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reading-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.1);
}

/* Enhanced Focus States for Better UX */
.writing-column li a:focus,
.latest-post .button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Improved Typography Scale */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 0.8rem; }
    h3 { font-size: 1.25rem; }
    
    .writing-piece,
    .article-content {
        font-size: 1rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 0.75rem; }
}

/* Dark Mode Reading Enhancements */
body.dark-mode .latest-post {
    background: linear-gradient(135deg, var(--secondary-bg) 0%, rgba(107, 156, 255, 0.05) 100%);
    border-color: rgba(107, 156, 255, 0.2);
}

body.dark-mode .writing-column {
    background: var(--secondary-bg);
    border-color: rgba(107, 156, 255, 0.2);
}

body.dark-mode .reading-list {
    background: linear-gradient(135deg, #1a1a1a 0%, rgba(107, 156, 255, 0.02) 100%);
    border-color: rgba(107, 156, 255, 0.2);
}

/* Content Preview Cards */
.content-preview {
    padding: 2rem 0;
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.preview-card {
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 119, 181, 0.1);
    position: relative;
    overflow: hidden;
}

.preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #005a8a);
}

.preview-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 119, 181, 0.15);
}

.preview-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.preview-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.preview-card p {
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.preview-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-status:contains("In Progress") {
    background: #fef3c7;
    color: #d97706;
}

.preview-card .preview-status {
    background: #e0f2fe;
    color: #0277bd;
}

.preview-footer {
    background: rgba(0, 119, 181, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
}

.preview-footer p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

.preview-footer strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* Dark Mode Content Previews */
body.dark-mode .preview-card {
    background: var(--secondary-bg);
    border-color: rgba(107, 156, 255, 0.2);
}

body.dark-mode .preview-footer {
    background: rgba(107, 156, 255, 0.05);
    border-left-color: #6b9cff;
}

body.dark-mode .preview-card .preview-status {
    background: rgba(107, 156, 255, 0.15);
    color: #8bb3ff;
}

/* Mobile Optimization for Previews */
@media (max-width: 768px) {
    .preview-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .preview-card {
        padding: 1.5rem;
    }
    
    .preview-icon {
        font-size: 2.5rem;
    }
    
    .preview-footer {
        padding: 1rem;
    }
}

/* Performance Optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Enhanced Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus management */
:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .writing-column,
    .latest-post,
    .preview-card {
        border: 2px solid var(--text-color);
    }
    
    .search-box input {
        border: 2px solid var(--text-color);
    }
}

/* Print styles */
@media print {
    .search-container,
    .carousel-nav,
    #nav-menu,
    #dark-mode-toggle,
    #mobile-menu-toggle,
    .preview-card,
    footer {
        display: none !important;
    }
    
    .writing-piece,
    .article-content {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* Finance Focus Section */
.finance-highlights {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--secondary-bg);
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 119, 181, 0.15);
}

.highlight-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-color), #005a8a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.highlight-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.highlight-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
    opacity: 0.9;
}

/* Dark mode support */
body.dark-mode .highlight-item {
    background: var(--secondary-bg);
    border-left-color: #6b9cff;
}

body.dark-mode .highlight-icon {
    background: linear-gradient(135deg, #6b9cff, #4f8fff);
}

/* Mobile responsiveness for finance section */
@media (max-width: 768px) {
    .highlight-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .highlight-icon {
        align-self: center;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .skills-carousel-container {
        padding: 0 30px;
        max-width: 100%;
    }
    
    .skill-card {
        padding: 2rem 1.8rem;
        min-height: 320px;
    }
    
    .skill-card-header h3 {
        font-size: 1.3rem;
        line-height: 1.3;
        word-wrap: break-word;
        hyphens: none;
    }
    
    .skills-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .skill-card-content li {
        padding: 0.7rem 0.8rem;
        padding-left: 2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .skills-carousel-container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .skill-card {
        padding: 1.5rem 1.4rem;
        min-height: 320px;
    }
    
    .skill-icon {
        font-size: 1.4rem;
        padding: 0.6rem;
        margin-right: 0.8rem;
    }
    
    .skill-card-header h3 {
        font-size: 1.15rem;
        line-height: 1.4;
        word-wrap: break-word;
        hyphens: none;
        text-align: left;
    }
}

/* Enhanced image carousel */
.image-carousel {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.image-carousel:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.image-carousel .headshot {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    transition: transform 0.5s ease;
}

.image-carousel .headshot.active {
    display: block;
}

.image-carousel .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.image-carousel:hover .arrow {
    opacity: 0.7;
}

.image-carousel .arrow:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.image-carousel .left-arrow {
    left: 10px;
}

.image-carousel .right-arrow {
    right: 10px;
}

.image-carousel .indicators {
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.image-carousel .indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.image-carousel .indicator.active {
    background-color: white;
    transform: scale(1.2);
}

.image-carousel .indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Enhanced animation effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Back to top button styles */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 999;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background-color: #005582;
    transform: translateY(-5px);
}

/* Enhanced link styles */
.linkedin-link, .penn-state-link, .middlesex-link, .mit-link {
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.linkedin-link i, .penn-state-link i, .middlesex-link i, .mit-link i {
    font-size: 0.8rem;
    margin-left: 5px;
    opacity: 0;
    transform: translateX(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.linkedin-link:hover i, .penn-state-link:hover i, .middlesex-link:hover i, .mit-link:hover i {
    opacity: 1;
    transform: translateX(0);
}

/* CSS Variables for RGB values of accent color */
:root {
    --accent-color-rgb: 0, 119, 181; /* RGB values for --accent-color (#0077b5) */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text .tagline {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .content-section {
        padding: 4rem 0;
    }
    
    .highlight-quote {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .experience-grid, .education-grid, .skills-container {
        grid-template-columns: 1fr;
    }
    
    .education-item, .certificate-item {
        flex-direction: column;
        text-align: center;
    }
    
    .education-logo, .certificate-logo {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .image-carousel {
        width: 200px;
        height: 200px;
    }
}