:root {
    --bg: #0f1724;
    --card: #111827;
    --accent: #0ea5a4;
    --muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.04);
}

/* Reset & Base */
* {
    box-sizing: border-box;
}
html, body {
    height: 100%;
}
body {
    margin: 0;
    font-family: 'Playfair Display', Georgia, serif; /* Updated font stack */
    background: linear-gradient(180deg, #071023 0%, #071827 100%);
    color: #e6eef6;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header, Navbar & Hamburger ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(10,18,28,0.95), rgba(10,18,28,0.85));
    box-shadow: 0 2px 6px rgba(2,6,23,0.25);
    transition: padding 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
    will-change: transform;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* logo sizing and smooth transition for shrink */
.logo-img {
    width: 48px;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    transition: width 180ms ease;
}

/* shrink state: reduce padding & logo so offsetHeight changes and JS works */
.header.shrink {
    padding: 8px 14px; /* Reduce padding */
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.45); /* Add shadow for emphasis */
    background: rgba(10, 18, 28, 0.95); /* Slightly darker background */
}
.header.shrink .logo-img {
    width: 36px; /* Reduce logo size */
}

/* Navbar (desktop) */
.navbar {
    position: relative;
}
.navbar ul {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
    align-items: center;
}
.navbar li { margin: 0; }
.navbar a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
}
.navbar a:hover { color: white; background: rgba(14,118,116,0.12); }

/* Hamburger menu toggle button */
.navbar-toggle {
    display: none; /* Hide by default */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 6px;
}

/* Hamburger menu lines */
.navbar-toggle .line {
    width: 25px;
    height: 3px;
    background-color: white; /* Ensure the lines are white */
    margin: 4px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Responsive: show hamburger and dropdown on small screens */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex; /* Show hamburger menu on smaller screens */
    }

    .navbar ul {
        display: none;
        flex-direction: column;
        width: 150%; /* Full width for the dropdown */
        margin: 0; /* Remove extra margins */
        background: var(--card);
        padding: 12px 0; /* Add padding to ensure text fits */
        border-radius: 0; /* Make it a rectangle */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        gap: 8px; /* Add spacing between items */
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 999;
        font-size: 1rem; /* Slightly larger text for readability */
    }

    .navbar ul.active {
        display: flex; /* Show navbar items when active */
    }

    .navbar a {
        padding: 12px 16px; /* Larger tappable area */
        color: white;
        text-decoration: none;
        display: block;
        border-radius: 0; /* Remove border radius for rectangle shape */
    }

    .navbar a:hover {
        background: rgba(14, 118, 116, 0.12);
        color: white;
    }
}

/* make sure main has initial top padding so content isn't hidden before JS adjusts it */
main {
    padding-top: 110px; /* fallback; JS will set exact padding on load/resize */
}

/* ===== Main ===== */
main {
    max-width: 1100px;
    margin: 28px auto;
    padding: 0 20px;
}
.card {
    background: var(--card);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(2,6,23,0.6);
    border: 1px solid rgba(255,255,255,0.02);
}

/* ===== Footer ===== */
.site-footer {
    margin-top: 48px;
    padding: 18px 0;
    background: transparent;
    color: var(--muted);
}
.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.footer-logo {
    width: 18px;   /* smaller than before (was 40px) */
    height: auto;
    opacity: 0.9;
}

/* ===== Responsive ===== */
@media (max-width: 720px) {
    .navbar ul {
        display: none;
    }
    .brand-text {
        display: none;
    }
    .header .header-inner {
        padding: 12px;
    }
    .logo-img {
        width: 36px; /* scale down further on mobile */
    }
    .footer-logo {
        width: 22px;
    }
}

/* ===== Feature Row ===== */
.feature-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two equal columns */
    gap: 24px; /* Space between the boxes */
    align-items: stretch; /* Ensure boxes have equal height */
    margin: 24px 0;
}

/* Boxed Sections */
.boxed-section {
    background: var(--card);
    border: 2px solid white; /* Add white border */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.boxed-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Heading Icon */
.feature-icon {
    font-size: 1.6rem;
    display: inline-block;
    vertical-align: middle;
    margin-inline-start: 12px; /* spacing (works with RTL) */
}

/* Icon-only Button: Rectangular shape */
.icon-btn {
    position: relative;
    margin-top: 16px; /* Ensure consistent spacing from content */
    width: 100%; /* Full width to fit the box */
    height: 40px; /* Rectangular shape */
    border-radius: 8px; /* Slightly rounded corners */
    border: none;
    background: var(--accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(2, 6, 23, 0.2);
    transition: transform 120ms ease, background-color 120ms ease;
    font-size: 1rem; /* Adjust font size */
}

/* Ensure buttons in the same row are aligned */
.feature-row .boxed-section {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Align content and button */
    height: 100%; /* Ensure equal height for sections */
}

/* Hover/focus states */
.icon-btn:hover,
.icon-btn:focus {
    transform: translateY(-2px);
    background: #0b8b89;
    outline: none;
}

/* Adjust Text Spacing */
.boxed-section p {
    margin-top: 16px;
    line-height: 1.8;
    padding-right: 12px;
}

/* Ensure Headings Look Balanced */
.boxed-section h3 {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

/* Ensure Hero Spacing Remains */
.hero {
    margin-bottom: 20px;
}

/* Hero Description */
.hero-description {
    background: var(--card); /* Use the card background color */
    border: 2px solid white; /* Add white border */
    border-radius: 12px; /* Rounded corners */
    padding: 20px; /* Add padding inside the box */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    margin-top: 16px; /* Add spacing above the box */
}

.hero-description p {
    font-weight: bold; /* Make the text bold */
    font-size: 1.1rem; /* Slightly larger font size */
    line-height: 1.6; /* Improve readability */
    color: white; /* Change text color to white */
    margin: 0; /* Remove default margin */
}

/* Athletic Achievements Section */
.athletic-achievements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* responsive grid */
    gap: 16px;
    margin-top: 24px;
}

.athletic-achievements img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.athletic-achievements img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* Athletic Achievements Container */
.athletic-achievements-container {
    background: var(--card);
    border: none; /* Remove white border from the outer box */
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Athletic Achievements Grid: two fixed boxes per row, centered */
.athletic-achievements {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two equal columns */
    justify-content: center;
    gap: 16px;
    padding: 8px 0;
    width: 100%;
    max-width: 600px; /* limit the grid width */
    box-sizing: content-box;
}

/* Individual Achievement Box: slightly larger size */
.achievement-box {
    background: var(--glass);
    border: 2px solid white; /* Add white border to inner boxes */
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Hover lift */
.achievement-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

/* Achievement Image: slightly larger size */
.achievement-box img {
    width: 100%;
    height: 200px; /* increased height */
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* Achievement Title */
.achievement-box h3 {
    font-size: 1rem; /* slightly larger font size */
    margin: 6px 0;
    color: var(--accent);
}

/* Achievement Description */
.achievement-box p {
    font-size: 0.9rem; /* slightly larger font size */
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

/* Bookshelf Box */
.bookshelf-container {
    background: var(--card);
    border: 2px solid white; /* Add white border */
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.book-box {
    background: var(--glass);
    border: 2px solid white; /* Add white border */
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Bookshelf styles (moved from inline into central stylesheet) */
.bookshelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    align-items: start;
}

.book-card {
    background: var(--card);
    border: 2px solid white; /* white sides as requested */
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.book-card img {
    width: 150px; /* fixed width to match previous appearance */
    height: 200px; /* fixed height to keep uniformity */
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.book-card h3 {
    font-size: 1.1rem;
    margin: 8px 0 4px 0;
    color: var(--accent);
}

.book-card p {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0;
}

/* Responsive: adjust for single column on small screens */
@media (max-width: 720px) {
    .athletic-achievements {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
    .achievement-box {
        width: 100%;
    }
    .achievement-box img {
        height: 220px; /* adjust height for responsiveness */
    }
}
