/* Root Library - Stays global */
:root {
    --nav: #000000;
    --header: #2A2F2D;
    --accent: #C89A5B;
    --accent1: #5c4423;
    --bg: #000000;
    --card1: #2A2F2D;
    --card2: #000000;
    --ink: #ffffff;
    --muted: #f5deb3;
    --border: #E1E7EF;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(255, 255, 255, 0.537), 0 6px 18px rgba(240, 237, 237, 0.06);
    --maxw: 1100px;
    --link: wheat;
    --font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
}

/* =========================================
   BASE STYLES (Mobile First)
   ========================================= */

body {
    padding-top: 100px;
    font-family: var(--font);
    margin: 1rem 0;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

body.home {
    background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,1)), url("../images/bg3.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Header & Navigation */
.header-bar {
    background: rgba(50, 36, 13, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

#course-title {
    display: block;
    margin: 1rem;
    text-align: center;
    font-weight: 900;
    color: var(--ink);
    font-size: clamp(1.1rem, 2vw + .6rem, 1.6rem);
}
/* --- Mobile Navigation & Hamburger --- */
.navigation {
    background: var(--nav);
    width: 100%;
    display: flex;
    flex-direction: column;
}

#menu {
    display: block;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0.5rem 1rem;
    text-align: right;
}

#menu::before { content: "☰"; }
#menu.open::before { content: "❌"; }

.navigation ul {
    display: none; /* Hidden on mobile by default */
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    background: var(--nav);
    flex-direction: column;
}

.navigation ul.open {
    display: flex; /* Shown when toggled */
}

.navigation a {
    display: block;
    color: #E6EEF7;
    text-decoration: none;
    padding: 1rem;
    text-align: center;
    border-bottom: 2px solid transparent;
}

.navigation a.active {
    color: var(--accent);
    font-weight: 900;
    border-bottom: 2px solid var(--accent);
}


/* Container & Grid */
.container {
    max-width: var(--maxw);
    margin: 1rem auto 2rem;
    padding: 0 1rem;
}

.container-grid {
    display: flex;
    flex-direction: column; /* Stacked on mobile */
    gap: 1.5rem;
    padding-bottom: 2rem;
}

/* Cards */
.card-title {
    margin: 0;
    padding: .75rem 1rem;
    background: var(--header);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 900;
    border-bottom: 1px solid var(--border);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card1, .card2 {
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.about { padding: 1rem; }
.about-text p { text-align: justify; hyphens: auto; }

.subheading {
    margin: 1rem 0 .5rem;
    font-size: 1.05rem;
    font-weight: 900;
    color: wheat;
    position: relative;
}

.subheading::after {
    content: "";
    display: block;
    height: 2px;
    background: var(--border);
    margin-top: .5rem;
}

.about-photo img {
    width: 100%;
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Course List & Filters */
#course-list {
    display: grid;
    grid-template-columns: 1fr; /* Stacked on mobile */
    gap: 1rem;
    margin-top: 1rem;
}

.course-card {
    padding: 1rem;
    border-radius: 8px;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    box-shadow: var(--shadow);
    text-align: center;


    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    max-height: 2px;
}

.course-card.completed {
    background-color: #2A2F2D;
    color: white;
}

.course-card.completed::after {
    content: " ✓";
    font-weight: bold;
}

.filters {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 0.3rem;
    margin: 1.5rem 0;
}

.filters button {
    color: var(--ink);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font);
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(rgba(167, 167, 167, 0.438), rgba(0,0,0,1));
    backdrop-filter: blur(12px);
    border: none;
    transition: all 0.3s ease;
}

 /* Hover effect and focus state */

.filters button:hover, .filters button:focus {
    color: var(--accent); 
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}


#total-credits{
    padding-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    font-weight: 900;
    color: var(--accent);
}

/* Social & Footer */
.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.social-icons a {
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    /* color: #ffffff; */
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    border: none;
    font-size: 2rem;
    
}

.social-icons a:hover {
    background-color: var(--accent);
    color: var(--ink2);
    transform: translateY(-3px);
    border: none;
} 

/* This part helps me manipulate the color and size of the svg */
.social-icons img {
    filter: brightness(0) invert(1);
    width: 50px;
}

/* ============================ */
/*            Dialog            */
/* ============================ */

dialog {
  border: 1px solid rgb(0 0 0 / 10%);
  border-radius: .25rem;
  padding: 1rem;
  background-color: #fff;
  box-shadow: 0 0 .5rem #777;
  width: 70%;
  max-width: 600px;
}

/* dialog h2{
    background-color: #000000;
    color: #E1E7EF;
} */

::backdrop {
  background-color: rgb(0 0 0 / 50%);
}

dialog button {
  position: absolute;
  top: 23px;
  right: 23px;
  padding: .5rem 1rem;
  border: 1px solid rgb(0 0 0 / 10%);
}


.footer1 {
    background: var(--nav);
    color: #E6EEF7;
    text-align: center;
    padding: 1rem .75rem .5rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

 .lastmod {
    color: var(--accent);
    font-weight: 300;
    letter-spacing: .2px;

} 
