/* ======================================
   CPIT 405 ASSIGNMENT 1 - PERSONAL WEBSITE
   Student: Abrar Murif Almalki
   ====================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
}

/* ----- BACKGROUND IMAGE  ---- */
body {
    background-image: url('geometric-leaves.webp');
    background-repeat: repeat;           
    background-size: auto;               
    background-attachment: fixed;       
    background-color: #e8d5f5;         
    background-blend-mode: overlay;     
    
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- REMOVE UNDERLINE FROM ALL LINKS ---- */
a {
    text-decoration: none !important;
}

/* ----STICKY HEADER --- */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(60, 30, 80, 0.95); 
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    padding: 0.7rem 2.5rem;
    border-bottom: 3px solid #cfa9e8;
    box-shadow: 0 6px 15px rgba(90, 40, 120, 0.25);
    width: 100%;
    flex-wrap: wrap;
}

/* Profile image in header */
.header-profile img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #e7c6ff;
    margin-right: 2rem;
    transition: transform 0.2s ease, border-color 0.2s;
    object-fit: cover;
    animation: borderAnimation 3s infinite;
}

/* Remove hover on mobile */
@media (min-width: 769px) {
    .header-profile img:hover {
        transform: scale(1.05);
    }
}

/* Navigation bar */
.navbar {
    flex: 1;
}

.navbar ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.navbar a {
    color: #f3e7ff;
    font-weight: 600;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.25s, border-bottom 0.25s;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
    display: inline-block;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .navbar a:hover {
        color: #ffdcaa;                      
        border-bottom-color: #deaaff;
    }
}

.navbar a.active {
    color: #f5cdff;
    border-bottom-color: #cb9eff;
}

/* ------ FLEXBOX (Requirement) ------ */
.page-container {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
}

/* ---------- LEFT SIDEBAR ------------ */
.sidebar-left {
    flex: 0 0 240px;
    background: rgba(255, 240, 255, 0.5);    
    backdrop-filter: blur(4px);
    padding: 2rem 1.2rem;
    border-radius: 32px;
    box-shadow: 0 12px 28px rgba(110, 50, 140, 0.15);
    text-align: center;
    height: fit-content;
    border: 2px solid rgba(220, 180, 255, 0.5);
}

/* Large profile picture */
.profile-pic-large {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #b47bd6;
    margin-bottom: 1.2rem;
    box-shadow: 0 8px 18px #d9b0f0;
    transition: border-color 0.4s;
    animation: borderAnimation 3s infinite;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .profile-pic-large:hover {
        animation: borderColorChange 4s infinite;
    }
}

/* Sidebar links */
.sidebar-left a {
    color: #4b2e5c;
    font-weight: 550;
    display: inline-block;
    margin: 0.5rem 0;
    transition: color 0.2s, transform 0.2s;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .sidebar-left a:hover {
        color: #7e3f97;
        transform: translateX(4px);
    }
}

/* Email and phone icons */
.contact-info-side i {
    margin-right: 8px;
    color: #77559e;
}

/* ---------- SOCIAL MEDIA ICONS ---------- */
.social-side {
    margin-top: 1.8rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-icon {
    font-size: 2.2rem;
    color: #3c2152;
    transition: all 0.2s ease-in-out;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .social-icon:hover {
        color: #a05fc5;                        
        transform: scale(1.25) rotate(2deg);
    }
}

/* ---------- FRAGMENT LINK ---------- */
.fragment-link-container {
    margin-top: 1.5rem;
}

.fragment-link {
    background-color: #dbc3f0;               
    color: #2b0f3a !important;
    padding: 0.6rem 1rem;
    border-radius: 60px;
    font-size: 0.95rem;
    border: 2px dotted #935eb9;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 3px 0 #b18bcf;
    transition: all 0.3s ease-in-out;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .fragment-link:hover {
        background-color: #b58ad4;
        color: #14081d !important;
        box-shadow: 0 5px 0 #6f4791;
        transform: translateY(-2px);
    }
}

/* ------ MAIN CONTENT AREA ----- */
.content-area {
    flex: 1;
    background: rgba(255, 250, 255, 0.7);     
    backdrop-filter: blur(5px);
    padding: 2.2rem 3rem;
    border-radius: 48px;
    box-shadow: 0 20px 40px rgba(105, 50, 140, 0.15);
    border: 1px solid #eeddff;
    overflow-x: auto; /* Prevents content overflow */
}

/* ---------- HOME PAGE---------- */
.name-title {
    font-size: 3rem;
    color: #342056;
    margin-bottom: 0.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subhead {
    color: #6f4f8a;
    border-left: 6px solid #bb9bda;
    padding-left: 1.5rem;
    margin: 0.5rem 0 2rem 0;
    font-size: 1.3rem;
}

/* ---------- ABOUT ME ---------- */
.about-card {
    background: rgba(235, 215, 250, 0.3);
    border-radius: 40px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    position: relative;                       
}

.about-card::before {
    content: "“";
    font-size: 5rem;
    color: #d4b0f0;
    position: absolute;
    top: -15px;
    left: 10px;
    opacity: 0.5;
    font-family: 'Georgia', serif;
    z-index: 0;
}

.about-card::after {
    content: "”";
    font-size: 5rem;
    color: #d4b0f0;
    position: absolute;
    bottom: -25px;
    right: 10px;
    opacity: 0.5;
    font-family: 'Georgia', serif;
    z-index: 0;
}

.about-paragraph::first-letter {
    font-size: 4rem !important;
    font-weight: 800;
    color: #8054a3;
    float: left;
    line-height: 0.8;
    margin-right: 12px;
    font-family: 'Georgia', serif;
    text-shadow: 2px 2px 4px #d6b0f0;
}

.about-paragraph {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Education and Skills section */
.edu-skills {
    display: flex;
    gap: 2.5rem;
    margin: 2.5rem 0;
}

.education, .skills, .projects-section {
    flex: 1;
    background: #f7ecfe;
    padding: 1.5rem;
    border-radius: 32px;
    box-shadow: inset 0 2px 8px #e7d0fc;
}

.education h3, .skills h3 {
    color: #48286b;
    margin-bottom: 1rem;
}

.skills ul {
    list-style-type: "🪻 ";
    padding-left: 2rem;
}

.skills li {
    margin: 0.5rem 0;
}

/* --- PROJECTS SECTION ------ */
.projects-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px dashed #b385d0;
}

.projects-section h2 {
    color: #48286b;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.projects-section-card {
    background: #d4b0f0;      
    border-radius: 40px;
    padding: 2rem 2.5rem;
    border: 2px solid #deaaff;  
    box-shadow: 0 8px 20px rgba(230, 180, 255, 0.3);
}

.projects-list ul {
    list-style-type: "🪻 ";
    padding-left: 2rem;
    margin-bottom: 2rem;
}

.projects-list li {
    margin: 0.8rem 0;
    font-size: 1.1rem;
    color: #342056;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #d9b0f0;
    transition: transform 0.2s ease;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .projects-list li:hover {
        transform: translateX(8px);
        color: #8b5faf;
        border-bottom-color: #b58ad4;
    }
}

.project-link-container {
    text-align: center;
    margin: 1.5rem 0 0.5rem;
}

.project-folder-link {
    display: inline-block;
    background-color: #6a3c8c;
    color: white !important;
    padding: 1rem 2.5rem;
    border-radius: 60px;
    font-weight: 600;
    font-size: 1.2rem;
    border: 2px solid #b58ad4;
    transition: all 0.3s ease;
    text-decoration: none !important;
    box-shadow: 0 4px 0 #3b2550;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .project-folder-link:hover {
        background-color: #8b5faf;
        transform: translateY(-3px);
        box-shadow: 0 7px 0 #4d2f63;
    }
}

/* --------AVAILABILITY SECTION-------- */
.availability-section {
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 2px solid #b385d0;
}

.availability-section h2 {
    color: #48286b;
    margin-bottom: 1.2rem;
}

.status-card {
    background: rgba(255, 240, 255, 0.6);
    backdrop-filter: blur(4px);
    padding: 1.8rem;
    border-radius: 32px;
    border: 1px solid #dac0f0;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.status-card p {
    margin: 1rem 0;
    font-size: 1.1rem;
    color: #2d1a3a;
}

.status-badge {
    display: inline-block;
    background: #e7d0fc;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    margin-right: 0.8rem;
    font-weight: 600;
    color: #3b1e52;
}

.status-badge.available {
    background: #b8e0b8;
    color: #1a4a1a;
}

/* ---------- SCHEDULE PAGE----- */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 24px;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.schedule-table, .courses-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0 1rem;
    background: #faf3ff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(155, 100, 200, 0.2);
}

.schedule-table h2 {
    color: #431f60;
    margin-top: 2.5rem;
}

.schedule-table th, .schedule-table td, 
.courses-table th, .courses-table td {
    border: 1px solid #cfb0ec;
    padding: 14px 10px;
    text-align: left;
    white-space: nowrap; /* Prevents text wrapping in table cells */
}

/* Allow text wrap on mobile for better readability */
@media (max-width: 768px) {
    .schedule-table th, .schedule-table td, 
    .courses-table th, .courses-table td {
        white-space: normal;
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}

.schedule-table thead, .courses-table thead {
    background-color: #643a7a;               
    color: #f3e5ff;
    font-size: 1.1rem;
}

.schedule-table tbody tr:nth-child(odd),
.courses-table tbody tr:nth-child(odd) {
    background-color: #edddfa;                
}

.courses-table tbody tr:nth-child(even) {
    background-color: #ffffff;                
}

/* Hover effects - desktop only */
@media (min-width: 769px) {
    .schedule-table tbody tr:nth-child(odd):hover,
    .courses-table tbody tr:nth-child(odd):hover {
        background-color: #cbacf2;                 
        color: #1d102b;
        transition: 0.15s;
    }
    
    .schedule-table tbody tr:nth-child(even):hover,
    .courses-table tbody tr:nth-child(even):hover {
        background-color: #f2d5f2;                
        color: #2d1a3a;
    }
}

.schedule-table th[rowspan] {
    background-color: #e5d0ff;
    color: #3a2852;
    font-weight: 700;
}

/* Courses I Took section */
.courses-took h3 {
    color: #431f60;
    margin-top: 2.5rem;
}

/* ---------- CONTACT PAGE ---------- */
.contact-form {
    background: rgba(250, 240, 255, 0.6);
    padding: 2rem;
    border-radius: 36px;
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #43285c;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #dac0f0;
    border-radius: 60px;
    font-size: 1rem;
    background: #fff9ff;
    transition: 0.2s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #aa73d1;
    box-shadow: 0 0 0 5px rgba(170, 115, 209, 0.2);
}

textarea {
    border-radius: 28px;
    resize: vertical;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.radio-group span {
    font-weight: 600;
    color: #3b2550;
}

.radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    margin-right: 1rem;
}

.submit-btn {
    background-color: #6a3c8c;
    border: none;
    color: white;
    padding: 16px 36px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 80px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 0 #3b2550;
}

/* Desktop hover only */
@media (min-width: 769px) {
    .submit-btn:hover {
        background-color: #8b5faf;                  
        transform: scale(1.02) translateY(-3px);
        box-shadow: 0 8px 0 #4d2f63;
    }
}

/* FOOTER */
footer {
    background: #341f47;                       
    color: #e1cef2;
    text-align: center;
    padding: 1.3rem;
    font-size: 1rem;
    margin-top: auto;
    width: 100%;
    border-top: 3px solid #b18bcf;
}

/* Media Queries */
@media (max-width: 900px) {
    .page-container {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .sidebar-left {
        flex: auto;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .profile-pic-large {
        width: 100px;
        height: 100px;
    }
    
    .content-area {
        padding: 1.5rem;
    }
    
    .sticky-header {
        padding: 0.5rem 1rem;
        flex-wrap: wrap;
    }
    
    .navbar ul {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .navbar a {
        font-size: 1rem;
        padding: 0.3rem 0;
    }
    
    .header-profile img {
        margin-right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 550px) {
    .edu-skills {
        flex-direction: column;
        gap: 1rem;
    }
    
    .name-title {
        font-size: 2rem;
    }
    
    .subhead {
        font-size: 1.1rem;
        padding-left: 1rem;
    }
    
    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .projects-section-card {
        padding: 1.5rem;
    }
    
    .project-folder-link {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .schedule-table th, .schedule-table td {
        padding: 8px 5px;
        font-size: 0.85rem;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .sticky-header {
        justify-content: center;
        text-align: center;
    }
    
    .header-profile img {
        margin-right: 0.5rem;
    }
    
    .navbar ul {
        justify-content: center;
        gap: 0.8rem;
    }
    
    .navbar a {
        font-size: 0.9rem;
    }
    
    .content-area {
        padding: 1rem;
        border-radius: 32px;
    }
    
    .about-card {
        padding: 1rem;
    }
    
    .about-paragraph::first-letter {
        font-size: 3rem !important;
    }
}

/* ---------- BONUS ANIMATIONS ---------- */
@keyframes borderAnimation {
    0% { border-color: #e8d6f0; }
    25% { border-color: #ad64cf; }
    50% { border-color: #61297c; }
    75% { border-color: #30123f; }
    100% { border-color: #110216; }
}

button, .submit-btn, .fragment-link {
    transition: all 0.3s ease-in-out;
}
