/* Reset defaults */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background: linear-gradient(0deg, #000000 0%, #121212 100%);
    background-attachment: fixed;
    color: #e0e0e0;
    min-height: 200vh;
    display: flex;
    flex-direction: column;
}

/* Page Outliner (Desktop Only) */
.page-outliner {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    padding: 10px 0;
    z-index: 10;
}
.page-outliner ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.outline-item {
    position: relative;
    padding: 5px 10px;
}
.outline-link {
    color: #404040;
    text-decoration: none;
    font-size: 0.9em;
    display: block;
    white-space: nowrap;
    transition: font-size 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.outline-item:hover .outline-link {
    font-size: 1.1em;
    color: #e0e0e0;
}
.overview span {
    color: #e0e0e0;
    font-size: 1.1em;
    display: block;
    white-space: nowrap;
    transition: font-size 0.3s ease, color 0.3s ease;
}
.overview:hover span {
    font-size: 1.2em;
}
.sub-outline {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    padding: 10px;
    list-style: none;
    width: 150px;
}
.outline-item:hover .sub-outline {
    display: block;
}
.sub-outline li a {
    color: #404040;
    text-decoration: none;
    font-size: 0.8em;
    display: block;
    padding: 5px 0;
    transition: color 0.3s ease;
}
.sub-outline li a:hover {
    color: #e0e0e0;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    position: relative;
}
header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #606060, transparent);
}
header .logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}
header h1 {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: #b0b0b0;
    letter-spacing: 1px;
    font-weight: 400;
}
header p {
    margin: 0;
    font-size: 1.2em;
    color: #b0b0b0;
    letter-spacing: 1px;
}

/* About Me Section */
.about-me {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    text-align: center;
}
.about-me::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #606060, transparent);
}
.about-me h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.photo-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    flex-shrink: 0;
    background: transparent;
    background-size: cover;
    background-position: center;
    position: relative;
    margin: 0 auto 20px;
}
.photo-placeholder::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1.5px solid transparent;
    border-radius: 50%;
    background: linear-gradient(-45deg, #101010, #a0a0a0) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}
.text-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 630px;
    box-sizing: border-box;
}
.about-text {
    margin: 0;
    color: #d0d0d0;
    font-size: 1.1em;
}
.info-grid {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%;
    justify-content: center;
}
.key-facts, .skills, .software {
    flex: 1;
    margin-top: 0;
    text-align: center;
    cursor: pointer;
}
.key-facts h3, .skills h3, .software h3 {
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 8px;
}
.key-facts ul, .skills ul, .software ul {
    list-style-type: none;
    padding: 0;
    color: #d0d0d0;
    max-height: 90px; /* Approx 3 items */
    overflow: hidden;
    transition: max-height 0.6s ease; /* Slower transition */
}
.key-facts.expanded ul, .skills.expanded ul, .software.expanded ul,
.key-facts:hover ul, .skills:hover ul, .software:hover ul {
    max-height: 150px; /* Approx 5 items */
}
.key-facts li, .skills li, .software li {
    margin-bottom: 6px;
    transition: opacity 0.6s ease; /* Match slower transition */
}
.key-facts li:nth-child(1), .skills li:nth-child(1), .software li:nth-child(1) {
    font-size: 1.2em;
    color: #e0e0e0;
}
.key-facts li:nth-child(2), .skills li:nth-child(2), .software li:nth-child(2) {
    font-size: 1.1em;
    color: #d0d0d0;
}
.key-facts li:nth-child(3), .skills li:nth-child(3), .software li:nth-child(3) {
    font-size: 1em;
    color: #b0b0b0;
}
.key-facts li:nth-child(4), .skills li:nth-child(4), .software li:nth-child(4) {
    font-size: 0.9em;
    color: #a0a0a0;
}
.key-facts li:nth-child(5), .skills li:nth-child(5), .software li:nth-child(5) {
    font-size: 0.8em;
    color: #909090;
}
.key-facts li.hidden, .skills li.hidden, .software li.hidden {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}
.key-facts:hover li.hidden, .skills:hover li.hidden, .software:hover li.hidden,
.key-facts.expanded li.hidden, .skills.expanded li.hidden, .software.expanded li.hidden {
    opacity: 1;
    height: auto;
    margin-bottom: 6px;
}

/* Portfolio Section */
.portfolio {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}
.portfolio h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.portfolio-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.project {
    background-color: #141414;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-decoration: none;
    color: inherit;
}
.project:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}
.placeholder {
    width: 100%;
    padding-top: 66.67%;
    background-color: #404040;
    margin: 15px auto 0;
    border-radius: 4px;
    position: relative;
}
.placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #404040;
    border-radius: 4px;
}

/* Mobile Rules (below 768px) */
@media (max-width: 768px) {
    .page-outliner {
        display: none;
    }
    .info-grid {
        flex-direction: column;
    }
    .project {
        max-width: 85%;
        margin: 0 auto;
    }
    .about-content {
        flex-direction: column;
        align-items: center;
    }
    .text-container {
        width: 100%;
        max-width: none;
    }
    .about-text {
        text-align: center;
    }
    .info-grid {
        text-align: center;
    }
    .photo-placeholder {
        margin: 0 auto 20px;
    }
    /* Disable hover on mobile */
    .key-facts:hover ul, .skills:hover ul, .software:hover ul {
        max-height: 90px;
    }
    .key-facts:hover li.hidden, .skills:hover li.hidden, .software:hover li.hidden {
        opacity: 0;
        height: 0;
        margin: 0;
    }
}

/* Mobile Scroll Effect */
@media (max-width: 768px) {
    .about-me h2, .photo-placeholder, .about-text, .key-facts, .skills, .software, .portfolio h2, .project {
        transition: transform 0.3s ease;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    position: relative;
    margin-top: auto;
}
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, transparent, #606060, transparent);
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}
.social-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: block;
    transition: transform 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
}
.social-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1.5px solid transparent;
    border-radius: 50%;
    background: linear-gradient(-45deg, #101010, #a0a0a0) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.3);
}
.social-icon:hover {
    transform: scale(1.3);
}
.social-icon.instagram {
    background-image: url('Insta.jpg');
}
.social-icon.x {
    background-image: url('X.jpg');
}
.social-icon.linkedin {
    background-image: url('LinkedIn.jpg');
}
footer a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s ease;
}
footer a:hover {
    color: #ffffff;
}