/* Body Styling */
body {
    overflow: auto;
    font-family: 'Quantico', sans-serif;
    color: white;
    margin: 0;
    padding: 0;
}

/* Header Styling */
header {
    text-align: center;
    padding: 1em 0;
}

@font-face {
    font-family: 'Quantico';
    src: url('/fonts/Quantico-Regular.ttf');
}

/* Scrollbar track */
::-webkit-scrollbar {
    width: 14px;
    background-color: #06041a;
}

/* Scrollbar thumb */
::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #360082, #6b2be3);
    border-radius: 6px;
    border: 3px solid #06041a;
}

/* Scrollbar thumb hover */
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #4b00b5, #9162fc);
}

/* Scrollbar thumb click */
::-webkit-scrollbar-thumb:active {
    background: linear-gradient(90deg, #21004f, #4f21b0);
}

/* Text highlight (selection) colors */
::selection {
    background: #4e009c;
    color: white;
}

::-moz-selection {
    background: #4e009c;
    color: white;
}

.spacer {
    height: 5rem;
}

.centered {
    text-align: center;
}

.tiny-note {
    font-size: small;
    color: lightgray;
}

#contact-info {
    margin-right: 40%;
    transition: filter 150ms ease-in-out;
}

/* Background Animation */
#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    background-color: rgba(2, 2, 20, 0.76);
}

#main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#main-container {
    background-color: rgba(10, 6, 29, 0.2);
    max-width: 85vw;
    border-radius: 4rem;
    border: 2px solid #27234c;
    backdrop-filter: blur(13px);
}

#main-container.unblur {
    backdrop-filter: none; /* Backdrop filter breaks zoomed images somehow */
    background-color: rgba(10, 6, 29, 0.7); /* Replacement for blur: more opaque background */
}

/* Main Header */
header h1 {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

section h2 {
    font-size: 2em;
    margin-bottom: 1em;
}

/* Introduction Section */
.intro {
    text-align: center;
    margin: 5px;
}

.intro h1 {
    font-size: 2.25rem;
    margin-bottom: 0;
}

.profile-picture {
    border-radius: 40%;
    margin-top: 20px;
    border: 1px solid #27234c;
}

.intro p {
    margin: 20px 10%;
    font-size: 1.2em;
}

/* Projects Section */
#portfolio {
    text-align: center;
    padding: 1em 2em 2em;
}

#portfolio p {
    color: #c4c4c4;
    margin-bottom: 1em;
    font-size: 0.9em;
}

#portfolio > p {
    margin: 20px 10%;
}

#portfolio .project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 25px;
    justify-content: center;
    align-items: stretch;
}

#portfolio .project-card {
    background-color: #12102d;
    padding: 1rem;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

#portfolio .project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#portfolio .project-card:has(img.zoomed):hover {
    transform: none;
    box-shadow: none;
}

#portfolio .project-card img {
    cursor: zoom-in;
    width: 100%;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    object-fit: cover;
}

#portfolio .project-card img.zoomed {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) scale(1);
    z-index: 10;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    cursor: zoom-out;
    background: rgba(72, 72, 72, 0.3);
    border-radius: 10px;
}

#portfolio .project-card h3 {
    color: #e4be32;
    font-size: 1.2em;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

#portfolio .project-card p {
    color: #c5c6ca;
    flex-grow: 1;
    font-size: 0.95em;
    margin-bottom: 1rem;
    text-align: start;
}

#portfolio .project-card .links {
    font-size: 0.9em;
}

#portfolio .project-card .links a {
    margin-right: 0.5rem;
    margin-left: 0.5rem;
    text-decoration: none;
    font-weight: bold;
}

#portfolio .project-card .links a:hover {
    text-decoration: underline;
}

/* Contact Section */
.contact {
    padding: 1em 2em 2em;
}

.contact h2 {
    text-align: center;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 0.333em 0;
    font-size: 0.8em;
    background-color: #0a092d;
    color: #888;
    width: calc(100vw - 14px);
    margin-top: 2.5rem;
}

a {
    color: #4a90e2;
}

footer a {
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Zoom Dim Overlay */
#zoomOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9;
    display: none;
    transition: opacity 0.3s ease;
}

#zoomOverlay.visible {
    display: block;
    backdrop-filter: blur(5px);
}

@media (orientation: portrait) {
    #contact-info {
        margin-right: auto;
    }
}