/* styles.css - Complete Stylesheet */

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

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll from stars */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #1a1a1a;
    color: #e5e5e5;
    position: relative;
    /* Ensure body allows absolute positioning of children relative to it */
}

/* ===== STARRY NIGHT BACKGROUND ===== */

/* Canvas layer that renders the animated space background */
.starfield-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    display: block;
}

/* Ripple Click Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== MAIN CONTENT LAYOUT ===== */
.container, .page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    padding-bottom: 6rem;
    min-height: calc(100vh - 4rem);
    position: relative;
    /* Layer 10: Crucial! Puts text/images ABOVE the stars */
    z-index: 10; 
}

/* Profile Image */
.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #333333; /* Dark Gray Border */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    object-fit: cover;
    object-position: center;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
    z-index: 11;
    cursor: default;
    pointer-events: auto;
}

.name {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    margin-top: 2rem; 
}

.title {
    font-size: 1.25rem;
    color: #9ca3af;
    margin-bottom: 3rem;
}

.icon-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 3.5rem;
    margin-bottom: 3rem;
    width: auto;
    max-width: 800px;
    padding: 1rem 2rem;
}

.icon-link {
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    flex-shrink: 0;
}

.icon-link i {
    font-size: 4.5rem;
}

.icon-link:hover {
    color: #ffffff;
    transform: scale(1.15);
}

/* Projects Dropdown Styles */
.projects-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.projects-button {
    padding: 0;
}

.projects-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d2d2d;
    min-width: 280px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    z-index: 12;
    margin-top: 0.5rem;
    padding: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.projects-dropdown-content::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

.projects-dropdown:hover .projects-dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-radius: 6px;
}

.dropdown-item:hover {
    background-color: #3d3d3d;
}

.dropdown-item i {
    font-size: 1.1rem;
    color: #f59e0b;
    width: 20px;
    text-align: center;
}

.dropdown-item span {
    color: #d1d5db;
    font-size: 0.95rem;
}

.dropdown-item:hover span {
    color: #ffffff;
}

.dropdown-item.view-all {
    border-top: 1px solid #3d3d3d;
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    font-weight: 500;
}

.dropdown-item.view-all i {
    color: #60a5fa;
}

/* Contact Dropdown Styles */
.contact-dropdown {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
}

.contact-button {
    padding: 0;
    text-decoration: none;
}

.contact-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d2d2d;
    min-width: 250px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    z-index: 12;
    margin-top: 0.5rem;
    padding: 1rem;
    opacity: 0;
    transform-origin: top center;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.contact-dropdown-content::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    right: 0;
    height: 0.5rem;
    background: transparent;
}

.contact-dropdown.open .contact-dropdown-content {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: #d1d5db;
    transition: background-color 0.2s ease;
    border-radius: 4px;
}

.contact-item:hover {
    background-color: #3d3d3d;
}

.contact-item i {
    font-size: 1.25rem;
    color: #9ca3af;
}

.contact-item a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.95rem;
}

.contact-item a:hover {
    color: #ffffff;
}

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

/* ===== INNER PAGES STYLES ===== */
.back-button {
    color: #9ca3af;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: color 0.2s ease;
}
.back-button:hover { color: #ffffff; }

.content-wrapper { flex: 1; }
.projects-page-container,
.about-page-container {
    min-height: 100vh;
    justify-content: flex-start;
    padding-bottom: 0;
}
.page-title { font-size: 3rem; font-weight: bold; margin-bottom: 1rem; text-align: center; }
.page-subtitle { text-align: center; color: #9ca3af; font-size: 1.1rem; margin-bottom: 3rem; }

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 5rem;
    background: #2d2d2d;
    color: #ffffff;
    border: 1px solid #3d3d3d;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 25;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* About Section */
.about-section { display: flex; gap: 3rem; align-items: flex-start; margin-bottom: 4rem; padding: 2rem; background-color: #242424; border-radius: 12px; }
.about-image { width: 200px; height: 200px; border-radius: 12px; border: 2px solid #4b5563; flex-shrink: 0; object-fit: cover; object-position: center; }
.about-text h2 { font-size: 2rem; margin-bottom: 1rem; }
.about-text p { color: #d1d5db; line-height: 1.8; margin-bottom: 1rem; }
.section-title { font-size: 2rem; margin-bottom: 2rem; text-align: center; }

/* Grids */
.hobbies-section, .travel-section, .skills-section, .education-section, .interests-section { margin-bottom: 4rem; }
.hobbies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.travel-grid, .projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }

/* Cards */
.hobby-card, .travel-card, .project-card { background-color: #242424; border-radius: 12px; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hobby-card { padding: 2rem; text-align: center; }
.hobby-card:hover, .travel-card:hover, .project-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }

.hobby-icon { font-size: 3rem; color: #f59e0b; margin-bottom: 1rem; }
.hobby-card h3 { font-size: 1.5rem; margin-bottom: 0.75rem; color: #f59e0b; }
.hobby-card p, .travel-description, .project-description, .education-description, .skill-card p { color: #d1d5db; line-height: 1.6; }

/* Travel/Project Card Specifics */
.travel-image, .project-image { height: 180px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.travel-content, .project-content { padding: 1.5rem; }
.travel-location { font-size: 1.5rem; margin-bottom: 1rem; color: #f59e0b; }
.travel-highlights, .project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.highlight, .tag { background-color: #3d3d3d; color: #e5e5e5; padding: 0.4rem 0.8rem; border-radius: 15px; font-size: 0.85rem; }

/* Bucket List */
.bucketlist-section { margin-bottom: 4rem; }
.bucketlist-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; max-width: 900px; margin: 0 auto; }
.bucketlist-item { background-color: #242424; padding: 1.25rem; border-radius: 8px; display: flex; align-items: center; gap: 1rem; transition: background-color 0.2s ease; }
.bucketlist-item:hover { background-color: #2d2d2d; }
.bucketlist-item i { color: #10b981; font-size: 1.25rem; }
.bucketlist-flag { font-size: 1.25rem; line-height: 1; min-width: 1.5rem; display: inline-flex; justify-content: center; }
.bucketlist-item span { color: #d1d5db; font-size: 1rem; }

/* Quote */
.quote-section { margin-bottom: 4rem; text-align: center; padding: 3rem 2rem; background-color: #242424; border-radius: 12px; max-width: 800px; margin: 0 auto 4rem; }
.quote-icon { font-size: 2rem; color: #f59e0b; margin-bottom: 1rem; }
.quote-section p { font-size: 1.5rem; font-style: italic; color: #e5e5e5; line-height: 1.8; margin-bottom: 1rem; }
.quote-section cite { color: #9ca3af; font-size: 1rem; font-style: normal; }

/* Skills & Education (Compatibility) */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; }
.skill-card { background-color: #242424; padding: 2rem; border-radius: 12px; text-align: center; }
.skill-icon { font-size: 3rem; color: #60a5fa; margin-bottom: 1rem; }
.skill-card h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

.education-item { background-color: #242424; padding: 2rem; border-radius: 12px; }
.education-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; flex-wrap: wrap; }
.education-header h3 { font-size: 1.5rem; }
.education-date { color: #60a5fa; font-size: 0.9rem; }
.education-institution { color: #9ca3af; font-size: 1.1rem; margin-bottom: 1rem; }

.interests-tags { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.interest-tag { background-color: #242424; color: #60a5fa; padding: 0.75rem 1.5rem; border-radius: 25px; font-size: 0.95rem; border: 1px solid #3d3d3d; transition: all 0.2s ease; }
.interest-tag:hover { background-color: #60a5fa; color: #1a1a1a; transform: translateY(-2px); }

/* Project Page Specifics */
.project-image-icon { font-size: 5rem; color: rgba(255, 255, 255, 0.9); }
.project-title {
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-description {
    font-size: 0.95rem;
}
.project-links { display: flex; gap: 1rem; justify-content: center; margin-top: 0.6rem; }
.project-links-center { justify-content: center; }
.project-link { color: #9ca3af; text-decoration: none; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; transition: color 0.2s ease; }
.project-link-centered { margin: 0 auto; justify-content: center; }
.project-cta {
    margin-top: 0.9rem;
    padding: 0.7rem 1.15rem;
    font-size: 1rem;
    border: none;
    background: transparent;
}
.project-cta:hover { background: transparent; }
.project-link:hover { color: #ffffff; }
.project-link-disabled,
.project-link-disabled:hover {
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.85;
    pointer-events: none;
}

/* Repository Page */
.repo-layout {
    width: min(980px, 95vw);
    margin: 0 auto;
    text-align: left;
}

.repo-shell {
    border: 1px solid #3d3d3d;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.4rem;
    background: #242424;
}

.repo-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #3d3d3d;
    background: #2d2d2d;
}

.repo-path {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #d1d5db;
    font-size: 0.95rem;
}

.repo-path i {
    color: #9ca3af;
}

.repo-back-link {
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9rem;
}

.repo-back-link:hover {
    color: #bfdbfe;
}

.repo-table {
    display: flex;
    flex-direction: column;
}

.repo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    padding: 0.9rem 1rem;
    border-top: 1px solid #3d3d3d;
    color: #e5e7eb;
}

.repo-row:first-child {
    border-top: none;
}

.repo-row:hover {
    background: #333333;
}

.repo-entry {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.repo-folder-icon {
    color: #fbbf24;
}

.repo-name {
    font-weight: 600;
}

.repo-meta {
    color: #9ca3af;
    font-size: 0.88rem;
}

.repo-folder-section {
    border: 1px solid #3d3d3d;
    border-radius: 12px;
    padding: 1rem 1rem 1.1rem;
    margin-bottom: 1rem;
    background: #242424;
}

.repo-folder-title {
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.repo-folder-title i {
    color: #fbbf24;
}

.repo-folder-note {
    color: #9ca3af;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.repo-file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.repo-file-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #d1d5db;
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
    font-size: 0.94rem;
}

.repo-file-list i {
    color: #60a5fa;
}

.repo-file-hint {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Footer */
.footer {
    font-size: 0.875rem;
    color: #6b7280;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem;
    text-align: center;
    background-color: #1a1a1a;
    z-index: 20;
}

.footer-static {
    position: static;
    margin-top: auto;
    align-self: stretch;
}

/* Responsive */
@media (max-width: 768px) {
    .name { font-size: 2rem; }
    .icon-container { gap: 2.5rem; padding: 1rem; }
    .repo-row { flex-direction: column; align-items: flex-start; }
    .repo-meta { font-size: 0.82rem; }
    .about-section { flex-direction: column; align-items: center; text-align: center; padding: 1.5rem; }
    .about-text { width: 100%; }
    .projects-dropdown-content, .contact-dropdown-content { min-width: 220px; }
    .hobbies-grid, .travel-grid, .projects-grid, .bucketlist-container, .skills-grid { grid-template-columns: 1fr; }
    .quote-section p { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .icon-container { gap: 1.8rem; padding: 0.5rem; }
    .icon-link i { font-size: 3rem; }
    .about-section { padding: 1rem; }
    .about-image { width: 150px; height: 150px; }
    .contact-dropdown-content {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-8px);
        width: 92vw;
        max-width: 360px;
        text-align: center;
    }
    .contact-dropdown.open .contact-dropdown-content {
        transform: translateX(-50%) translateY(0);
    }
    .back-to-top {
        right: 1rem;
        bottom: 4.5rem;
        padding: 0.65rem 0.9rem;
        font-size: 0.9rem;
    }
}

.repo-file-link { color: #d1d5db; text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem; }
.repo-file-link:hover { color: #ffffff; text-decoration: underline; }
