/* CSS Reset & Variables */
:root {
    --bg-color: #fafafa;
    --bg-gradient: linear-gradient(135deg, #fafafa 0%, #f8f9ff 100%);
    --text-primary: #2d2d3a;
    --text-secondary: #5a5a6b;
    --text-muted: #8b8b9a;
    --accent: #6366f1;
    --accent-light: #8b5cf6;
    --accent-hover: #4f46e5;
    --accent-soft: #e0e7ff;
    --border-color: #e8e8f0;
    --nav-height: 60px;
    --pink-accent: #ec4899;
    --purple-accent: #8b5cf6;
    --lavender: #ddd6fe;
    --mint: #34d399;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
}

[data-theme="dark"] {
    --bg-color: #0f0f1a;
    --bg-gradient: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    --text-primary: #e8e8f0;
    --text-secondary: #b8b8c8;
    --text-muted: #8b8b9a;
    --accent: #8b5cf6;
    --accent-light: #c084fc;
    --accent-hover: #7c3aed;
    --accent-soft: #2d1b69;
    --border-color: #2a2a3a;
    --pink-accent: #f472b6;
    --purple-accent: #a78bfa;
    --lavender: #4c1d95;
    --mint: #6ee7b7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    background: var(--bg-gradient);
    transition: all 0.3s ease;
    cursor: none;
    overflow-x: hidden;
    font-weight: var(--font-weight-normal);
}

/* Custom Cursor - Toned Down */
.cursor {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.15s ease;
    opacity: 0.6;
}

.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.3;
}

/* Background decorative elements - Reduced */
.bg-decoration {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.03;
    animation: float 12s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
    width: 60px;
    height: 60px;
    background: var(--accent);
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.floating-shape:nth-child(2) {
    width: 40px;
    height: 40px;
    background: var(--pink-accent);
    top: 70%;
    right: 15%;
    animation-delay: -3s;
}

.floating-shape:nth-child(3) {
    width: 30px;
    height: 30px;
    background: var(--mint);
    top: 45%;
    left: 80%;
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(90deg); }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(250, 250, 250, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-theme="dark"] .nav {
    background: rgba(15, 15, 26, 0.85);
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-weight: 600;
    font-variation-settings: 'wght' 600;
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
    transform: translateY(-1px);
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::before,
.nav-links a.active::before {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-radius: 50%;
}

.theme-toggle:hover {
    color: var(--accent);
    background: var(--accent-soft);
    transform: rotate(90deg) scale(1.05);
}

[data-theme="light"] .moon-icon {
    display: none;
}

[data-theme="dark"] .sun-icon {
    display: none;
}

/* Main Content */
.main {
    padding-top: var(--nav-height);
    position: relative;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* Page Sections */
.page-header {
    padding: 60px 0 40px;
    text-align: center;
}

.page-title {
    font-size: clamp(1.75rem, 4vw, 2rem);
    font-weight: 700;
    font-variation-settings: 'wght' 700;
    line-height: 1.3;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.page-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section {
    padding: 40px 0;
    transition: all 0.3s ease;
}

.section:hover {
    transform: translateY(-1px);
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    font-variation-settings: 'wght' 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-transform: lowercase;
    position: relative;
    transition: all 0.3s ease;
}

.section-title:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.section-title::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.section-title:hover::before {
    width: 6px;
}

/* Content Styling */
.content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.content p {
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.content p:hover {
    color: var(--text-primary);
    transform: translateX(2px);
}

.content p:last-child {
    margin-bottom: 0;
}

/* Dividers */
.divider {
    height: 1px;
    background: var(--gradient-accent);
    margin: 0;
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.divider:hover {
    opacity: 0.4;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    padding: 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background: rgba(26, 26, 46, 0.5);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.08),
                0 4px 8px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-soft);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.card:hover .card-title {
    color: var(--accent);
}

.card-content {
    color: var(--text-secondary);
    line-height: 1.6;
}

.card:hover .card-content {
    color: var(--text-primary);
}

/* Project Cards */
.project-card {
    margin-bottom: 24px;
}

.project-card:last-child {
    margin-bottom: 0;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.project-tags span {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--lavender);
    padding: 4px 10px;
    border-radius: 16px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.card:hover .project-tags span {
    background: var(--accent);
    color: white;
    transform: translateY(-1px);
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.project-link:hover {
    border-bottom-color: var(--accent);
    color: var(--pink-accent);
}

/* Thought Posts */
.post-preview {
    margin-bottom: 32px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.post-preview:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.post-preview:hover {
    transform: translateX(5px);
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.post-preview:hover .post-title {
    color: var(--accent);
}

.post-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Hobbies Section */
.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.hobby-item {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hobby-item:hover {
    background: var(--accent-soft);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.hobby-emoji {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.hobby-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

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

/* Footer */
.footer {
    padding: 60px 0 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        cursor: auto;
    }
    
    .cursor,
    .cursor-trail {
        display: none;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .nav-container {
        padding: 0 20px;
    }
    
    .nav-links {
        gap: 16px;
    }
    
    .nav-links a {
        font-size: 13px;
    }
    
    .page-header {
        padding: 40px 0 30px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .page-subtitle {
        font-size: 16px;
    }
    
    .section {
        padding: 30px 0;
    }
    
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .hobbies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-right {
        gap: 16px;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .card {
        padding: 20px;
    }
    
    .hobbies-grid {
        grid-template-columns: 1fr;
    }
}

/* Focus states for accessibility */
.nav-links a:focus,
.nav-logo:focus,
.theme-toggle:focus,
.project-link:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Selection styles */
::selection {
    background: var(--accent);
    color: white;
}

::-moz-selection {
    background: var(--accent);
    color: white;
}

/* Smooth transitions for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .cursor,
    .cursor-trail,
    .floating-shape {
        display: none !important;
    }
}