/* MODERN CSS RESET */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Soft, Professional Color Palette */
    --bg-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary-color: #6366f1;
    /* Indigo */
    --primary-hover: #4f46e5;
    --accent-color: #8b5cf6;
    /* Violet */
    --divider-color: #e2e8f0;

    --header-bg: rgba(255, 255, 255, 0.85);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --transition: all 0.3s ease;
    --border-radius: 12px;
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --surface-color: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --divider-color: #334155;
    
    --header-bg: rgba(30, 41, 59, 0.85);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-color);
}

body {
    line-height: 1.6;
    overflow-x: hidden;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

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

/* REUSABLE UTILITIES */
.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: white !important;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-block;
    background-color: var(--surface-color);
    color: var(--text-primary) !important;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid var(--divider-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* HEADER & NAVIGATION */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--divider-color);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* THEME TOGGLE */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* SECTION COMMONS */
section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.divider {
    height: 4px;
    width: 60px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* HERO SECTION */
.hero-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 8rem;
    /* Account for fixed header */
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-pic {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    animation: fadeSelf 1s ease-out forwards;
}

.profile-img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    border: 8px solid var(--surface-color);
}

.img-backdrop {
    position: absolute;
    width: 320px;
    height: 320px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    z-index: 1;
    top: 20px;
    left: calc(50% + 10px);
    transform: translateX(-50%);
    opacity: 0.2;
}

/* ABOUT SECTION */
.about-container {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    padding: 5rem 3rem;
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.about-text-card {
    max-width: 800px;
    margin: 0 auto;
}

.about-text-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    text-align: center;
}

.about-text-card p:last-child {
    margin-bottom: 0;
}

/* COURSES SECTION */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.course-card {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--divider-color);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.course-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.course-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.course-card p {
    color: var(--text-secondary);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.course-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.course-link:hover {
    color: var(--primary-hover);
    padding-left: 5px;
}

/* HAMBURGER MENU */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    /* Above nav links */
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-primary);
    border-radius: 2px;
}

/* TYPING CURSOR */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 4px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* SCROLL REVEAL ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.courses-grid .course-card.reveal:nth-child(2) {
    transition-delay: 0.15s;
}

.courses-grid .course-card.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

/* FOOTER */
.footer {
    background-color: #0f172a;
    color: white;
    padding: 4rem 2rem 2rem;
    text-align: center;
    margin-top: 4rem;
}

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-content p {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* VISITOR COUNTER */
.visitor-counter {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ANIMATIONS */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeSelf {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-pic {
        margin-bottom: 2rem;
    }

    .profile-img {
        width: 250px;
        height: 250px;
        object-position: 50% 15%;
        /* Keep focus on the upper part/head */
    }

    .img-backdrop {
        width: 250px;
        height: 250px;
        left: 50%;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        justify-content: center;
        padding-top: 60px;
        /* Space for the header */
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .nav-links a.btn-primary {
        display: inline-block;
        margin-top: 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-container {
        padding: 3rem 1.5rem;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}