:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-color: #1f2937;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Glassmorphism Header */
header {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.5rem 0;
    /* Reduced padding */
    box-shadow: var(--shadow);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0;
    margin: 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 450px;
    /* Increased width for 2 columns */
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 10px;
    top: 100%;
    left: -100px;
    /* Center align better */

    /* Grid Layout */
    display: none;
    /* Default hidden */
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.dropdown:hover .dropdown-content {
    display: grid;
    /* Show as grid on hover */
}

.dropdown-content a {
    color: var(--text-color);
    padding: 8px 12px;
    /* Reduced padding */
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

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

.dropdown-content a strong {
    color: var(--primary-color);
    display: block;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 4px;
    margin-bottom: 4px;
}

/* Span full width for the first item (Go & System Design) */
.dropdown-content a:first-child {
    grid-column: span 2;
    text-align: center;
    background-color: #f8fafc;
    margin-bottom: 5px;
}

.nav-container nav ul li {
    position: relative;
    display: flex;
    align-items: center;
}

/* Arrow for dropdown */
.dropdown-arrow {
    margin-left: 5px;
    font-size: 0.8em;
    vertical-align: middle;
}

/* Main Content */
.container {
    max-width: 95%;
    /* Increased from 1200px to reduce whitespace */
    margin: 40px auto;
    padding: 0 20px;
}

/* Cards & Sections */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

h1,
h2,
h3 {
    color: #111827;
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.4rem;
    color: #374151;
    margin-top: 1.5rem;
}

/* Pattern Page Specifics */
.pattern-meta {
    background: #eff6ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 25px;
}

code,
pre {
    font-family: 'Fira Code', 'Roboto Mono', monospace;
}

pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
}

/* Table Styles */
.pattern-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.pattern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.pattern-table th,
.pattern-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.pattern-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--secondary-color);
}

.pattern-table tr.category-separator td {
    background: #e0f2fe;
    color: var(--secondary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 15px;
    border-top: 2px solid var(--primary-color);
    text-align: center;
    font-size: 1.1em;
}

.pattern-table tr:hover {
    background: #f9fafb;
}

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

/* Author Page */
.author-header {
    text-align: center;
    margin-bottom: 40px;
}

.author-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.author-title {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.skill-card {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.contact-btn {
    display: inline-block;
    padding: 10px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.case-study {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 40px;
    border-radius: 12px;
    margin-top: 40px;
}

.case-study h2,
.case-study h3 {
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.footer {
    text-align: center;
    padding: 40px 0;
    color: #6b7280;
    font-size: 0.9rem;
}