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

:root {
    --text-color: #2d3748;
    --bg-color: #ffffff;
    --link-color: #3182ce;
    --link-border-color: #3182ce;
    --link-hover-color: #2c5282;
    --section-border: #e2e8f0;
    --social-link-color: #4a5568;
    --social-hover-color: #2d3748;
    --post-date-color: #718096;
    --profile-border: #e2e8f0;
    --footer-color: #718096;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --gradient-start: #3182ce;
    --gradient-end: #2c5282;
}

body.dark-mode {
    --text-color: #e2e8f0;
    --bg-color: #1a202c;
    --link-color: #63b3ed;
    --link-border-color: #63b3ed;
    --link-hover-color: #4299e1;
    --section-border: #2d3748;
    --social-link-color: #a0aec0;
    --social-hover-color: #e2e8f0;
    --post-date-color: #a0aec0;
    --profile-border: #2d3748;
    --footer-color: #a0aec0;
    --card-bg: #2d3748;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --gradient-start: #4299e1;
    --gradient-end: #2b6cb0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    max-width: 100%;
    overflow-x: hidden;
    transition: color 0.3s, background-color 0.3s;
}

a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

a:hover {
    border-color: var(--link-hover-color);
    color: var(--link-hover-color);
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
    border-radius: 2px;
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

section {
    margin-bottom: 4rem;
    padding-bottom: 2rem;
}

/* Profile */
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4rem;
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.profile:hover {
    transform: translateY(-5px);
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 3px solid transparent;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding: 3px;
}

.profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-links a {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--section-border);
    color: var(--social-link-color);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Bio Section */
.bio {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
}

.bio p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Posts Section */
.post {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.post:hover {
    transform: translateY(-3px);
}

.post h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.post-date {
    display: block;
    color: var(--post-date-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-color);
    transition: stroke 0.3s;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .social-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .social-links a {
        width: 100%;
        text-align: center;
    }
}

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

.profile, .bio, .post {
    animation: fadeIn 0.6s ease-out forwards;
}

.spin-logo-container {
    width: 160px;
    height: 160px;
    transition: transform 0.3s ease;
  }
  
  .spin-logo-container:hover {
    transform: scale(1.05);
    animation: spin 2s linear infinite;
  }
  
  @keyframes spin {
    from {
      transform: scale(1.05) rotate(0deg);
    }
    to {
      transform: scale(1.05) rotate(360deg);
    }
  }
  
  .spin-logo-container img {
    width: 100%;
    height: auto;
  }