/* ===== Variables ===== */
:root {
    /* Colors */
    --bg-color: #030713;
    --text-color: #ffffff;
    --text-secondary: #a1a1aa;
    --border-color: #27272a;
    --card-bg: #18181b;
    --accent-color: #3b82f6;
    --hover-color: #2563eb;
    --tag-bg: #27272a;
    --tag-text: #ffffff;
    
    /* Spacing */
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --spacing-xl: 60px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Smooth transitions for theme changes */
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

html {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1 0 auto; /* flex-grow: 1, flex-shrink: 0, flex-basis: auto */
    display: flex;
    flex-direction: column;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-color);
    backdrop-filter: blur(5px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-color);
}

.theme-toggles {
    display: flex;
    gap: 10px;
}

.theme-toggles button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: color 0.3s;
}

.theme-toggles button:hover, .theme-toggles button.active {
    color: var(--text-color);
}

.theme-toggles button i {
    font-size: 18px;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 80px 0 60px;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.bio, .bio-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.profile-image {
    flex: 0 0 200px;
}

.profile-image img {
    width: 75%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn:hover:after {
    opacity: 1;
}

.btn i {
    font-size: 16px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: background-color 0.3s;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-icon:hover {
    background-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-icon:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-icon:hover:after {
    opacity: 1;
}

.social-icon i {
    font-size: 18px;
}

.tabs-section {
    margin: 40px 0;
}

.tabs {
    display: flex;
    margin-bottom: 30px;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
}

.tab {
    padding: 12px 30px;
    background-color: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.tab.active {
    color: var(--text-color);
    background-color: var(--border-color);
}

.tab-content {
    display: none;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.tab-content:before {
    content: "";
    position: absolute;
    top: 25px;
    bottom: 25px;
    left: 25px;
    width: 1px;
    background-color: var(--border-color);
    z-index: 1;
}

/* Experience Items - Timeline Style */
.experience-item {
    display: flex;
    gap: 24px;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    position: relative;
}

.experience-item:last-child {
    margin-bottom: 0;
}

.experience-item:last-child .experience-details {
    padding-bottom: 0;
}

.experience-logo {
    flex: 0 0 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.experience-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.experience-details {
    flex: 1;
    padding-bottom: 30px;
}

.experience-date {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.experience-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.experience-role {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.experience-bullets {
    margin-left: 0;
    margin-bottom: 15px;
    list-style-type: none;
}

.experience-bullets li {
    margin-bottom: 12px;
    font-size: 15px;
    position: relative;
    padding-left: 24px;
}

.experience-bullets li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-color);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 10px;
    background-color: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 4px;
    font-size: 12px;
}

/* Featured Projects */
.featured-projects, .recent-posts, .projects-section, .blog-posts {
    margin: 30px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
}

.view-more {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.view-more:hover {
    color: var(--text-color);
}

.view-more i {
    font-size: 14px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.project-card {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

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

.project-details {
    padding: 20px;
}

.project-details h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.project-details p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 12px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tech {
    padding: 4px 10px;
    background-color: var(--tag-bg);
    color: var(--tag-text);
    border-radius: 20px;
    font-size: 10px;
}

.project-links {
    display: flex;
    gap: 10px;
}

.posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.post-item {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.post-content {
    flex: 1;
}

.post-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.post-content h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.post-content h3 a:hover {
    color: var(--accent-color);
}

.post-content p {
    color: var(--text-secondary);
    font-size: 15px;
}

.post-date {
    flex: 0 0 150px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Page Header */
.page-header {
    padding: 60px 0 20px;
}

.page-header h1 {
    margin-bottom: 10px;
}

/* Projects Full Grid */
.full-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

@media (max-width: 768px) {
    .full-grid {
        grid-template-columns: 1fr;
    }
}

/* Personal Interests */
.personal-interests {
    margin: 60px 0;
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.interest-card {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.interest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-color);
}

.interest-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    border-radius: 12px;
    margin-bottom: 16px;
}

.interest-icon i {
    font-size: 24px;
    color: white;
}

.interest-details h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.interest-details p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.interest-link {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.interest-link:hover {
    color: var(--hover-color);
}

.interest-link i {
    font-size: 12px;
    margin-left: 4px;
}

@media (max-width: 768px) {
    .interests-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .personal-interests {
        margin: 40px 0;
    }
    
    .interest-card {
        padding: 20px;
    }
    
    .interest-icon {
        width: 45px;
        height: 45px;
    }
    
    .interest-icon i {
        font-size: 20px;
    }
}

/* Footer */
footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    flex-shrink: 0;
}

.copyright {
    color: var(--text-secondary);
    font-size: 14px;
}

.copyright a {
    color: var(--text-secondary);
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
        padding: 40px 0;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .profile-image {
        flex: 0 0 250px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .post-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-date {
        text-align: left;
    }
    
    footer {
        flex-direction: column;
        gap: 20px;
    }
    
    /* Timeline responsive adjustments */
    .tabs {
        justify-content: center;
    }
    
    .tab-content:before {
        left: 20px;
    }
    
    .experience-logo {
        flex: 0 0 40px;
        height: 40px;
    }
}

/* Contact Page Styles */
.contact-section {
    padding: 60px 0;
    width: 100%;
    flex: 1 0 auto;
    margin: 0 auto;
}

/* Minimal Contact Form Styles */
.minimal-contact-form {
    max-width: 100%;
    margin-top: 40px;
}

.minimal-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 16px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    border-color: var(--text-color);
}

#contact-form textarea {
    resize: vertical;
    min-height: 120px;
    margin-bottom: 20px;
}

.minimal-submit-btn {
    width: 100%;
    padding: 16px;
    background-color: var(--bg-color);
    color: var(--text-secondary);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.minimal-submit-btn:hover {
    background-color: #e5e5e5;
}

.minimal-disclaimer {
    margin-top: 15px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

@media (max-width: 768px) {
    .minimal-form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .tab-content:before {
        left: 15px;
    }
    
    .experience-item {
        gap: 15px;
    }
    
    .experience-logo {
        flex: 0 0 30px;
        height: 30px;
    }
    
    .experience-bullets li {
        font-size: 14px;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--card-bg);
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid var(--border-color);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-3px);
}