/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-color: #f3f4f6;
    --surface-color: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #0ea5e9;
    /* Sky 500 */
    --accent-hover: #0284c7;
    /* Sky 600 */
    --border-color: #e2e8f0;
    --font-heading: "Inter", sans-serif;
    --font-body: "Inter", sans-serif;
    --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);
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    --gradient-accent: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    background-image:
        radial-gradient(at 0% 0%, rgba(14, 165, 233, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.1) 0px, transparent 50%);
    min-height: 100vh;
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-placeholder {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.125rem;
    letter-spacing: -0.025em;
}

.logo-placeholder svg {
    color: var(--accent-color);
    filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.3));
}

.sticky-header nav {
    display: flex;
    gap: 2rem;
}

.sticky-header nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s, transform 0.2s;
    position: relative;
    padding: 0.25rem 0;
}

.sticky-header nav a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
    border-radius: 2px;
}

.sticky-header nav a:hover {
    color: var(--text-primary);
}

.sticky-header nav a:hover::after,
.sticky-header nav a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.sticky-header nav a.active {
    color: var(--accent-color);
    font-weight: 600;
}

/* Page Layout */
.page-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 5rem;
    position: relative;
}

/* Sidebar Table of Contents */
.sidebar-toc {
    display: none;
}

@media (min-width: 1024px) {
    .sidebar-toc {
        display: block;
        position: sticky;
        top: 7rem;
        height: fit-content;
        max-height: calc(100vh - 9rem);
        overflow-y: auto;
        padding-right: 1rem;
    }
}

.sidebar-toc h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.sidebar-toc ul {
    list-style: none;
    border-left: 2px solid var(--border-color);
}

.sidebar-toc li a {
    display: block;
    padding: 0.625rem 0 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 2px solid transparent;
    margin-left: -2px;
    transition: all 0.2s;
    line-height: 1.4;
}

.sidebar-toc li a:hover {
    color: var(--accent-color);
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.05) 0%, transparent 100%);
}

.sidebar-toc li a.active {
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 600;
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.08) 0%, transparent 100%);
}

/* Main Content */
.main-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@media (max-width: 1023px) {
    .page-layout {
        display: block;
    }

    .main-content {
        margin: 0 auto;
        padding: 2rem;
    }
}

.last-updated-badge {
    display: inline-flex;
    align-items: center;
    background-color: #f0f9ff;
    color: var(--accent-color);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 1rem;
    border-radius: 9999px;
    margin-bottom: 2rem;
    border: 1px solid #bae6fd;
}

h1 {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.1;
}

.intro {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3.5rem;
    line-height: 1.7;
    font-weight: 400;
}

section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 7rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

p,
li {
    color: var(--text-secondary);
    margin-bottom: 1.15rem;
    line-height: 1.75;
}

ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

ul li {
    margin-bottom: 0.75rem;
}

/* Contact Card (Embedded) */
.contact-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    margin-top: 3rem;
    text-align: center;
}

.contact-card p {
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-email {
    display: inline-block;
    color: #ffffff;
    background: var(--gradient-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.125rem;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.4);
    text-decoration: none;
}

/* Home Page Styles */
.hero-content {
    text-align: center;
    padding: 8rem 1.5rem 6rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: 600px;
    margin: 0 auto;
}

.cards-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem 8rem 1.5rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: var(--surface-color);
    border: 0;
    border-radius: 20px;
    padding: 2.5rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    height: 100%;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-placeholder, var(--border-color));
    transition: height 0.3s;
}

.feature-card:nth-child(1)::before {
    background: linear-gradient(90deg, #3b82f6, #0ea5e9);
}

.feature-card:nth-child(2)::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.feature-card:nth-child(3)::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}


.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Responsive details */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-content {
        padding: 5rem 1rem 4rem;
    }

    .page-layout {
        padding: 2rem 1rem;
    }

    .sticky-header nav {
        gap: 1rem;
    }

    .main-content {
        padding: 1.5rem;
        box-shadow: none;
        border: none;
        background: transparent;
    }
}