/* Base Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --background-color: #ffffff;
    --text-color: #1f2937;
    --light-gray: #f3f4f6;
    --gray: #9ca3af;
    --dark-gray: #4b5563;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease-in-out;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

[data-theme="dark"] body {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] .site-header {
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
    color: #4a90e2;
    transition: color 0.3s ease;
}

[data-theme="dark"] .logo a {
    color: #6ab1ff;
}

.logo span {
    color: #333;
}

[data-theme="dark"] .logo span {
    color: #e0e0e0;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
}

[data-theme="dark"] .main-nav a {
    color: #ccc;
}

.main-nav a:hover,
.main-nav a.active {
    color: #4a90e2;
}

[data-theme="dark"] .main-nav a:hover,
[data-theme="dark"] .main-nav a.active {
    color: #6ab1ff;
}

#dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #555;
    transition: color 0.3s ease;
    margin-left: 15px;
}

[data-theme="dark"] #dark-mode-toggle {
    color: #ccc;
}

#dark-mode-toggle:hover {
    color: #4a90e2;
}

[data-theme="dark"] #dark-mode-toggle:hover {
    color: #6ab1ff;
}

.section {
    padding: 60px 0;
    animation: fadeIn 0.8s ease-out;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #333;
    transition: color 0.3s ease;
}

[data-theme="dark"] .section-header h2 {
    color: #e0e0e0;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    transition: color 0.3s ease;
}

[data-theme="dark"] .section-subtitle {
    color: #aaa;
}

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

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        margin-top: 10px;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 5px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

[data-theme="dark"] .loader {
    background: rgba(26, 26, 26, 0.9);
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4a90e2;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

[data-theme="dark"] .spinner {
    border: 5px solid #333;
    border-top: 5px solid #6ab1ff;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Portfolio Items */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.portfolio-item {
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #fff;
}

[data-theme="dark"] .portfolio-item {
    background-color: #2d3748;
    border-color: #4a5568;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .portfolio-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    height: 180px;
    background-color: #f6f8fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

[data-theme="dark"] .portfolio-image {
    background-color: #3a3a3a;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #333;
    transition: color 0.3s ease;
}

[data-theme="dark"] .portfolio-content h3 {
    color: #e2e8f0;
}

.portfolio-content p {
    color: #666;
    margin: 0 0 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

[data-theme="dark"] .portfolio-content p {
    color: #a0aec0;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.portfolio-tag {
    background-color: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .portfolio-tag {
    background-color: #4a5568;
    color: #e2e8f0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

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

h2 {
    font-size: 2rem;
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}

.last-updated {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Account Grid */
.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.account-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    transition: var(--transition);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.account-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.account-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.account-card p {
    margin: 0.5rem 0;
    color: var(--dark-gray);
}

/* Buttons */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    margin-top: auto;
    width: 100%;
}

.btn:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Projects Section */
.projects {
    margin: 3rem 0;
}

.projects h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.owner-section {
    margin-bottom: 3rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.owner-section h3 {
    margin: 0;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.owner-section h3 i {
    color: var(--primary-color);
    width: 1.25rem;
    text-align: center;
}

.project-count {
    margin-left: auto;
    font-size: 0.9rem;
    font-weight: normal;
    color: var(--gray);
    background: #f0f0f0;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
}

.projects-table-container {
    overflow-x: auto;
    padding: 0.5rem;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.projects-table th,
.projects-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.projects-table th {
    font-weight: 600;
    color: var(--dark-gray);
    background: #f9fafb;
    white-space: nowrap;
}

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

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

.project-name {
    font-weight: 500;
    white-space: nowrap;
}

.project-name a {
    color: var(--primary-color);
    text-decoration: none;
}

.project-name a:hover {
    text-decoration: underline;
}

.version {
    font-size: 0.8rem;
    color: var(--gray);
    margin-left: 0.5rem;
    font-weight: normal;
}

.project-desc {
    color: var(--dark-gray);
    max-width: 300px;
    white-space: normal;
    line-height: 1.4;
}

.project-tech {
    white-space: nowrap;
}

.tech-badge {
    display: inline-block;
    background: #f0f0f0;
    color: var(--dark-gray);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin: 0.1rem 0.1rem 0.1rem 0;
    white-space: nowrap;
}

.project-updated {
    white-space: nowrap;
    color: var(--gray);
    font-size: 0.85rem;
}

.project-links {
    white-space: nowrap;
}

.project-links a,
.project-links span {
    display: inline-flex;
    align-items: center;
    color: var(--gray);
    margin-right: 0.75rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.project-links a:hover {
    color: var(--primary-color);
}

.project-links i {
    margin-right: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .projects-table th,
    .projects-table td {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .project-desc {
        max-width: 200px;
    }
    
    .project-links a,
    .project-links span {
        margin-right: 0.5rem;
        font-size: 0.8rem;
    }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .account-grid {
        grid-template-columns: 1fr;
    }
}
