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

/* Body & Theme */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
    background: #0a0a0a;
    color: #e5e5e5;
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 400;
    letter-spacing: -0.01em;
}

body.light {
    background: #fafafa;
    color: #1a1a1a;
}

body.light .site-name,
body.light .dropdown-content a,
body.light .socials a {
    color: #000;
}

body.light .dropdown-content {
    background: #fff;
    border: 1px solid #ddd;
}

body.light .recent a {
    color: #000;
}

body.light #themeToggle i {
    color: #111;
}

body.light .recent h2 {
    border-left: 3px solid #000;
}

body.light .recents h2 {
    color: #000;
    border-left: 3px solid #000;
}

body.light .recent a:hover {
    color: #333;
    border-bottom: 1px solid #333;
}

body.light .about-header h1 {
    color: #000;
}

body.light .subtitle {
    color: #666;
}

body.light .cv-container {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light .pdf-viewer p {
    color: #666;
}

/* Top bar */
.topbar {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

/* Site name */
.site-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    user-select: none;
    letter-spacing: -0.02em;
}

.site-name:hover {
    color: #ccc;
}

/* Right-side icons */
.top-right-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Toggle buttons */
#menuToggle,
#themeToggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

#menuToggle:hover,
#themeToggle:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
}

/* Light mode overrides for toggle buttons */
body.light #menuToggle,
body.light #themeToggle {
    color: #000;
}

body.light #menuToggle:hover,
body.light #themeToggle:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.1);
}

/* Dropdown menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 2.5rem;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dropdown-content a,
.dropdown-content button {
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-content a:hover,
.dropdown-content button:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.1);
}

/* Hide dropdown */
.hidden {
    display: none;
}

/* Centered profile section */
.center {
    margin-top: 3rem;
    text-align: center;
}

.profile {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    cursor: zoom-in;
    transition: all 0.3s ease;
    z-index: 1;
}

.profile.zoomed {
    transform: scale(2.5);
    z-index: 1000;
    position: relative;
    cursor: zoom-out;
}


/* Social links under profile */
.socials {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.socials a {
    color: #fff;
    transition: color 0.3s;
}

.socials a:hover {
    color: #ccc;
}

/* Recent section */
.recent {
    margin: 3rem auto 1rem;
    max-width: 800px;
    padding: 1rem;
    width: 100%;
}

.recent h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-left: 3px solid #fff;
    padding-left: 0.75rem;
    letter-spacing: -0.01em;
}

.recent ul {
    list-style: none;
}

.recent li {
    margin: 0.5rem 0;
}

.recent a {
    color: #e5e5e5;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.recent a:hover {
    color: #ccc;
    border-bottom: 1px solid #ccc;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 2rem 1rem;
    font-size: 0.75rem;
    text-align: center;
    color: #777;
    font-weight: 500;
}

/* Recents section */
.recents {
    max-width: 900px;
    margin: 3rem auto 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.recents h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-left: 3px solid #fff;
    padding-left: 0.75rem;
    text-align: left;
    color: #fff;
    letter-spacing: -0.02em;
}

/* Link preview container */
.link-preview-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Link preview */
.link-preview {
    flex: 1 1 400px;
    max-width: 400px;
    box-sizing: border-box;
}

/* Preview box */
.preview-box {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.preview-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.preview-box:hover img {
    transform: scale(1.05);
}

/* Overlay */
.overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    letter-spacing: -0.01em;
}

.name {
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: x-large;
}

/* About page container */
.about-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* About header */
.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.subtitle {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

/* CV Section */
.cv-section {
    margin-bottom: 3rem;
}

.cv-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.pdf-viewer {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    display: block;
    max-width: 100%;
}

.pdf-viewer p {
    text-align: center;
    padding: 2rem;
    color: #ccc;
}

/* Action buttons */
.cv-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive design for About page */
@media (max-width: 768px) {
    .about-container {
        padding: 0 1rem;
    }

    .pdf-viewer {
        height: 500px;
    }

    .cv-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .pdf-viewer {
        height: 400px;
    }
}

/* PDF Button Styling */
.pdf-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    color: #000;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-button:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pdf-button i {
    font-size: 1rem;
    color: #dc3545;
}

/* Light mode styling */
body.light .pdf-button {
    background: #000;
    color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light .pdf-button:hover {
    background: #333;
}

body.light .pdf-button i {
    color: #ff6b6b;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pdf-button {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* Projects Page Styles */
.projects-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.projects-container h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: #fff;
    border-left: 3px solid #fff;
    padding-left: 0.75rem;
    text-align: left;
}

body.light .projects-container h2 {
    color: #000;
    border-left: 3px solid #000;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

/* Project Card */
.project-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light .project-card {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

body.light .project-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Project Image */
.project-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.project-card:hover .project-image img {
    transform: scale(1.05);
}

/* Project Overlay */
.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

/* Preview and GitHub Buttons */
.preview-btn,
.github-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.preview-btn:hover,
.github-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.github-btn {
    background: #24292e;
    color: #fff;
}

.github-btn:hover {
    background: #1a1e22;
}

.preview-btn i,
.github-btn i {
    font-size: 1rem;
}

/* Project Info */
.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

body.light .project-info h3 {
    color: #000;
}

.project-info p {
    color: #ccc;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

body.light .project-info p {
    color: #666;
}

/* Project Tags */
.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

body.light .tag {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

/* Code Modal */
.code-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.code-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    height: 80%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body.light .modal-content {
    background: #fff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.light .modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
}

body.light .modal-header h3 {
    color: #000;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

body.light .modal-close {
    color: #000;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light .modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.modal-body {
    flex: 1;
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .projects-container {
        padding: 0 1rem;
    }

    .modal-content {
        width: 95%;
        height: 85%;
    }

    .project-overlay {
        flex-direction: column;
        gap: 0.5rem;
    }

    .preview-btn,
    .github-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .project-info {
        padding: 1rem;
    }

    .projects-container h2 {
        font-size: 1.5rem;
    }
}
