/* Custom Font Definition */
@font-face {
    font-family: 'Citadel Script';
    src: url('assets/fonts/CitadelScriptStd.otf') format('opentype'); /* Path to your font file */
    font-weight: normal;
    font-style: normal;
}

html {
    scroll-behavior: smooth;
}

/* Basic Styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #121212; 
    color: #f0f0f0;
    user-select: none;
}

/* ---- Loading Screen ---- */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #121212;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensures it's on top of everything */
    transition: opacity 0.5s ease;
}

.loader {
    border: 5px solid #333; /* The track of the spinner */
    border-top: 5px solid #fff; /* The moving part of the spinner */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

/* Class to hide the loader */
#loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden; /* Makes it non-interactive during fade-out */
}

/* The spinning animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Site Content Fade-In Styling */
#site-content {
    opacity: 0; /* Start with the content invisible */
    transition: opacity 0.8s ease-in-out; /* Define the fade animation */
}

/* Class to trigger the fade-in */
#site-content.loaded {
    opacity: 1; /* Make the content visible */
}

/* Full-Screen Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-title {
    display: flex;
    flex-direction: column; /* Stacks the text blocks vertically */
    align-items: flex-start; /* Aligns items to the start (left) */
    margin: 0;
    padding: 0;
}

.intro-text {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 4rem;
    color: #ffffff;
    line-height: 1.2;
    text-align: left;
}

.name-text {
    font-family: 'Citadel Script', cursive; /* Use the custom font */
    font-weight: 400;
    font-size: 10rem; /* Adjust size as needed */
    color: #ffffff;
    line-height: 1;
    margin-top: -1.5rem; /* Negative margin to pull it up, overlapping slightly */
}

/* Scroll Down Arrow Styling */
.scroll-down-arrow {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 22px;
    background-color: #fff;
    opacity: 0.7;
    cursor: pointer;
    animation: subtle-float 2.5s infinite ease-in-out;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Arrowhead created with a pseudo-element */
.scroll-down-arrow::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0px;
    width: 14px; /* Slightly larger head to match bolder line */
    height: 14px;
    border-left: 3px solid #fff; /* Bolder arrowhead (was 2px) */
    border-bottom: 3px solid #fff; /* Bolder arrowhead (was 2px) */
    transform: translateX(-50%) rotate(-45deg);
}

.scroll-down-arrow:hover {
    opacity: 1;
}

/* Class added by JavaScript to hide the arrow */
.scroll-down-arrow.fade-out {
    opacity: 0;
    transform: translate(-50%, 20px); /* Move down slightly as it fades */
    animation: none; /* Stop the animation when hidden */
}

/* Subtle Floating Animation */
@keyframes subtle-float {
    0% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 5px);
    }
    100% {
        transform: translate(-50%, 0);
    }
}

/* Container for the rest of the content */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #121212;  
}

/* Section Styling */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid #222; /* Very subtle border for dark mode */
}

.section:last-child {
    border-bottom: none;
}

/* Typography for content sections */
h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    color: #ffffff;
}

p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.text-center {
    text-align: center;
}

.caption {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Links */
a {
    color: #ccc; /* A brighter blue for better contrast */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

/* Container to center the button */
.button-container {
    text-align: center;
    margin-top: 3rem; /* Space above the button */
}

/* Call-to-Action Button Styling */
.cta-button {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    background-color: transparent;
    border: 2px solid #fff;
    border-radius: 8px;
    padding: 0.8rem 2rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.cta-button:hover {
    background-color: #fff;
    color: #000;
}

/* --- Qualifications Section Styling --- */
.qualifications {
    margin-top: 4rem;
    padding-top: 3rem;
}

.qualifications h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin-bottom: 2.5rem;
}

.qualifications-list {
    display: grid;
    gap: 2rem 3rem; /* row-gap and column-gap */
    grid-template-areas:
        "gpa"
        "experience"
        "courses"; /* Mobile-first: default to a single column */
}

/* Assign grid areas to the items */
.gpa-item { grid-area: gpa; }
.experience-item { grid-area: experience; }
.coursework-item { grid-area: courses; }

.qualification-item h4 {
    font-size: 1.2rem;
    color: #ffffff; /* Use your accent color */
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 0.5rem;
}

.qualification-item ul {
    list-style: none;
    padding-left: 0;
}

.qualification-item li {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted #222;
}

.qualification-item li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.qualification-item li strong {
    color: #fff;
    font-weight: 700;
    padding-left: 1rem; /* Space between item and grade/score */
}

/* Special style for the GPA paragraph */
#gpa-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.qualification-item p.school-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
    margin-top: -0.3rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.experience-item h4 { margin-bottom: 0.5rem; }

.experience-accordion { width: 100%; }

.accordion-item {
    border-bottom: 1px dotted #222;
}

.accordion-item:last-child {
    border-bottom: none;
}

/* Style the button that triggers the dropdown */
.accordion-toggle {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 1rem 0;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #ccc;
    cursor: pointer;
    position: relative;
    padding-left: 1.5rem; /* Space for the icon */
    transition: color 0.3s ease;
}

.accordion-toggle:hover {
    color: #fff;
}

/* The '+' and '-' icon */
.accordion-toggle::before {
    content: '+';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #666;
    transition: transform 0.3s ease;
}

.accordion-toggle[aria-expanded="true"]::before {
    transform: translateY(-50%) rotate(45deg); /* Turns '+' into 'x' */
}

/* The dropdown content area */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content ul {
    list-style: disc; /* Use standard disc bullets for sub-points */
    padding-left: 2.5rem;
    padding-bottom: 1rem;
}

.accordion-content li {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.coursework-table {
    width: 100%;
    border-collapse: collapse; /* Removes default table spacing */
    margin-top: 1.5rem;
}

/* Style the header row (Course, Grade, AP Score) */
.coursework-table thead tr {
    border-bottom: 1px solid #333;
}

.coursework-table th {
    color: #888;
    font-weight: 700;
    font-size: 0.8rem;
    padding-bottom: 1rem;
    text-transform: uppercase;
}

/* Define column widths and alignment */
.course-col { width: 60%; text-align: left;}
.grade-col  { text-align: center; }
.score-col  { text-align: center; }

/* Style the data rows in the table body */
.coursework-table tbody tr {
    border-bottom: 1px dotted #222;
    transition: background-color 0.3s ease;
}

.coursework-table tbody tr:hover {
    background-color: #1a1a1a;
}

.coursework-table tbody tr:last-child {
    border-bottom: none; /* No border on the very last row */
}

.coursework-table td {
    padding: 1rem 0.5rem;
    color: #ccc;
    text-align: left;
    vertical-align: middle;
}

/* Center the text in the grade and score columns */
.coursework-table td:nth-child(2),
.coursework-table td:nth-child(3) {
    text-align: center;
    font-weight: 700;
    color: #fff;
}

/* Style for the N/A scores within the table */
.coursework-table td.na-score {
    color: #777;
    font-weight: 700;
    font-style: italic;
}

/* Tutoring Cards */
.tutoring-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.card {
    background-color: #111;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid #333;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #666;
}

.card-icon {
    font-size: 2.5rem; /* Controls the size of the icon */
    color: #fff;
    margin-bottom: 1.5rem; /* Space between icon and title */
}

.card h3 {
    font-family: 'Inter', sans-serif;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #ffffff;
    font-size: 1.5rem;
}

/* ---- Contact Section ---- */
/* Main container for the contact info */
#contact.section { text-align: center; }

.contact-info {
    position: relative;
    display: flex;
    flex-direction: column; /* Stacks email and icons vertically */
    align-items: center;
    gap: 1.5rem; /* Space between the email and the icon row */
    margin-top: 2rem;
}

/* Styling for the text email link */
.email-link {
    font-size: 1.2rem;
    margin: 0; /* Remove default paragraph margin */
    cursor: pointer;
}

/* Container for the social media icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 2.5rem; /* Space between the icons */
}

/* Styling for the individual icons */
.contact-icon {
    font-size: 2rem;
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

/* The glow effect on hover */
.contact-icon:hover {
    color: #fff;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 35px rgba(255, 255, 255, 0.2);
}

/* "Copied!" Popup Styling */
.copy-popup {
    background-color: #fff;
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
    position: absolute;
    top: -2.5rem; /* Position it just above the email link */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.copy-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* --- Responsive Design for Mobile --- */
@media (max-width: 768px) {

    /* Adjust hero section text for smaller screens */
    .hero-title {
        justify-content: center; /* Center the text block on mobile */
    }

    .intro-text {
        font-size: 3rem; /* Smaller font for the intro text */
        text-align: left;
    }

    .name-text {
        font-size: 6rem; /* Smaller font for the name */
        margin-top: -1rem; /* Adjust overlap for new font size */
    }

    /* Reduce general padding to save space */
    .container {
        padding: 1rem;
    }

    .section {
        padding: 3rem 0; /* Reduce top/bottom padding in sections */
    }

    /* Reduce section header font size */
    h2 {
        font-size: 2rem;
    }
}

@media (min-width: 800px) {
    /* On larger screens, create the multi-column layout */
    .qualifications-list {
        grid-template-columns: 1fr 2fr; /* Two columns */
        grid-template-areas:
            "gpa        experience"
            "courses    courses";
    }
}