/* Minimalist Portfolio Theme - Whitish, Clean, Modern Design */

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-accent: #f0f2f5;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --accent-light: #ebf5fb;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
    --transition-speed: 0.3s;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-color: #60a5fa;
    --accent-hover: #3b82f6;
    --accent-light: #1e3a8a;
    --border-color: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.6);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.01) 2px,
            rgba(0, 0, 0, 0.01) 4px
        );
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 1.0625rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { 
    font-size: 3.5rem; 
    font-weight: 800; 
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 { 
    font-size: 2.25rem; 
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 { 
    font-size: 1.75rem;
    font-weight: 600;
}

h4 { 
    font-size: 1.375rem;
    font-weight: 600;
}

h5 { 
    font-size: 0.875rem; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    color: var(--accent-color); 
    font-weight: 700;
}

h6 { 
    font-size: 0.8125rem; 
    text-transform: uppercase; 
    letter-spacing: 0.12em; 
    color: var(--text-muted);
    font-weight: 600;
}

p { 
    margin-bottom: 1.5rem; 
    color: var(--text-secondary);
    line-height: 1.8;
}
a { 
    color: var(--accent-color); 
    text-decoration: none; 
    transition: all var(--transition-speed) var(--transition-smooth);
}

a:hover { 
    color: var(--accent-hover);
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.wrapper { max-width: 900px; margin: 0 auto; }

.section {
    padding: 5rem 0;
}

.section:nth-child(even) { background-color: var(--bg-secondary); }

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: all 0.4s var(--transition-smooth);
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
}

header.scrolled { 
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border-color);
}

header.scrolled::after {
    opacity: 0.3;
}

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

.logo { 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--text-primary); 
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
}

.logo a { 
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s var(--transition-smooth);
    display: inline-block;
}

.logo a::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-hover));
    border-radius: 2px;
    opacity: 0;
    transition: all 0.3s var(--transition-smooth);
}

.logo a:hover::before {
    opacity: 1;
    left: -12px;
}

.logo a:hover {
    transform: translateX(4px);
}

nav ul { 
    display: flex; 
    list-style: none; 
    gap: 2.5rem;
    background: var(--bg-accent);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

nav a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    position: relative;
    transition: all var(--transition-speed) var(--transition-smooth);
    letter-spacing: 0.02em;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transition: width 0.4s var(--transition-smooth);
    border-radius: 2px;
}

nav a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: var(--accent-light);
    border-radius: 50px;
    transition: all 0.4s var(--transition-smooth);
    z-index: -1;
}

nav a:hover::before {
    width: calc(100% + 1rem);
    height: calc(100% + 0.5rem);
}

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

nav a:hover::after, nav a.active::after { 
    width: 100%;
}

nav a.active::before {
    width: calc(100% + 1rem);
    height: calc(100% + 0.5rem);
}

.menu-toggle { 
    display: none; 
    background: var(--bg-accent); 
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer; 
    padding: 0.625rem;
    transition: all 0.3s var(--transition-smooth);
}

.menu-toggle:hover {
    background: var(--accent-light);
    border-color: var(--accent-color);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background-color: var(--text-primary);
    margin: 4px 0;
    transition: all var(--transition-speed) ease;
    border-radius: 2px;
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
}

.hero-content { max-width: 700px; }
.hero h5 { 
    font-size: 0.9375rem; 
    margin-bottom: 1.25rem; 
    opacity: 0; 
    animation: fadeInUp 0.8s var(--transition-smooth) 0.2s forwards;
}

.hero h1 { 
    font-size: 4rem; 
    margin-bottom: 1.5rem; 
    opacity: 0; 
    animation: fadeInUp 0.8s var(--transition-smooth) 0.4s forwards;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .roles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.6s forwards;
}

.hero .role-tag {
    padding: 0.5rem 1rem;
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.4s var(--transition-smooth);
    letter-spacing: 0.01em;
}

.hero .role-tag:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.hero .cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 0.8s forwards;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2.5rem;
    opacity: 0;
    animation: fadeInUp 0.8s var(--transition-smooth) 1s forwards;
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.4s var(--transition-smooth);
    font-size: 1.125rem;
}

.social-links a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-md);
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.4s var(--transition-smooth);
    cursor: pointer;
    border: none;
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary { 
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover { 
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.about-content {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.profile-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform var(--transition-speed) ease;
}

.profile-image:hover { transform: scale(1.03); }
.about-text p { font-size: 1.05rem; line-height: 1.8; }

.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), var(--border-color));
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInLeft 0.6s ease forwards;
}

.timeline-item:nth-child(1) { animation-delay: 0.1s; }
.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.3s; }
.timeline-item:nth-child(4) { animation-delay: 0.4s; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid var(--bg-primary);
    box-shadow: 0 0 0 4px var(--bg-accent);
}

.timeline-header { margin-bottom: 0.5rem; }
.timeline-header h3 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.timeline-header .date { color: var(--text-muted); font-size: 0.9rem; }
.timeline-content h4 { color: var(--accent-color); font-size: 1rem; margin-bottom: 0.5rem; }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.4s var(--transition-smooth);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--transition-smooth) forwards;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-hover));
    transform: scaleX(0);
    transition: transform 0.4s var(--transition-smooth);
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-light);
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card h4 { margin-bottom: 0.5rem; }
.project-card h6 { margin-bottom: 1rem; }
.project-card p { font-size: 0.95rem; margin-bottom: 1rem; }

.hidden-project {
    display: none;
}

.hidden-project.show {
    display: block;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all var(--transition-speed) ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.contact-card .icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-accent);
    border-radius: 50%;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.contact-card h5 { margin-bottom: 0.5rem; }
.contact-card p { margin-bottom: 0; font-size: 0.95rem; }

footer {
    background-color: var(--bg-secondary);
    padding: 3rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-social { display: flex; gap: 1rem; list-style: none; }
.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-accent);
    color: var(--text-secondary);
    transition: all var(--transition-speed) ease;
}

.footer-social a:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.copyright { color: var(--text-muted); font-size: 0.9rem; }

#go-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-md);
}

#go-top.visible { opacity: 1; visibility: visible; }
#go-top:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
#go-top a { color: white; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(40px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-30px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }
    .container { padding: 0 1.5rem; }
    .nav-container { 
        padding: 1rem 1.5rem;
        width: 100%;
        position: relative;
    }
    
    .logo {
        flex: 0 0 auto;
        z-index: 2;
    }
    
    nav {
        position: static;
    }
    
    nav ul {
        position: fixed;
        top: 80px;
        left: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed) ease;
        border-radius: 16px;
        border: 1px solid var(--border-color);
    }
    
    nav ul.active { transform: translateY(0); opacity: 1; visibility: visible; }
    
    .menu-toggle { 
        display: block;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    nav li { width: 100%; }
    nav a { 
        display: block; 
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
    
    .hero { padding: 6rem 1.5rem 4rem; }
    .hero h1 { font-size: 2.5rem; }
    .hero .cta-buttons { flex-direction: column; }
    .about-content { 
        grid-template-columns: 1fr; 
        gap: 2rem;
        text-align: center;
    }
    .profile-image { 
        max-width: 250px; 
        margin: 0 auto;
        display: block;
    }
    .about-text {
        text-align: center;
    }
    .projects-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; text-align: center; }
    .section { padding: 3rem 0; }
    #go-top { bottom: 1rem; right: 1rem; width: 45px; height: 45px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .hero .roles { flex-direction: column; align-items: center; }
    .timeline { padding-left: 1.5rem; }
    .timeline-item::before { left: -2rem; }
}

.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.section-intro { text-align: center; margin-bottom: 4rem; }
.section-intro h5 { margin-bottom: 0.5rem; }
.section-intro h2 { margin-bottom: 1rem; }
.section-intro p { max-width: 600px; margin: 0 auto; color: var(--text-secondary); }

/* ===================================================================
   Theme Toggle Button
   =================================================================== */

.theme-toggle {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--bg-accent);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.4s var(--transition-smooth);
    box-shadow: var(--shadow-md);
}

.theme-toggle:hover {
    transform: translateY(-3px) rotate(20deg);
    box-shadow: var(--shadow-lg);
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.theme-toggle:hover .theme-icon {
    color: white;
}

.theme-icon {
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: all 0.4s var(--transition-smooth);
}

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

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

.theme-toggle .moon-icon {
    display: block;
}

/* Smooth theme transition */
body {
    transition: background-color 0.3s var(--transition-smooth), color 0.3s var(--transition-smooth);
}

header {
    transition: all 0.4s var(--transition-smooth), background-color 0.3s var(--transition-smooth);
}

/* Dark theme specific adjustments */
[data-theme="dark"] body {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
}

[data-theme="dark"] header {
    background: rgba(15, 23, 42, 0.8);
}

[data-theme="dark"] header.scrolled {
    background: rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] .hero h1 {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .btn-primary {
    box-shadow: 0 4px 15px rgba(96, 165, 250, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(96, 165, 250, 0.4);
}

@media (max-width: 768px) {
    .theme-toggle {
        bottom: 5rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}
