* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Header & Navigation */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.logo {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* Logout button styled as nav link */
.logout-button {
    background: none;
    border: none;
    outline: none;
    color: white;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
    margin: 0;
    text-decoration: none;
    transition: opacity 0.3s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.logout-button:hover {
    opacity: 0.8;
}

.logout-button:focus {
    outline: none;
}

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

/* Messages */
.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.auth-container h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.help-text {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.field-error {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-errors {
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Home Page */
.home-container {
    padding: 2rem 0;
}

.hero {
    text-align: center;
    padding: 3rem 0;
}

.hero h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.hero-subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.welcome-message {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.feature-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: #7f8c8d;
}

/* About Page */
.about-container {
    max-width: 800px;
    margin: 0 auto;
}

.about-header {
    text-align: center;
    margin-bottom: 3rem;
}

.about-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.tagline {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.about-section {
    background: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.about-section h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

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

.skill-category h3 {
    color: #3498db;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.skill-category ul {
    list-style: none;
    padding: 0;
}

.skill-category li {
    padding: 0.25rem 0;
    color: #555;
}

/* Projects */
.projects-container {
    max-width: 1200px;
    margin: 0 auto;
}

.projects-container h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.badge-featured {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.project-card h2 {
    color: #2c3e50;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.project-description {
    color: #555;
    margin-bottom: 1rem;
}

.project-tech {
    color: #3498db;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.no-projects {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.1rem;
    padding: 3rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.pagination a {
    padding: 0.5rem 1rem;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background-color: #2980b9;
}

.current-page {
    color: #2c3e50;
    font-weight: 500;
}

/* Project Detail */
.project-detail-container {
    max-width: 800px;
    margin: 0 auto;
}

.project-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.project-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.project-meta {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
}

.project-detail-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.project-body {
    margin-bottom: 2rem;
}

.project-body h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.project-body p {
    color: #555;
    line-height: 1.8;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.back-link {
    color: #3498db;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
}
