/* Base Styles */
:root {
    --text-color: #d7e2f1;
    --muted-color: #aebed5;
    --link-color: #8ce5d0;
    --background-color: #0a192f;
    --surface-color: #11243c;
    --border-color: #597491;
    --accent-color: #bfd6c4;
    --hologram-rgb: 140, 229, 208;
    --hologram-color: rgb(var(--hologram-rgb));
    color-scheme: dark;
    font-size: 17px; /* Set the base font size */
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem; /* Adjust this value based on the height of your nav bar */
}

@font-face {
    font-family: "Steph";
    src: url("fonts/steph-font.ttf");
    font-weight: normal;
}

@font-face {
    font-family: "Steph";
    src: url("fonts/steph-font-bold.ttf");
    font-weight: bold;
}

body {
    font-family: 'Steph', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

a {
    color: var(--text-color);
    text-decoration: none;
}

nav {
    background-color: var(--background-color);
    display: flex;
    justify-content: space-between;
    padding: 0 3.125rem;
    height: 5rem;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 25, 47, 0.93);
    border-bottom: 1px solid rgba(191, 214, 196, 0.12);
    backdrop-filter: blur(5px);
}

nav .left a {
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: 600;
}

nav .right a {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0.625rem;
}

nav .right a:hover {
    color: var(--link-color);
    transition: color 0.3s ease-in-out;
}

/* General Section Styles */
section {
    padding: 8rem 2rem;
    min-height: 80vh; /* Reduce the default minimum height */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 1px 0 rgba(191, 214, 196, 0.08);
}

section:nth-of-type(odd) {
    background-color: var(--background-color);
}

section:nth-of-type(even) {
    background-color: var(--background-color);
}

/* Section Heading Styles */
section h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: 1px;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 4px;
    background-color: var(--accent-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* About Section */
#about-section {
    min-height: 100vh;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 2rem;
    display: flex;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
}

#about-section .intro-title {
    margin-bottom: 1rem;
    font-size: clamp(1.9rem, 6vw, 2.75rem);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 1px;
}

#about-section .intro-title strong {
    color: var(--hologram-color);
    font-weight: 700;
}

.intro-ending {
    white-space: nowrap;
}

.intro-cursor {
    display: inline-block;
    margin-left: 0.12em;
    color: var(--hologram-color);
    animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-cursor {
        animation: none;
    }
}

#about-section .headshot {
    width: 20rem;
    height: 20rem;
    overflow: hidden;
    margin-top: 1rem;
    margin-bottom: 37px;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

#about-section .headshot img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

#about-section .headshot img:hover {
    transform: scale(1.2);
}

#about-section .bio {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 42rem;
}

#about-section .bio p {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--muted-color);
    line-height: 1.65;
}

#about-section .bio p + p {
    margin-top: 1.25rem;
}

#about-section .social-links {
    font-size: 2.25rem;
}

#about-section .social-links a {
    padding: 0;
    margin: 0 0.75rem;
}

#about-section .social-links a i {
    transition: transform 0.3s, color 0.3s;
}

#about-section .social-links a:hover i {
    color: var(--hologram-color);
    transform: scale(1.2);
}

#about-section .social-links i {
    color: var(--accent-color);
    font-weight: 500;
}

/* Experience Section */
#experience-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

#experience-section h2 {
    margin-bottom: 1rem;
    font-size: 2.75rem;
    font-weight: 700;
}

#experience-section .experience-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 56.25rem;
    width: 100%;
}

#experience-section .experience-box {
    background-color: #bfd6c4;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    text-align: left;
}

#experience-section .experience-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

#experience-section .experience-box p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 300;
}

/* Projects Section */
#projects-section {
    width: 100%;
    margin: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

#projects-section h2 {
    margin-bottom: 1rem;
    font-size: 2.75rem;
    font-weight: 700;
}

#projects-section h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 500;
    text-decoration: underline;
}

.project-subsection {
    width: 100%;
    margin-bottom: 4rem; /* Add space between subsections */
}

.projects-scroll-container {
    display: flex;
    gap: 1.5rem;
    padding: 1rem;
    width: 100%;
    max-width: 1600px;
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    margin: 0 auto;
}

.project-box {
    flex: 0 0 16rem; /* Fixed width for the boxes */
    text-align: center;
    border: 1px solid #d7dbd8;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for scaling */
}

.project-box:hover {
    transform: scale(0.95); /* Grow the box slightly on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.project-box img {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
}

.project-box h4 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.project-box h5 {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.project-box p {
    font-size: 1rem;
    font-weight: 300;
    color: #494a4a;
}

/* Skills Section */
#skills-section {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.75rem;
}

#skills-section h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 700;
}

#skills-section .skill-group {
    width: 100%;
    max-width: 60rem;
}

#skills-section .skill-group-roadmap {
    max-width: 36rem;
    padding-top: 0.75rem;
}

#skills-section h3 {
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.4;
}

#skills-section .skill-group-note {
    max-width: 36rem;
    margin: 0.6rem auto 1.5rem;
    color: var(--muted-color);
    line-height: 1.6;
}

#skills-section .skills-container {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

#skills-section .skill-group-roadmap .skills-container {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

#skills-section .skills-container li {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.9rem 0.4rem 1rem;
    border-bottom: 1px solid rgba(191, 214, 196, 0.14);
    min-width: 0;
}

#skills-section .skill-name {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
}

#skills-section .skill-detail {
    display: block;
    margin-top: 0.3rem;
    color: var(--muted-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

#skills-section i {
    font-size: 3rem;
    color: var(--hologram-color);
    transition: transform 0.3s ease, color 0.3s ease;
    margin: 0 0 0.85rem;
    line-height: 1.2;
}

#skills-section i:hover {
    transform: scale(1.2);
    color: var(--text-color);
}

/* Leave a Message Section */
#leave-message-section {
    min-height: 50vh; /* Make it half the viewport height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

#leave-message-section h2 {
    margin-bottom: 1rem;
    font-size: 2.75rem;
    font-weight: 700;
}

#leave-message-section p {
    font-size: 1.25rem;
    color: var(--muted-color);
    max-width: 600px;
    line-height: 1.6;
}

footer {
    background-color: #081425;
    color: var(--muted-color);
    text-align: center;
    padding: 1rem 0;
    font-size: 0.875rem;
}

/* Cards Swiper */
.swiper {
    width: 100%;
    overflow-x: scroll !important;
  }

.swiper-slide {
    width: 272px !important;
    height: 375.75px;
}

.swiper-slide > a {
    display: block;
    transform: scale(0.9);
    width: 272px;
    height: 375.75px;
}


/* Media Queries for Responsiveness */
@media (min-width: 1690px) {
    .swiper-wrapper {
        justify-content:center;
    }
}

@media (max-width: 992px) {
    nav .left a {
        font-size: 1.25rem;
    }

    nav .right a {
        font-size: 1rem;
        margin: 0 0.5rem;
    }

    #about-section .headshot {
        width: 18rem;
        height: 18rem;
    }

    #projects-section .project-box {
        flex: 0 0 14rem; /* Adjust width for smaller screens */
    }

    #skills-section i {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav .left a {
        font-size: 1.25rem;
    }

    nav .right a {
        font-size: 1.1rem;
        margin: 0 0.375rem;
    }

    #about-section .headshot {
        width: 16rem;
        height: 16rem;
    }

    #projects-section .project-box {
        flex: 0 0 14rem;
    }

    #skills-section i {
        font-size: 2rem;
    }

    #skills-section .skills-container {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
     }
}

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

    nav .left a {
        font-size: 1.1rem;
    }

    nav .right a {
        font-size: 0.8rem;
        margin: 0 0.25rem;
    }

    #about-section .social-links {
        font-size: 1.75rem;
    }

    #about-section .headshot {
        width: 12rem;
        height: 12rem;
    }

    #projects-section .project-box {
        flex: 0 0 14rem;
    }

    #skills-section i {
        font-size: 2rem;
    }

    #skills-section .skills-container,
    #skills-section .skill-group-roadmap .skills-container {
       grid-template-columns: repeat(2, minmax(0, 1fr));
       gap: 1rem;
    }

    section {
        padding: 6rem 1rem; /* Adjust padding for smaller screens */
    }

    #projects-section {
        padding: 6rem 1rem; /* Adjust padding for smaller screens */
    }

    #leave-message-section {
        padding: 3rem 1rem; /* Adjust padding for smaller screens */
    }
}

/* Leave a message: preserve the font and use the page's theme colors. */
#leave-message-section .message-form {
    width: 100%;
    max-width: 36rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

#leave-message-section .message-form label {
    font: inherit;
    color: var(--text-color);
    margin-top: 0.5rem;
}

#leave-message-section .message-form input,
#leave-message-section .message-form textarea,
#leave-message-section .message-form button {
    font: inherit;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    min-width: 0;
}

#leave-message-section .message-form input,
#leave-message-section .message-form textarea {
    width: 100%;
    background-color: var(--surface-color);
    caret-color: var(--accent-color);
}

#leave-message-section .message-form textarea {
    resize: vertical;
}

#leave-message-section .message-form button {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--background-color);
    align-self: flex-start;
    margin-top: 0.5rem;
    cursor: pointer;
}

#leave-message-section .message-form button:hover {
    background-color: var(--hologram-color);
}

#leave-message-section .message-form button:disabled {
    cursor: wait;
    opacity: 0.75;
}

#leave-message-section .message-form[aria-busy="true"] button::before {
    content: '';
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    margin-right: 0.6em;
    vertical-align: -0.05em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: message-spin 0.8s linear infinite;
}

#leave-message-section .message-form :focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
}

#message-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.message-toast {
    --toast-accent: var(--accent-color);
    position: fixed;
    z-index: 2000;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    width: min(26rem, calc(100vw - 2rem));
    padding: 1rem;
    background-color: var(--surface-color);
    color: var(--text-color);
    border: 1px solid var(--toast-accent);
    border-radius: 0.9rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    text-align: left;
    animation: message-toast-enter 0.22s ease-out;
}

.message-toast[hidden] {
    display: none;
}

.message-toast[data-state="error"] {
    --toast-accent: #ffbbb4;
}

.message-toast-icon {
    display: grid;
    place-items: center;
    flex: 0 0 1.9rem;
    height: 1.9rem;
    border: 1px solid var(--toast-accent);
    border-radius: 50%;
    color: var(--toast-accent);
    font: 600 1rem system-ui, sans-serif;
}

.message-toast-text {
    flex: 1;
    min-width: 0;
    font: inherit;
    font-size: 1rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.message-toast-close {
    flex: 0 0 1.9rem;
    min-height: 1.9rem;
    color: var(--text-color);
    background: transparent;
    border: 0;
    border-radius: 0.25rem;
    cursor: pointer;
    font: 1.35rem system-ui, sans-serif;
}

.message-toast-close:hover {
    color: var(--toast-accent);
}

.message-toast-close:focus-visible {
    outline: 2px solid var(--toast-accent);
    outline-offset: 2px;
}

@keyframes message-spin {
    to { transform: rotate(360deg); }
}

@keyframes message-toast-enter {
    from { opacity: 0; transform: translateY(0.5rem); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .message-toast,
    #leave-message-section .message-form[aria-busy="true"] button::before {
        animation: none;
    }
}

/* Keep the open profile footprint with a restrained mint glow on navy. */
#about-section .headshot.hologram {
    position: relative;
    isolation: isolate;
    overflow: visible;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

#about-section .headshot.hologram::before {
    content: '';
    position: absolute;
    inset: -4% -10%;
    z-index: -1;
    background: radial-gradient(ellipse at center,
        rgba(var(--hologram-rgb), 0.12) 0%,
        rgba(var(--hologram-rgb), 0.045) 38%,
        rgba(var(--hologram-rgb), 0) 68%);
    filter: blur(16px);
    pointer-events: none;
}

#about-section .headshot.hologram picture {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

/* Keep the portrait's transparent point pattern in the static fallback. */
#about-section .headshot.hologram picture::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--hologram-color);
    mask-image: url('images/headshot-portrait-hologram.webp');
    mask-mode: luminance;
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    pointer-events: none;
}

#about-section .headshot.hologram img {
    opacity: 0;
    border-radius: 0;
}

#about-section .headshot.hologram img:hover {
    transform: none;
}

#about-section .headshot.hologram.hologram-ready picture {
    visibility: hidden;
}

#about-section .hologram-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none;
    border-radius: 0;
}

#about-section .hologram-canvas[hidden] {
    display: none;
}

#about-section .hologram-canvas:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: -6px;
}
