/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* NC State Official Brand Colors */
:root {
    /* Core Palette */
    --wolfpack-red: #CC0000;
    --wolfpack-white: #FFFFFF;
    --wolfpack-black: #000000;
    
    /* Expanded Palette */
    --reynolds-red: #990000;
    --pyroman-flame: #D14905;
    --hunt-yellow: #FAC800;
    --genomic-green: #6F7D1C;
    --carmichael-aqua: #008473;
    --innovation-blue: #427E93;
    --bio-indigo: #4156A1;
    
    /* Theme Variables */
    --bg-color: var(--wolfpack-white);
    --text-color: var(--wolfpack-black);
    --card-bg: var(--wolfpack-white);
    --card-shadow: rgba(204, 0, 0, 0.1);
    --card-shadow-hover: rgba(204, 0, 0, 0.2);
    --border-color: #E5E5E5;
    --muted-text: #666666;
    --primary-color: var(--wolfpack-red);
    --secondary-color: var(--reynolds-red);
    --accent-color: var(--pyroman-flame);
    --hex-stroke: #d0d0d0;
    --hex-stroke-hover: var(--wolfpack-red);
}

[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: var(--wolfpack-white);
    --card-bg: #2d2d2d;
    --card-shadow: rgba(204, 0, 0, 0.3);
    --card-shadow-hover: rgba(204, 0, 0, 0.4);
    --border-color: #404040;
    --muted-text: #cccccc;
    --primary-color: var(--wolfpack-red);
    --secondary-color: var(--reynolds-red);
    --accent-color: var(--pyroman-flame);
    --hex-stroke: #606060;
    --hex-stroke-hover: var(--wolfpack-red);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 400;
    font-size: 16px;
}

/* Header and Navigation */
header {
    background: var(--wolfpack-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-brand h1 {
    color: var(--wolfpack-white);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0;
}

.nav-tabs {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
}

.nav-link {
    color: var(--wolfpack-white);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    transition: all 0.2s ease;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    background-color: var(--reynolds-red);
    border-bottom-color: var(--wolfpack-white);
}

.nav-link.active {
    background-color: var(--reynolds-red);
    border-bottom-color: var(--wolfpack-white);
    font-weight: 700;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 2px solid var(--wolfpack-red);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.2);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--wolfpack-red);
    color: var(--wolfpack-white);
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 120px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h2 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--wolfpack-red);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.hero-section p {
    font-family: 'Roboto', sans-serif;
    font-size: 1.125rem;
    color: var(--muted-text);
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0;
    text-align: left;
    box-shadow: 0 1px 4px rgba(204, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--wolfpack-red);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.feature-card:hover {
    border-left-color: var(--reynolds-red);
    box-shadow: 0 2px 8px rgba(204, 0, 0, 0.3);
}

.feature-card h3 {
    font-family: 'Roboto Slab', serif;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--wolfpack-red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-card p {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
    font-weight: 400;
}

/* Utility Grid */
.utility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    cursor: pointer;
}

.utility-info {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--innovation-blue);
    box-shadow: 0 1px 4px rgba(66, 126, 147, 0.2);
}

.utility-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 0;
    box-shadow: 0 1px 4px rgba(66, 126, 147, 0.2);
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--innovation-blue);
    cursor: pointer;
}

.utility-card:hover {
    border-top-color: var(--carmichael-aqua);
    box-shadow: 0 2px 8px rgba(66, 126, 147, 0.3);
}

.utility-card h3 {
    font-family: 'Roboto Slab', serif;
    color: var(--innovation-blue);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.utility-card p {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.utility-features {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.utility-features span {
    font-size: 0.85rem;
    color: var(--muted-text);
    font-family: 'Roboto', sans-serif;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-label {
    font-size: 0.75rem;
    color: var(--wolfpack-white);
    font-weight: 600;
    font-family: 'Roboto Condensed', sans-serif;
    letter-spacing: 0.5px;
    opacity: 0.9;
    transition: opacity 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: 0.3s;
    border-radius: 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--wolfpack-white);
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--reynolds-red);
    border-color: var(--wolfpack-white);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

input:checked + .slider:hover {
    background-color: var(--wolfpack-red);
}

/* General Typography Rules */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    color: var(--wolfpack-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .nav-right {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .hero-section h2 {
        font-size: 2.25rem;
        font-family: 'Roboto Condensed', sans-serif;
        font-weight: 700;
        color: var(--wolfpack-red);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 1rem;
    }
    
    .hero-section p {
        color: var(--muted-text);
    }
    
    .feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .nav-right {
        align-items: center;
    }
    
    .nav-tabs {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        text-align: center;
        width: 100%;
    }
    
    .theme-toggle {
        justify-content: center;
    }
    
    .hero-section h2 {
        font-size: 1.8rem;
    }
}
