/* Reset & CSS Custom Properties */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}

:root {
    --bg-main: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-border: rgba(255, 255, 255, 0.06);
    --text-main: #fafafa;
    --text-muted: #9ca3af;
    --brand: #22c55e;
    --brand-hover: #16a34a;
    --brand-glow: rgba(34, 197, 94, 0.15);
    --font-sans: "Inter", system-ui, sans-serif;
    --font-serif: "Playfair Display", Georgia, serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--brand);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-hover);
}

/* Noise Texture Overlay */
.noise-overlay::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 100;
}

/* Animated Gradient Hero BG */
.hero-gradient {
    background:
        radial-gradient(
            ellipse 80% 50% at 50% -20%,
            rgba(34, 197, 94, 0.15),
            transparent
        ),
        radial-gradient(
            ellipse 60% 40% at 80% 60%,
            rgba(34, 197, 94, 0.05),
            transparent
        ),
        radial-gradient(
            ellipse 60% 40% at 10% 80%,
            rgba(34, 197, 94, 0.05),
            transparent
        ),
        #0a0a0a; /* <--- Append your base background color here as the final layer */
}

/* Layout Components */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-b: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo-container {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-heading span {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand);
    font-weight: 600;
}

.site-heading p {
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
}

/* Navigation Menu */
.navigation ul {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.navigation a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navigation a:hover,
.navigation a.current {
    color: var(--brand);
}

/* Hamburger & Responsive Navigation Mapping */
.hamburger {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}
.hamburger::before {
    content: "\2630";
    font-size: 1.75rem;
}
.hamburger.show::before {
    content: "\00D7";
}

/* Main Frame Area */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 7rem 1.5rem 3rem 1.5rem;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 5rem;
}

@media (min-width: 768px) {
    .hero-layout {
        grid-template-columns: 3fr 2fr;
    }
}

h1.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h1 .dot {
    color: var(--brand);
}

/* Section Aesthetics */
section {
    margin-bottom: 5rem;
}

section h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--brand);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

section h2::before {
    content: "";
    display: inline-block;
    width: 2rem;
    height: 2px;
    background: var(--brand);
}

.about-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

/* Profile Frame Glow effect */
.photo-frame {
    position: relative;
    width: max-content;
    margin: 0 auto;
}

.photo-frame::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 1.25rem;
    background: linear-gradient(
        135deg,
        var(--brand),
        #16a34a,
        #15803d,
        var(--brand)
    );
    background-size: 300% 300%;
    animation: gradientShift 4s ease infinite;
    z-index: -1;
    opacity: 0.5;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.photo-frame img {
    max-width: 100%;
    width: 280px;
    height: auto;
    border-radius: 1.25rem;
    object-fit: cover;
    aspect-ratio: 3/4;
    display: block;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Course Filtering Components */
.filter-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-buttons button {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    border: 1px solid var(--bg-card-border);
    background-color: var(--bg-card);
    color: var(--text-muted);
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-buttons button:hover,
.filter-buttons button.active {
    background-color: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.3);
}

.courses-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

/* Course Buttons Styling mimicking Cards */
.course-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    color: white;
    border-radius: 1rem;
    padding: 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.course-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #eab308, #facc15);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.course-btn:hover::before {
    transform: scaleX(1);
}

.course-btn:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.course-btn.completed::before {
    background: linear-gradient(90deg, var(--brand), #4ade80);
}

.course-btn.completed {
    border-left: 4px solid var(--brand);
}

#total-credits {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand);
    padding: 1rem 1.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 2rem;
    display: inline-block;
}

/* Native Accessible Dialog Modal Architecture */
.course-modal {
    border: 1px solid var(--bg-card-border);
    border-radius: 1rem;
    background: #121212;
    color: white;
    max-width: 500px;
    width: 90%;
    margin: auto;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.course-modal::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
}

.close-modal-btn {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-muted);
    cursor: pointer;
}
.close-modal-btn:hover {
    color: white;
}

.modal-card-header h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: white;
    margin-bottom: 0.5rem;
}
.modal-card-header h2::before {
    display: none;
}
.modal-card-body h3 {
    font-size: 1.15rem;
    color: var(--brand);
    margin-bottom: 1rem;
}
.modal-card-body p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.modal-card-body strong {
    color: white;
}

.github-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    background: var(--brand);
    color: black;
    text-decoration: none;
    font-weight: 600;
    border-radius: 2rem;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}
.github-link:hover {
    background: var(--brand-hover);
}

/* Footer Aesthetics */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 1.5rem;
    text-align: center;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    transition: all 0.3s ease;
}

.social a:hover {
    border-color: var(--brand);
    background: var(--brand-glow);
    transform: translateY(-2px);
}

.social img {
    width: 1.25rem;
    height: 1.25rem;
}

footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
}
