/* Modern Portfolio Styles */
:root {
    /* Light theme variables */
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --text-color: #333;
    --background-color: #f5f6fa;
    --accent-color: #3498db;
    --section-bg: white;
    --border-color: #ddd;
}

[data-theme="dark"] {
    /* Dark theme variables */
    --primary-color: #1a1a1a;
    --secondary-color: #e74c3c;
    --text-color: #f5f6fa;
    --background-color: #121212;
    --accent-color: #3498db;
    --section-bg: #1e1e1e;
    --border-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 2px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 0;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%) scale(1.1);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

nav {
    background-color: var(--secondary-color);
    padding: 0.5rem;
    position: relative;
}

.nav-container {
    max-width: 1162px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

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

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    padding: 0.5rem;
    display: block;
}

nav a:hover {
    color: #1a5276;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    position: relative;
}

.content-wrapper {
    position: relative;
}

.table-of-contents {
    position: fixed;
    left: calc((100% - 1200px) / 2);
    top: 17rem;
    width: 250px;
    height: fit-content;
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transform: translateX(-300px);
    transition: all 0.3s ease;
    z-index: 100;
    transform-origin: left;
    border: 1px solid var(--border-color);
    outline: 2px solid var(--section-bg);
    outline-offset: 2px;
}

.table-of-contents:hover {
    transform: translateX(-300px);
}

.table-of-contents::before {
    content: '☰';
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.table-of-contents h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    padding-left: 1.5rem;
    position: relative;
}

.table-of-contents h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.2em;
    background: var(--secondary-color);
    border-radius: 3px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.table-of-contents ul::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
    border-radius: 2px;
}

.table-of-contents li {
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.dot-indicator {
    position: absolute;
    left: 0.35rem;
    width: 8px;
    height: 8px;
    background: var(--border-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    border-radius: 4px;
    white-space: nowrap;
    position: relative;
}

.table-of-contents a:hover {
    color: var(--secondary-color);
    background: rgba(231, 76, 60, 0.1);
}

.table-of-contents li:hover .dot-indicator {
    background: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
    transform: scale(1.2);
}

.table-of-contents li.active {
    transform: translateX(5px);
}

.table-of-contents li.active .dot-indicator {
    background: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
    transform: scale(1.2);
}

.table-of-contents a.active {
    color: var(--secondary-color);
    background: rgba(231, 76, 60, 0.1);
    font-weight: 500;
}

.table-of-contents a.active::before {
    display: none;
}

.table-of-contents a.active::after {
    content: '';
    position: absolute;
    left: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 100%;
    background: var(--secondary-color);
    border-radius: 2px;
    z-index: -1;
}

.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 25vh;
}

section {
    background: var(--section-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

/* Typography */
h1, h2, h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

[data-theme="light"] h1 {
    color: #f5f6fa;
}

p {
    margin-bottom: 1rem;
}

/* Typography spacing fixes */
ul + h3 {
    margin-top: 1rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    text-align: left;
}

th {
    background-color: var(--primary-color);
    color: white;
}

/* Forms */
form {
    display: grid;
    gap: 1rem;
}

input, textarea, select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--section-bg);
    color: var(--text-color);
}

button {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

/* Media Elements */
img, video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Date Display */
#current-date {
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 1rem;
    text-align: right;
    font-size: 0.9rem;
}

/* Resume Grid Layout */
.resume-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.resume-grid section {
    margin-bottom: 0;
}

/* Skills and Education Styling */
.resume-grid section ul,
.styled-list {
    list-style: none;
    padding: 0;
}

.resume-grid section ul li,
.styled-list li {
    position: relative;
    padding-left: 1.5rem;
    padding-right: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resume-grid section ul li:hover,
.styled-list li:hover {
    transform: translateX(5px);
    color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.2), 0 0 0 1px rgba(231, 76, 60, 0.1);
}

.resume-grid section ul li.active,
.styled-list li.active {
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3), 0 0 0 2px rgba(231, 76, 60, 0.2);
    background: var(--section-bg);
    border-radius: 4px;
    padding: 0.75rem 2.5rem 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.resume-grid section ul li::before,
.styled-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.resume-grid section article {
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.resume-grid section article::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    opacity: 0.7;
}

.resume-grid section article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

.resume-grid section article h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.resume-grid section article p {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.resume-grid section article p:first-of-type {
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Skills Accordion */
.skill-item {
    cursor: pointer;
    position: relative;
}

.skill-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.skill-item.active .skill-details {
    max-height: 200px;
    transition: max-height 0.5s ease-in;
}

.skill-item::after {
    content: "▼";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.skill-item.active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Contact Information Styling */
.resume-grid section:first-child p:not(.skill-details p) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--section-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.resume-grid section:first-child p:not(.skill-details p)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    opacity: 0.7;
}

.resume-grid section:first-child p:not(.skill-details p):hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

/* Contact Label Styling */
.contact-label {
    color: var(--secondary-color);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding-right: 0.5rem;
    position: relative;
    display: inline-block;
}

.contact-label::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

/* Hover effect for contact info and form labels */
.resume-grid section:first-child p:hover .contact-label::after,
.form-group:hover .contact-label::after {
    transform: scaleX(1);
}

/* Form styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--section-bg);
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* Contact form success message */
.success-message {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 4px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

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

/* Form disclaimer */
.form-disclaimer {
    margin: 1rem 0;
    padding: 0.75rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 3px solid var(--secondary-color);
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
}

.form-disclaimer p {
    margin: 0;
    color: var(--text-color);
}

/* Vision Grid Layout */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.vision-item {
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.vision-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    opacity: 0.7;
}

.vision-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

.vision-item h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Multimedia Content Styling */
.media-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.video-section, .audio-section {
    background: var(--section-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.media-caption {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-color);
    opacity: 0.8;
}

audio {
    width: 100%;
    margin: 1rem 0;
}

/* Make vision grid responsive */
@media (max-width: 768px) {
    .vision-grid {
        grid-template-columns: 1fr;
    }
}

.profile-images {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.profile-image {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 100%;
    height: auto;
}

.profile-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .profile-images {
        flex-direction: column;
        align-items: center;
    }
}

.email-item,
.clipboard-item,
.social-link {
    cursor: pointer;
    position: relative;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.email-item::before,
.clipboard-item::before,
.social-link::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary-color);
    opacity: 0.7;
}

.email-item:hover,
.clipboard-item:hover,
.social-link:hover {
    background-color: rgba(var(--secondary-color-rgb), 0.1);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

.email-item svg,
.clipboard-item svg,
.social-link svg {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    width: 1.2em;
    height: 1.2em;
}

.email-item:hover svg,
.clipboard-item:hover svg,
.social-link:hover svg {
    opacity: 1;
}

.social-link a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

/* Tooltip positioning */
.email-item[title]:hover::after,
.clipboard-item[title]:hover::after,
.social-link[title]:hover::after {
    content: attr(title);
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0.9;
    pointer-events: none;
    z-index: 1000;
}

@media (max-width: 1800px) {
    .table-of-contents {
        position: fixed;
        left: 1rem;
        top: 16rem;
        transform: translateX(0);
        width: 50px;
        padding: 0.5rem;
        overflow: hidden;
        transition: all 0.3s ease;
        transform-origin: left;
    }

    .table-of-contents.scrolled {
        top: 4rem;
    }

    .table-of-contents:hover {
        width: 250px;
        transform: translateX(0);
        padding: 1.5rem;
    }

    .table-of-contents::before {
        opacity: 1;
    }

    .table-of-contents h3 {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        margin-left: 1rem;
    }

    .table-of-contents:hover h3 {
        opacity: 1;
        visibility: visible;
    }

    .table-of-contents ul {
        position: relative;
        margin: 0;
        padding: 0;
        min-width: 230px;
    }

    .table-of-contents ul::before {
        content: '';
        position: absolute;
        left: 0.35rem;
        top: 0;
        bottom: 0;
        width: 2px;
        background: var(--border-color);
        border-radius: 2px;
        opacity: 1 !important;
    }

    .table-of-contents a {
        white-space: nowrap;
        position: relative;
        padding-left: 1.5rem;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        color: transparent;
        pointer-events: none;
    }

    .table-of-contents:hover a {
        opacity: 1;
        visibility: visible;
        color: var(--text-color);
        pointer-events: auto;
    }

    .table-of-contents li {
        margin-left: 0;
    }

    .dot-indicator {
        opacity: 1 !important;
        left: 0.35rem;
    }

    .table-of-contents a.active::before {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .table-of-contents {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        width: 100%;
        margin-bottom: 2rem;
        padding: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .table-of-contents ul {
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        overflow: hidden;
        margin-top: 1rem;
        min-width: auto;
        width: 100%;
    }

    .table-of-contents.active ul {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }

    .table-of-contents a {
        opacity: 1 !important;
        visibility: visible !important;
        color: var(--text-color) !important;
        padding: 0.75rem 1rem;
        display: block;
        pointer-events: auto;
        white-space: normal;
    }

    .table-of-contents li {
        border-bottom: 1px solid var(--border-color);
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .table-of-contents li:hover {
        background: rgba(231, 76, 60, 0.1);
    }
}

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

/* Add padding to main content when table of contents is minimized */
@media (max-width: 1800px) and (min-width: 769px) and (max-width: 1320px) {
    main {
        padding-left: 70px;  /* 50px for ToC width + 20px spacing */
    }
}

/* Mobile table of contents styles */
@media (max-width: 768px) {
    .table-of-contents {
        display: none;
    }

    main {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

h2.active, h3.active {
    color: var(--secondary-color);
    text-shadow: 0 2px 4px rgba(231, 76, 60, 0.3), 0 0 20px rgba(231, 76, 60, 0.1);
    position: relative;
}

h2.active::after, h3.active::after {
    content: '';
    position: absolute;
    bottom: -0.25rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
}

/* Mobile hamburger menu */
.hamburger-menu {
    display: none;
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
}

.hamburger-menu span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.hamburger-menu span:nth-child(1) {
    top: 0px;
}

.hamburger-menu span:nth-child(2) {
    top: 10px;
}

.hamburger-menu span:nth-child(3) {
    top: 20px;
}

.hamburger-menu.open span:nth-child(1) {
    top: 10px;
    transform: rotate(135deg);
}

.hamburger-menu.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger-menu.open span:nth-child(3) {
    top: 10px;
    transform: rotate(-135deg);
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }
    
    .table-of-contents {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: var(--section-bg);
        z-index: 999;
        padding: 5rem 1.5rem 1.5rem;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    
    .table-of-contents.active {
        left: 0;
    }
    
    .table-of-contents h3 {
        margin-top: 1rem;
    }
    
    .table-of-contents ul {
        margin-top: 1.5rem;
    }
    
    .table-of-contents li {
        margin-bottom: 1rem;
    }
    
    .table-of-contents a {
        padding: 0.75rem 1rem;
        display: block;
        border-radius: 4px;
    }
    
    .table-of-contents a:hover {
        background: rgba(231, 76, 60, 0.1);
    }
    
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }
    
    .overlay.active {
        display: block;
    }
}

/* Add styling for active section */
section.active {
    border: 1px solid var(--border-color);
    box-shadow: 0 0 0 1px var(--border-color);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Add a subtle highlight effect for the active section */
section.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--text-color);
    border-radius: 2px 0 0 2px;
} 