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

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #333;
    --text-color: #f5f5f5;
    --accent-color: #6366f1;
    --accent-color-2: #8b5cf6;
    --accent-color-3: #ec4899;
    --accent-color-4: #f59e0b;
    --border-color: rgba(255, 255, 255, 0.1);
    --bg-color: #0a0a0f;
    --bg-gradient: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
    --card-bg: rgba(26, 26, 46, 0.6);
    --card-bg-hover: rgba(26, 26, 46, 0.8);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-2: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    --gradient-3: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.navbar {
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

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

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

.nav-link:hover {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link.active {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1);
    border-radius: 2px;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 4rem 2rem;
    flex: 1;
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.hero h2 {
    font-size: 1.4rem;
    font-weight: 400;
    color: rgba(245, 245, 245, 0.8);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.content {
    margin-bottom: 4rem;
    text-align: center;
}

.content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.content p {
    margin-bottom: 2rem;
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(245, 245, 245, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.about {
    margin-bottom: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.about p {
    margin-bottom: 2rem;
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(245, 245, 245, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-section {
    margin-top: 5rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.01em;
}

.contact-form {
    max-width: 500px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(26, 26, 46, 0.5);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(26, 26, 46, 0.7);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 20px rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

.submit-btn {
    background: var(--gradient-1);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
}

.form-message.success {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.5);
    color: #a5b4fc;
    display: block;
    border-radius: 12px;
}

.form-message.error {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.5);
    color: #f9a8d4;
    display: block;
    border-radius: 12px;
}

.footer {
    background: rgba(10, 10, 15, 0.8);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem;
    text-align: center;
    color: rgba(245, 245, 245, 0.6);
    margin-top: auto;
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 1;
}

/* Notes Page Styles */
.notes-container {
    max-width: 1200px;
}

.notes-intro {
    margin-bottom: 2rem;
    color: rgba(245, 245, 245, 0.8);
    font-size: 1.1rem;
}

.view-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.toggle-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn:hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.toggle-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.projects-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

.project-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    max-height: 200px;
}

.projects-grid.list-view .project-card {
    max-height: 200px;
    padding: 1.25rem;
}

.project-card.expanded,
.project-card.expanded-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1200px;
    max-height: 90vh;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(99, 102, 241, 0.5);
    max-height: none;
    backdrop-filter: none;
    background: rgba(26, 26, 46, 1);
    pointer-events: all;
}

.project-card.expanded-popup {
    cursor: default;
}

.project-card.expanded .project-card-content,
.project-card.expanded-popup .project-card-content {
    max-height: none;
    opacity: 1;
    padding-top: 2rem;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.project-card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    flex: 1;
}

.expand-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(245, 245, 245, 0.6);
    transition: transform 0.3s ease;
    line-height: 1;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-card.expanded .expand-icon,
.project-card.expanded-popup .expand-icon {
    transform: rotate(45deg);
    background: rgba(99, 102, 241, 0.3);
    color: var(--accent-color);
}

.project-card-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease,
                padding 0.4s ease;
    padding-top: 0;
}

.project-card-content p {
    color: rgba(245, 245, 245, 0.8);
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.project-description {
    color: rgba(245, 245, 245, 0.7);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.project-body {
    color: rgba(245, 245, 245, 0.9);
    line-height: 1.8;
}

.project-body h1,
.project-body h2,
.project-body h3 {
    color: var(--text-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.project-body h1 {
    font-size: 1.5rem;
}

.project-body h2 {
    font-size: 1.3rem;
}

.project-body h3 {
    font-size: 1.1rem;
}

.project-body ul,
.project-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.project-body li {
    margin-bottom: 0.5rem;
}

.project-body code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.project-body pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.project-body pre code {
    background: none;
    padding: 0;
}

.project-body a {
    color: var(--accent-color);
    text-decoration: none;
}

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

.project-notes {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.project-notes h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-entry {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
}

.note-entry h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.note-entry .note-date {
    font-size: 0.85rem;
    color: rgba(245, 245, 245, 0.6);
    margin-bottom: 0.5rem;
}

.note-entry .note-content {
    color: rgba(245, 245, 245, 0.8);
    line-height: 1.6;
}

.loading-message {
    text-align: center;
    color: rgba(245, 245, 245, 0.6);
    padding: 2rem;
    grid-column: 1 / -1;
}


/* Overlay for expanded card - invisible, just for click detection */
.card-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.card-overlay.active {
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .container {
        padding: 3rem 1.5rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .content p,
    .about p {
        font-size: 1.05rem;
    }

    .about h2,
    .contact-section h2 {
        font-size: 2rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card {
        padding: 1.25rem;
        max-height: 180px;
    }

    .projects-grid.list-view .project-card {
        max-height: none;
    }

    .project-card.expanded {
        width: 95vw;
        max-height: 85vh;
        padding: 2rem 1.5rem;
    }

    .project-card-header h2 {
        font-size: 1.1rem;
    }
}
