/* --------------------
 * Global Styles & Reset
 * -------------------- */
:root {
    --color-dark: #121212;
    --color-medium: #1f1f1f;
    --color-light: #e0e0e0;
    --color-neon-main: #6a0dad; /* Deep Purple */
    --color-neon-sub: #00ffff; /* Cyan/Aqua */
    --color-text-box: rgba(31, 31, 31, 0.85); /* Semi-transparent dark for readability */
    --color-shadow: 0 0 10px var(--color-neon-main);
    --font-primary: 'Consolas', 'Fira Code', monospace;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-dark);
    color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Fixed Background Image and Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.15; /* Subtle background */
    z-index: -2;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Darkens the image and adds contrast */
    z-index: -1;
}

a {
    color: var(--color-neon-sub);
    text-decoration: none;
    transition: color var(--transition-speed), text-shadow var(--transition-speed);
}

a:hover {
    color: var(--color-light);
    text-shadow: 0 0 5px var(--color-neon-sub);
}

h1, h2, h3 {
    margin-bottom: 0.5em;
    color: var(--color-light);
}

.neon-text-main {
    color: var(--color-neon-main);
    text-shadow: 0 0 5px var(--color-neon-main), 0 0 10px var(--color-neon-main);
}

.neon-text-sub {
    color: var(--color-neon-sub);
    text-shadow: 0 0 5px var(--color-neon-sub);
}

.content-box {
    /* EVERY piece of text must have a semi-transparent dark box/background */
    background: var(--color-text-box); 
    padding: 20px;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: var(--color-shadow);
    max-width: 1200px;
}

.page-header {
    font-size: 2.5em;
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--color-neon-main);
    margin-bottom: 30px;
}

.icon {
    color: var(--color-neon-sub);
    margin-right: 8px;
}

/* Simple Fade-in Animation on Load */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}


/* --------------------
 * Navigation
 * -------------------- */
#main-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(18, 18, 18, 0.95); /* Slightly transparent dark background */
    border-bottom: 1px solid var(--color-neon-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

#main-nav .logo a {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--color-light);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background var(--transition-speed);
}

.nav-links a:hover {
    background: rgba(106, 13, 173, 0.2);
    box-shadow: 0 0 5px var(--color-neon-main);
}

.nav-links a.active {
    color: var(--color-dark);
    background: var(--color-neon-sub);
    box-shadow: 0 0 10px var(--color-neon-sub);
    text-shadow: none;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 1001;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-neon-sub);
    transition: all var(--transition-speed);
}


/* --------------------
 * Hero Section (index.html)
 * -------------------- */
.hero {
    display: flex;
    flex-wrap: wrap-reverse;
    align-items: center;
    gap: 40px;
    padding: 50px;
}

.hero-text {
    flex: 2;
    min-width: 300px;
}

.hero-text h1 {
    font-size: 3em;
    margin-top: 0;
}

.hero-text .title {
    color: var(--color-neon-sub);
    font-size: 1.2em;
    margin-bottom: 20px;
}

.hero-image {
    flex: 1;
    text-align: center;
    min-width: 150px;
}

.hero-image img {
    border-radius: 50%;
    border: 5px solid var(--color-neon-main);
    box-shadow: 0 0 20px rgba(106, 13, 173, 0.7);
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.contact-info p {
    margin: 10px 0;
}

.mbti-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 5px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--color-neon-sub);
    margin-bottom: 15px;
    font-weight: bold;
}

.social-list {
    list-style: none;
}

.social-list li {
    margin: 10px 0;
}

/* --------------------
 * Experience (experience.html)
 * -------------------- */
.timeline-container {
    max-width: 800px;
    margin: 50px auto;
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    background-color: var(--color-neon-main);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 100%;
    padding: 20px 40px;
}

.timeline-item:nth-child(odd) {
    left: 50%;
    transform: translateX(25px); /* Offset for better visual balance */
}

.timeline-item:nth-child(even) {
    right: 50%;
    text-align: right;
    transform: translateX(-25px);
}

.timeline-dot {
    position: absolute;
    top: 25px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--color-neon-sub);
    box-shadow: 0 0 10px var(--color-neon-sub);
}

.timeline-item:nth-child(odd) .timeline-dot {
    left: calc(50% - 7.5px);
}

.timeline-item:nth-child(even) .timeline-dot {
    right: calc(50% - 7.5px);
}

.timeline-date {
    font-weight: bold;
    margin-bottom: 5px;
}

.timeline-title {
    color: var(--color-light);
}

/* --------------------
 * Education (education.html)
 * -------------------- */
.education-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 5%;
}

.education-item {
    border-left: 5px solid var(--color-neon-main);
    padding-left: 20px;
}

.edu-year {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 5px;
}

.edu-degree {
    color: var(--color-neon-sub);
}

/* --------------------
 * Skills (skills.html)
 * -------------------- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 0 5%;
}

.skill-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%; /* Ensure all cards are same height if possible */
}

.skill-icon img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
    transition: transform var(--transition-speed);
}

.skill-card:hover .skill-icon img {
    transform: scale(1.05);
}

.progress-bar-container {
    width: 90%;
    height: 20px;
    background-color: var(--color-medium);
    border-radius: 10px;
    margin-top: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--color-neon-main);
}

.progress-bar {
    height: 100%;
    width: 0; /* Initial state for animation */
    background: linear-gradient(90deg, var(--color-neon-main), var(--color-neon-sub));
    transition: width 1.5s ease-out; /* Controlled by JS for smooth fill */
    position: relative;
}

.progress-label {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: var(--color-light);
    font-weight: bold;
    text-shadow: 0 0 2px var(--color-dark);
    font-size: 0.8em;
}

/* --------------------
 * Extra (extra.html)
 * -------------------- */
.extra-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 5%;
}

.extra-card ul {
    list-style: none;
}

.extra-card ul li {
    margin-bottom: 10px;
}

.media-list a {
    display: block;
    padding: 5px;
    border-left: 2px solid var(--color-neon-sub);
}

/* --------------------
 * Site Map (sitemap.html)
 * -------------------- */
.sitemap-structure {
    max-width: 600px;
    margin: 50px auto;
}

.sitemap-structure h2 {
    border-bottom: 1px dashed var(--color-neon-main);
    padding-bottom: 5px;
    margin-top: 20px;
}

.page-list, .dir-list {
    list-style: none;
    padding-left: 20px;
}

.page-list li, .dir-list li {
    margin: 10px 0;
}

.file-path {
    color: var(--color-light);
    font-size: 0.9em;
    opacity: 0.7;
}

/* --------------------
 * Footer
 * -------------------- */
footer {
    background: rgba(18, 18, 18, 0.9);
    color: var(--color-light);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid var(--color-neon-sub);
}

footer .content-box {
    background: none;
    box-shadow: none;
    margin: 0 auto;
    max-width: 1200px;
    padding: 0;
}

.social-links {
    margin-top: 10px;
}

.social-links a {
    font-size: 1.5em;
    margin: 0 10px;
    color: var(--color-neon-main);
}

.social-links a:hover {
    color: var(--color-neon-sub);
}


/* --------------------
 * Media Queries (Mobile-First Approach)
 * -------------------- */

/* Tablet and larger screens */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
    .nav-links {
        display: flex !important; /* Override JS hide on larger screens */
        position: static;
        flex-direction: row;
        width: auto;
        background: none;
        padding: 0;
    }
    .hero {
        flex-wrap: nowrap;
    }
}

/* Mobile specific styling */
@media (max-width: 767px) {
    #main-nav {
        padding: 10px 5%;
    }
    .hamburger {
        display: block;
    }
    .nav-links {
        /* Mobile menu state */
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px; /* Below the nav bar */
        right: 0;
        width: 100%;
        background: rgba(18, 18, 18, 0.98);
        border-top: 1px solid var(--color-neon-main);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links li {
        text-align: center;
        margin: 10px 0;
    }
    .nav-links a {
        display: block;
        padding: 15px;
    }
    
    .hero {
        padding: 30px 20px;
    }
    
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item {
        width: 100%;
        padding: 0 0 20px 60px;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
    }
    
    .timeline-item .timeline-dot {
        left: 12px;
        right: auto;
    }
    
    .timeline-item:nth-child(even) {
        text-align: left;
    }
}
