* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Images - Make responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.profile-img {
    max-width: 100%;
    height: auto;
}

.logo-img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar Styles */
.navbar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--secondary-color);
    min-width: 200px;
    box-shadow: var(--box-shadow);
    padding: 0.5rem 0;
    top: 100%;
    border-radius: var(--border-radius);
}

.nav-menu .dropdown:hover .dropdown-content {
    display: block;
}

.nav-menu .dropdown-content a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu .dropdown-content a:last-child {
    border-bottom: none;
}

.nav-menu .dropdown-content a:hover {
    background-color: var(--primary-color);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Features Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Units Section */
.units-section {
    margin-bottom: 3rem;
}

.units-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: var(--secondary-color);
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.unit-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.unit-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.unit-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Quick Links */
.quick-links {
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    text-align: center;
}

.quick-links h2 {
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
}

.quick-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.link-icon {
    font-size: 3rem;
}

.link-text {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Unit Content */
.unit-content {
    background-color: var(--white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.unit-content h1 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.unit-content h2 {
    color: var(--secondary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.toc {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.toc h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.toc a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.topic {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light-bg);
}

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

.topic h2 {
    color: var(--secondary-color);
    margin-top: 0;
}

.topic p {
    margin-bottom: 1rem;
}

.topic ul,
.topic ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.topic li {
    margin-bottom: 0.5rem;
}

/* Code Styles */
code {
   background-color: var(--secondary-color);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: var(--danger-color);
}

pre {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table-wrapper {
    overflow-x: auto;
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--light-bg);
}

.download-table th:nth-child(2),
.download-table td:nth-child(2) {
    text-align: left;
}

.practicals-table th:nth-child(1),
.practicals-table td:nth-child(1),
.practicals-table th:nth-child(3),
.practicals-table td:nth-child(3),
.practicals-table th:nth-child(4),
.practicals-table td:nth-child(4) {
    text-align: center;
}

.practicals-table td:nth-child(2) {
    min-width: 420px;
}

.practicals-page [aria-disabled="true"] {
    opacity: 0.7;
    cursor: not-allowed;
}

table th {
    background-color: var(--primary-color);
    color: var(--white);
}

table tr:hover {
    background-color: var(--light-bg);
}

.download-btn {
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

.table-note {
    margin: 0 0 1.5rem 0;
    color: var(--text-light);
}

.practical-code-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #e8f4ff 0%, #f7fbff 100%);
    border-left: 5px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.practical-code-banner h2 {
    margin: 0 0 0.5rem;
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.practical-code-banner p {
    margin: 0;
    color: var(--text-dark);
    max-width: 720px;
}

.practical-code-btn {
    min-width: 220px;
    text-align: center;
    white-space: nowrap;
}

/* Practical Questions */
.practical-question {
    background-color: var(--light-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--success-color);
}

.practical-question h2 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

/* Practical Modules Dropdown */
.practical-dropdown {
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-bg);
    border-radius: var(--border-radius);
    background-color: var(--white);
    overflow: hidden;
}

.practical-dropdown summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 1rem 1.25rem;
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.practical-dropdown summary::-webkit-details-marker {
    display: none;
}

.practical-dropdown summary::after {
    content: "+";
    font-size: 1.3rem;
    line-height: 1;
}

.practical-dropdown[open] summary::after {
    content: "-";
}

.practical-dropdown .table-wrapper {
    padding: 1rem;
    margin-bottom: 0;
}

/* Viva QA */
.viva-qa {
    background-color: var(--light-bg);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.viva-qa h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    cursor: pointer;
}

.viva-qa details {
    cursor: pointer;
}

.viva-qa summary {
    padding: 1rem;
    background-color: var(--white);
    border-radius: 5px;
    user-select: none;
    transition: background-color 0.3s;
}

.viva-qa summary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.viva-qa p {
    margin-top: 1rem;
}

/* Unit Navigation */
.unit-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-bg);
}

.unit-nav .btn {
    flex: 1;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tab Navigation Styles */
.tab-navigation {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--light-bg);
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem;
    cursor: pointer;
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
    bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design - Tablet (768px and below) */
@media (max-width: 768px) {
    html, body {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 0 15px;
    }

    /* Navbar */
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar .container {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo-img {
        height: 40px;
        width: 40px;
    }

    /* Hamburger Menu */
    .hamburger {
        display: flex;
        order: 3;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--secondary-color);
        flex-direction: column;
        gap: 0;
        width: 100%;
        z-index: 99;
        padding: 0;
        order: 4;
        flex-basis: 100%;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-menu.active {
        display: flex;
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 1.5rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    /* Hide desktop dropdown on mobile */
    .about-hover-trigger .about-hover-card {
        display: none !important;
    }

    /* Hero Section */
    .hero {
        padding: 2.5rem 0;
    }

    .hero-content h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cta-buttons .btn {
        width: 100%;
        min-height: 48px;
    }

    /* Feature Cards */
    .features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    /* Grid Layouts */
    .units-grid,
    .links-container,
    .about-info,
    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .practical-module {
        margin-bottom: 2rem;
    }

    /* Unit Content */
    .unit-content {
        padding: 1.5rem;
    }

    .unit-content h1 {
        font-size: 1.75rem;
    }

    .unit-nav {
        flex-direction: column;
    }

    .unit-nav .btn {
        width: 100%;
        min-height: 48px;
    }

    .practical-code-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem;
    }

    .practical-code-btn {
        width: 100%;
        min-width: 0;
    }

    /* Tables */
    table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
    }

    table th,
    table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    .table-wrapper {
        overflow-x: auto;
        margin-bottom: 1.5rem;
        -webkit-overflow-scrolling: touch;
    }

    /* Code blocks */
    pre {
        padding: 1rem;
        font-size: 0.85rem;
        -webkit-overflow-scrolling: touch;
    }

    /* Tabs */
    .tab-navigation {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 100px;
    }

    /* Buttons */
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.95rem;
    }

    .download-btn, .view-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: auto;
    }

    /* About Hover Card */
    .about-hover-card {
        width: 280px;
        right: -50px;
    }

    /* Viva QA */
    .viva-qa {
        margin-bottom: 1.5rem;
    }

    .viva-qa h2 {
        font-size: 1.1rem;
    }

    /* Resource Items */
    .resource-item {
        flex-direction: column;
        gap: 1rem;
    }

    .resource-icon {
        width: 100%;
        border-bottom: 1px solid var(--light-bg);
    }
}

/* PPT Section Styles */
.ppt-section {
    margin-bottom: 3rem;
}

.ppt-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
}

.ppt-table tbody td {
    padding: 1.2rem;
}

.ppt-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.ppt-actions .btn {
    min-width: 100px;
}

.note-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.note-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.note-box p {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.note-box p:last-child {
    margin-bottom: 0;
}

/* Intro Box Styles */
.intro-box {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
    border-left: 4px solid #ff9800;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.intro-box p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.7;
}

/* Summary Box Styles */
.summary-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-left: 4px solid #4caf50;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.summary-box h4 {
    color: #2e7d32;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.summary-box ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.summary-box ul:last-child {
    margin-bottom: 0;
}

.summary-box li {
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

/* Styled Table */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.styled-table thead {
    background-color: var(--primary-color);
    color: var(--white);
}

.styled-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.styled-table td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--light-bg);
}

.styled-table tbody tr {
    transition: background-color 0.3s;
}

.styled-table tbody tr:hover {
    background-color: #f9f9f9;
}

.styled-table tbody tr:last-child td {
    border-bottom: none;
}

.styled-table code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

/* Units Table Styles */
.units-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.units-table thead {
    background-color: var(--primary-color);
    color: var(--white);
}

.units-table th {
    padding: 1.2rem;
    text-align: left;
    font-weight: 600;
}

.units-table td {
    padding: 1.2rem;
    border-bottom: 1px solid var(--light-bg);
}

.units-table tbody tr {
    transition: background-color 0.3s;
}

.units-table tbody tr:hover {
    background-color: #f9f9f9;
}

.unit-number {
    font-weight: 600;
    color: var(--primary-color);
}

.unit-title {
    font-weight: 500;
    font-size: 1.1rem;
}

.unit-desc {
    color: var(--text-light);
    font-size: 0.95rem;
}

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

.unit-action .btn {
    display: inline-block;
}

/* Quick Links */
.quick-links {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ecf0f1 0%, #ffffff 100%);
    border-radius: var(--border-radius);
    border-top: 4px solid var(--primary-color);
}

.quick-links h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-link {
    display: block;
    padding: 1rem;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s;
    box-shadow: var(--box-shadow);
}

.quick-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
}

/* About Me Page Styles */
.about-section {
    padding: 2rem 0;
}

.about-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.about-header h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.about-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-top: 4px solid var(--primary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.about-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.teaching-philosophy {
    margin-bottom: 3rem;
}

.teaching-philosophy h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.philosophy-item {
    background: linear-gradient(135deg, #f5f5f5 0%, var(--light-bg) 100%);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}

.philosophy-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.philosophy-item p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.resources-offered {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.resources-offered h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
}

.resources-list {
    display: grid;
    gap: 1.5rem;
}

.resource-item {
    display: flex;
    gap: 1.5rem;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    align-items: flex-start;
}

.resource-icon {
    font-size: 2rem;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resource-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.resource-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 2rem;
}

.contact-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-section p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.contact-info {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

.closing-message {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* About Hover Card - ID Card Style */
.about-hover-trigger {
    position: relative;
}

.about-hover-card {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: linear-gradient(to bottom, #2c3e50 0%, #2c3e50 42%, #ffffff 42%, #ffffff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(52, 152, 219, 0.3);
    width: 320px;
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.3s ease-out;
    border: 3px solid #3498db;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-hover-trigger:hover .about-hover-card {
    display: block;
}

.about-profile-photo {
    background: transparent;
    padding: 1.5rem 1rem 0.5rem;
    text-align: center;
}

.profile-img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid #3498db;
    object-fit: cover;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    background: #fff;
}

.profile-name {
    margin: 0.8rem 0 0;
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 700;
    padding: 0 1rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-role {
    background: #3498db;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0.4rem 1.5rem;
    padding: 0.4rem 1rem;
    text-align: center;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.about-info-compact {
    padding: 0.8rem 1rem 1rem;
    background: #f8f9fa;
    margin: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.about-info-compact p {
    margin: 0.4rem 0;
    font-size: 0.85rem;
    color: #2c3e50;
    text-align: left;
    line-height: 1.6;
}

.about-info-compact strong {
    color: #2c3e50;
    font-weight: 600;
}

.email-link {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid #dee2e6;
}

.email-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.email-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

@media (max-width: 480px) {
    html, body {
        font-size: 13px;
    }

    .container {
        padding: 0 12px;
    }

    /* Navbar */
    .navbar {
        padding: 0.5rem 0;
    }

    .navbar .container {
        flex-direction: row;
        gap: 0.5rem;
        justify-content: space-between;
    }

    .logo {
        font-size: 1.1rem;
        text-align: left;
        flex: 1;
    }

    .logo-img {
        height: 32px;
        width: 32px;
    }

    .hamburger {
        display: flex;
        order: 3;
    }

    .nav-menu {
        top: 100%;
    }

    .nav-menu a {
        padding: 0.875rem 1rem;
        min-height: 48px;
    }

    /* Hero Section */
    .hero {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cta-buttons .btn {
        width: 100%;
        padding: 0.875rem;
        min-height: 48px;
    }

    /* Main Content */
    main {
        padding: 1rem 0;
    }

    .unit-content {
        padding: 1rem;
    }

    .unit-content h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .unit-content h2 {
        font-size: 1.2rem;
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Tables */
    table {
        font-size: 0.85rem;
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-collapse: collapse;
    }

    table thead {
        display: table;
        width: 100%;
        background-color: var(--secondary-color);
        color: var(--white);
    }

    table tbody {
        display: block;
        width: 100%;
    }

    table tr {
        display: block;
        border-bottom: 3px solid var(--light-bg);
        margin-bottom: 1rem;
        padding: 1rem;
        background-color: var(--white);
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    table td {
        display: block;
        text-align: left;
        padding: 0.75rem 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    table td:before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary-color);
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.9rem;
    }

    table th {
        display: none;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border-radius: 4px;
    }

    .download-cell {
        margin-top: 0.5rem;
    }

    .download-btn, .view-btn {
        display: block;
        width: 100%;
        padding: 0.6rem;
        margin: 0.5rem 0;
        text-align: center;
        min-height: 44px;
        line-height: 1.2;
    }

    /* Tabs */
    .tab-navigation {
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        flex: 1;
        min-width: 80px;
        border: none;
        background-color: var(--light-bg);
        border-radius: 4px;
        cursor: pointer;
    }

    .tab-btn.active {
        background-color: var(--primary-color);
        color: var(--white);
    }

    /* Buttons */
    .btn {
        display: inline-block;
        padding: 0.65rem 1.2rem;
        font-size: 0.9rem;
        border-radius: 4px;
        border: none;
        cursor: pointer;
        text-decoration: none;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-primary {
        background-color: var(--primary-color);
        color: var(--white);
    }

    .btn-secondary {
        background-color: var(--light-bg);
        color: var(--text-dark);
        border: 1px solid rgba(0,0,0,0.06);
    }

    .download-btn, .view-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        width: 48%;
        margin: 0.25rem auto;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Unit Navigation */
    .unit-nav {
        flex-direction: column;
        gap: 0.75rem;
    }

    .unit-nav .btn {
        width: 100%;
        padding: 0.6rem;
    }

    /* Grid Layouts */
    .units-grid,
    .links-container,
    .about-info,
    .philosophy-grid,
    .links-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .unit-card {
        padding: 1rem;
        background-color: var(--secondary-color);
        color: var(--text-dark);
        border-left: 4px solid var(--primary-color);
    }

    .unit-card h3 {
        font-size: 1rem;
        color: var(--primary-color);
    }

    .unit-card p {
        font-size: 0.85rem;
        color: var(--text-dark);
    }

    /* Cards */
    .about-card,
    .philosophy-item,
    .quick-link {
        padding: 1rem;
    }

    .about-card h3,
    .philosophy-item h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .about-card p,
    .philosophy-item p {
        font-size: 0.85rem;
    }

    /* About Hover Card */
    .about-hover-card {
        position: fixed;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 90%;
        max-width: 300px;
        margin: 0 auto;
        transform: translateX(-50%);
        left: 50%;
        z-index: 1001;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        background-color: var(--white);
        color: var(--text-dark);
        padding: 1rem;
        border-radius: 8px;
    }

    /* Viva Questions */
    .viva-qa {
        margin-bottom: 1rem;
        padding: 1rem;
        background-color: var(--white);
        border-radius: 4px;
    }

    .viva-qa h2 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .viva-qa details {
        cursor: pointer;
    }

    .viva-qa summary {
        padding: 0.5rem;
        background-color: var(--light-bg);
        border-radius: 4px;
    }

    .viva-qa pre {
        padding: 0.75rem;
        font-size: 0.85rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Resource Items */
    .resource-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .resource-icon {
        font-size: 1.5rem;
        width: 100%;
        border-bottom: 1px solid var(--light-bg);
        padding-bottom: 0.75rem;
    }

    .resource-item h4 {
        font-size: 0.95rem;
    }

    .resource-item p {
        font-size: 0.85rem;
    }

    /* Practical Module */
    .practical-module {
        margin-bottom: 1.5rem;
    }

    .practical-module h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem 0;
        font-size: 0.85rem;
    }

    /* Text Elements */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    h4 {
        font-size: 0.95rem;
    }

    p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Links */
    a {
        color: var(--primary-color);
        text-decoration: none;
    }

    a:active {
        opacity: 0.8;
    }

    /* Utility Classes */
    .note-box,
    .quick-links,
    .about-header,
    .resources-offered,
    .contact-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .note-box h3,
    .quick-links h3,
    .about-header h2,
    .resources-offered h2,
    .contact-section h2 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .note-box p,
    .quick-links p,
    .resources-offered p,
    .contact-section p {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Closing Message */
    .closing-message {
        padding: 1.5rem;
        font-size: 0.95rem;
    }

    pre {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    code {
        font-size: 0.85rem;
    }

    /* Additional Mobile Optimizations */
    
    /* Forms */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        width: 100%;
        margin-bottom: 0.75rem;
        border: 1px solid var(--light-bg);
        border-radius: 4px;
    }

    input:focus, textarea:focus, select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
    }

    /* Improve Lists */
    ul, ol {
        margin-left: 1rem;
        margin-bottom: 1rem;
    }

    li {
        margin-bottom: 0.5rem;
        line-height: 1.6;
    }

    /* Code Blocks */
    pre {
        border-radius: 4px;
        background-color: var(--secondary-color);
        margin-bottom: 1rem;
    }

    code {
        background-color: #f5f5f5;
        padding: 0.2rem 0.4rem;
        border-radius: 2px;
        font-family: 'Courier New', monospace;
    }

    pre code {
        background-color: transparent;
        padding: 0;
    }

    /* Blockquotes */
    blockquote {
        border-left: 4px solid var(--primary-color);
        padding-left: 1rem;
        margin: 1rem 0;
        color: var(--text-light);
        font-style: italic;
    }

    /* Accessibility */
    .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    /* Touch-friendly spacing */
    a, button, .btn {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Prevent text selection on interactive elements */
    .hamburger,
    .tab-btn,
    .download-btn,
    .view-btn {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Improve scrolling performance */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    /* Safe area insets for notched devices */
    @supports (padding: max(0px)) {
        .navbar {
            padding-left: max(0.5rem, env(safe-area-inset-left));
            padding-right: max(0.5rem, env(safe-area-inset-right));
        }
        
        footer {
            padding-left: max(0.5rem, env(safe-area-inset-left));
            padding-right: max(0.5rem, env(safe-area-inset-right));
            padding-bottom: max(1rem, env(safe-area-inset-bottom));
        }
    }

    /* Hide scroll behavior on mobile - smooth is often laggy */
    html {
        scroll-behavior: smooth;
    }

    /* Improve mobile button interactions */
    button:active,
    .btn:active,
    a:active {
        transform: scale(0.98);
    }
}

/* Ultra-small phones (< 360px) */
@media (max-width: 360px) {
    html, body {
        font-size: 12px;
    }

    .container {
        padding: 0 10px;
    }

    .logo {
        font-size: 0.95rem;
    }

    .logo-img {
        height: 28px;
        width: 28px;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.1rem;
    }

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

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        min-height: 44px;
    }

    table td {
        padding: 0.5rem 0.25rem;
    }

    .practical-module h2,
    .viva-qa h2 {
        font-size: 1rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .unit-card {
        padding: 1.25rem;
    }
}

/* Touch-friendly improvements for all mobile devices */
@media (hover: none) and (pointer: coarse) {
    /* Ensure all interactive elements have adequate touch targets */
    a, button, .btn, input, select, textarea {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .unit-card:hover {
        transform: none;
    }

    /* Add active states instead */
    .feature-card:active,
    .unit-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .btn:active {
        transform: scale(0.97);
    }

    /* Improve scrolling in code blocks */
    pre, .table-wrapper {
        -webkit-overflow-scrolling: touch;
    }

    /* Better tap highlighting */
    a, button, .btn {
        -webkit-tap-highlight-color: rgba(52, 152, 219, 0.2);
    }
}

@media (max-width: 768px) {
    .practicals-page .practicals-table {
        display: table;
        width: 100%;
        overflow-x: visible;
    }

    .practicals-page .practicals-table thead {
        display: table-header-group;
        width: auto;
    }

    .practicals-page .practicals-table tbody {
        display: table-row-group;
        width: auto;
    }

    .practicals-page .practicals-table tr {
        display: table-row;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid var(--light-bg);
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
    }

    .practicals-page .practicals-table th,
    .practicals-page .practicals-table td {
        display: table-cell;
        white-space: normal;
        vertical-align: middle;
    }

    .practicals-page .practicals-table td:before {
        content: none;
        display: none;
    }

    .practicals-page .practicals-table .download-btn,
    .practicals-page .practicals-table .view-btn {
        display: inline-block;
        width: auto;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .practicals-page .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .practicals-page .practicals-table {
        min-width: 780px;
    }
}