/* Reset & Base Styles */

html, body {
    position: relative;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    background-color: #fff;
}


/* Typography */

h1 {
    margin: 0;
    font-weight: bold;
}

a, a:visited {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:focus {
    outline: none;
}


/* Layout - Main Container */

main {
    position: relative;
    top: 43%;
    transform: translateY(-50%);
    text-align: center;
}

/* Scrollable pages (Experience) */
main.scrollable {
    position: relative;
    top: 0;
    transform: none;
    padding-top: 10vh;
    padding-bottom: 5vh;
}

/* About page - keep centered */
main:has(.about-content):not(.scrollable) {
    position: relative;
    top: 43%;
    transform: translateY(-50%);
}

/* About page h1 - left aligned */
main:has(.about-content):not(.scrollable) h1 {
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* Contact Info (Homepage) */

.contact {
    margin-top: 0.3rem;
}

.contact p {
    margin: 0.2rem 0;
}

.contact p:first-child {
    margin-bottom: 0.35rem;
}


/* Content Sections */

.about-content {
    margin-top: 1rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about-content p {
    margin: 0.15rem 0;
    line-height: 1.6;
}

/* Section headers (Projects, Work Experience) */
.about-content p > strong:only-child {
    font-size: 1.3rem;
    font-weight: bold;
}

/* Bold text inside links (e.g., "connect with me here") */
.about-content a strong {
    font-size: inherit;
    font-weight: bold;
}

/* Project titles with GitHub links - align GitHub to right */
.about-content p:has(a[href*="github.com"]) {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

/* Work experience company names with dates - align dates to right */
.about-content p:has(a):not(:has(a[href*="github.com"])):has(span) {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

/* Technology descriptions - gray color */
.about-content p:has(a[href*="github.com"]) + p {
    color: #666;
}

/* Work experience descriptions - gray color (Experience page only) */
main.scrollable .about-content p:has(a):not(:has(a[href*="github.com"])) + p:not(:has(a)) {
    color: #666;
}


/* Social Icons */

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.8rem;
    margin-bottom: 0.8rem;
}

/* About/Experience pages - icons with more spacing */
main:has(.about-content) .social-icons {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.social-icons a {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.social-icons a:focus {
    outline: none;
}

.social-icons svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}


/* Navigation */

nav a {
    margin: 0 1rem;
}

/* Homepage - tighter nav spacing */
main:not(:has(.about-content)) nav a {
    margin: 0 0.56rem;
}

/* About/Experience pages - nav spacing before icons */
main:has(.about-content) nav {
    margin-top: 2rem;
}


/* Responsive Design */

@media (max-width: 768px) {
    main {
        padding: 0 1rem;
    }

    .social-icons {
        gap: 1rem;
    }

    nav a {
        display: block;
        margin: 0.5rem 0;
    }
}
